2017 © Pedro Peláez
 

library artikcloud-php

image

artikcloud/artikcloud-php

  • Friday, December 29, 2017
  • by ARTIKCloud
  • Repository
  • 5 Watchers
  • 3 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

ARTIK Cloud PHP SDK

This SDK helps you connect your PHP scripts to ARTIK Cloud. The SDK exposes a number of methods to easily execute REST API calls to ARTIK Cloud. - Package version: 2.2.3, (*1)

Requirements

PHP 5.5.0 and later, (*2)

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:, (*3)

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/artikcloud/artikcloud-php.git"
    }
  ],
  "require": {
    "artikcloud/artikcloud-php": "*@dev"
  }
}

Then run composer install, (*4)

Manual Installation

Download the files and include autoload.php:, (*5)

    require_once('/path/to/./autoload.php');

Tests

To run the unit tests:, (*6)

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:, (*7)

setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new ArtikCloud\Api\DeviceTypesApi();
$device_type_id = "device_type_id_example"; // string | deviceTypeId

try {
    $result = $api_instance->getAvailableManifestVersions($device_type_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DeviceTypesApi->getAvailableManifestVersions: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.artik.cloud/v1.1, (*8)

Class Method HTTP request Description
DeviceTypesApi getAvailableManifestVersions GET /devicetypes/{deviceTypeId}/availablemanifestversions Get Available Manifest Versions
DeviceTypesApi getDeviceType GET /devicetypes/{deviceTypeId} Get Device Type
DeviceTypesApi getDeviceTypes GET /devicetypes Get Device Types
DeviceTypesApi getDeviceTypesByApplication GET /applications/{appId}/devicetypes Get Device Types by Application
DeviceTypesApi getLatestManifestProperties GET /devicetypes/{deviceTypeId}/manifests/latest/properties Get Latest Manifest Properties
DeviceTypesApi getManifestProperties GET /devicetypes/{deviceTypeId}/manifests/{version}/properties Get manifest properties
DevicesApi addDevice POST /devices Add Device
DevicesApi deleteDevice DELETE /devices/{deviceId} Delete Device
DevicesApi deleteDeviceToken DELETE /devices/{deviceId}/tokens Delete Device Token
DevicesApi getDevice GET /devices/{deviceId} Get Device
DevicesApi getDevicePresence GET /devices/{deviceId}/presence Get device presence information
DevicesApi getDeviceToken GET /devices/{deviceId}/tokens Get Device Token
DevicesApi updateDevice PUT /devices/{deviceId} Update Device
DevicesApi updateDeviceToken PUT /devices/{deviceId}/tokens Update Device Token
DevicesManagementApi createTasks POST /devicemgmt/tasks Create a new task for one or more devices
DevicesManagementApi deleteServerProperties DELETE /devicemgmt/devices/{did}/serverproperties Deletes a device's properties.
DevicesManagementApi getAllByDid GET /devicemgmt/devices/{did}/tasks Returns the list of tasks for a particular device id with optional status filter.
DevicesManagementApi getDeviceTypesInfo GET /devicemgmt/devicetypes/{dtid} Read a device type device management information.
DevicesManagementApi getManifestProperties GET /devicemgmt/devicetypes/{dtid}/manifest/properties Get a device type's device management manifest properties
DevicesManagementApi getProperties GET /devicemgmt/devices/{did}/properties Read a device's properties.
DevicesManagementApi getStatuses GET /devicemgmt/tasks/{tid}/statuses Returns the details and status of a task id and the individual statuses of each device id in the list.
DevicesManagementApi getStatusesHistory GET /devicemgmt/tasks/{tid}/statuses/history Returns the history of the status changes for a specific task id, or for a specific device id in that task.
DevicesManagementApi getTaskByID GET /devicemgmt/tasks/{tid} Returns the details and global status of a specific task id.
DevicesManagementApi getTasks GET /devicemgmt/tasks Returns the all the tasks for a device type.
DevicesManagementApi queryProperties GET /devicemgmt/devices/properties Query device properties across devices.
DevicesManagementApi updateDeviceTypesInfo PUT /devicemgmt/devicetypes/{dtid} Updates a device type information
DevicesManagementApi updateServerProperties POST /devicemgmt/devices/{did}/serverproperties Updates a device's server properties.
DevicesManagementApi updateTask PUT /devicemgmt/tasks/{tid} Updates a task for all devices - For now just allows changing the state to cancelled.
DevicesManagementApi updateTaskForDevice PUT /devicemgmt/tasks/{tid}/devices/{did} Updates a task for a specific device - For now just allows changing the state to cancelled.
DevicesSharesApi createShareForDevice POST /devices/{deviceId}/shares Share a device
DevicesSharesApi deleteSharingForDevice DELETE /devices/{deviceId}/shares/{shareId} Delete specific share of the given device id
DevicesSharesApi getAllSharesForDevice GET /devices/{deviceId}/shares List all shares for the given device id
DevicesSharesApi getSharingForDevice GET /devices/{deviceId}/shares/{shareId} Get specific share of the given device id
DevicesStatusApi getDeviceStatus GET /devices/{deviceId}/status Get Device Status
DevicesStatusApi getDevicesStatus GET /devices/status Get Devices Status
DevicesStatusApi putDeviceStatus PUT /devices/{deviceId}/status Update Device Status
ExportApi exportRequest POST /messages/export Create Export Request
ExportApi getExportHistory GET /messages/export/history Get Export History
ExportApi getExportResult GET /messages/export/{exportId}/result Get Export Result
ExportApi getExportStatus GET /messages/export/{exportId}/status Check Export Status
MessagesApi getAggregatesHistogram GET /messages/analytics/histogram Get Normalized Message Histogram
MessagesApi getFieldPresence GET /messages/presence Get normalized message presence
MessagesApi getLastNormalizedMessages GET /messages/last Get Last Normalized Message
MessagesApi getMessageAggregates GET /messages/analytics/aggregates Get Normalized Message Aggregates
MessagesApi getMessageSnapshots GET /messages/snapshots Get Message Snapshots
MessagesApi getNormalizedActions GET /actions Get Normalized Actions
MessagesApi getNormalizedMessages GET /messages Get Normalized Messages
MessagesApi sendActions POST /actions Send Actions
MessagesApi sendMessage POST /messages Send Message
MonetizationApi createPricingTiers POST /pricing/devicetypes/{dtid}/pricingtiers Define devicetype's pricing tiers.
MonetizationApi getPricingTiers GET /pricing/devices/{did}/pricingtiers Get a device's pricing tiers
MonetizationApi getThePricingTiers GET /pricing/devicetypes/{dtid}/pricingtiers Get devicetype's pricing tiers.
MonetizationApi getUpgradePath GET /pricing/devices/{did}/revenueshare/upgradepath Get upgrade path
MonetizationApi setPricingTier PUT /pricing/devices/{did}/pricingtiers Set a device's pricing tier
RegistrationsApi confirmUser PUT /devices/registrations/pin Confirm User
RegistrationsApi getRequestStatusForUser GET /devices/registrations/{requestId}/status Get Request Status For User
RegistrationsApi unregisterDevice DELETE /devices/{deviceId}/registrations Unregister Device
RulesApi createRule POST /rules Create Rule
RulesApi deleteRule DELETE /rules/{ruleId} Delete Rule
RulesApi getRule GET /rules/{ruleId} Get Rule
RulesApi updateRule PUT /rules/{ruleId} Update Rule
SubscriptionsApi createSubscription POST /subscriptions Create Subscription
SubscriptionsApi deleteSubscription DELETE /subscriptions/{subId} Delete Subscription
SubscriptionsApi getAllSubscriptions GET /subscriptions Get All Subscriptions
SubscriptionsApi getMessages GET /notifications/{notifId}/messages Get Messages
SubscriptionsApi getSubscription GET /subscriptions/{subId} Get Subscription
SubscriptionsApi validateSubscription POST /subscriptions/{subId}/validate Validate Subscription
TagsApi getTagCategories GET /tags/categories Get all categories
TagsApi getTagSuggestions GET /tags/suggestions Get tag suggestions
TagsApi getTagsByCategories GET /tags Get all tags of categories
TokensApi checkToken POST /accounts/checkToken Check Token
TokensApi refreshToken POST /accounts/token Refresh Token
TokensApi tokenInfo GET /accounts/tokenInfo Token Info
UsersApi createUserProperties POST /users/{userId}/properties Create User Application Properties
UsersApi deleteUserProperties DELETE /users/{userId}/properties Delete User Application Properties
UsersApi getSelf GET /users/self Get Current User Profile
UsersApi getUserDeviceTypes GET /users/{userId}/devicetypes Get User Device Types
UsersApi getUserDevices GET /users/{userId}/devices Get User Devices
UsersApi getUserProperties GET /users/{userId}/properties Get User application properties
UsersApi getUserRules GET /users/{userId}/rules Get User Rules
UsersApi listAllSharesForUser GET /users/{userId}/shares Get User shares
UsersApi updateUserProperties PUT /users/{userId}/properties Update User Application Properties
WhitelistingApi deleteVdid DELETE /devicetypes/{dtid}/whitelist/{vdid} Delete a vdid from the devicetype whitelist.
WhitelistingApi deleteWhitelistCertificate DELETE /devicetypes/{dtid}/whitelist/certificates/{cid} Delete a whitelist certificate associated with a devicetype.
WhitelistingApi enableWhitelist PUT /devicetypes/:dtid/whitelist/enable Enable or disble whitelist feature of a device type
WhitelistingApi getRejectedRowList GET /devicetypes/{dtid}/whitelist/{uploadId}/rejectedRows Get the list of rejected rows for an uploaded CSV file.
WhitelistingApi getUploadStatus GET /devicetypes/{dtid}/whitelist/{uploadId}/status Get the status of a uploaded CSV file.
WhitelistingApi getWhitelist GET /devicetypes/{dtid}/whitelist Get whitelisted vdids of a device type.
WhitelistingApi getWhitelistCertificate GET /devicetypes/{dtid}/whitelist/certificates Get whitelist certificate of device type.
WhitelistingApi getWhitelistStatus GET /devicetypes/{dtid}/whitelist/status Get the status of whitelist feature (enabled/disabled) of a device type.
WhitelistingApi uploadCSV POST /devicetypes/{dtid}/whitelist Upload a CSV file related to the Device Type.

Documentation For Models

Documentation For Authorization

artikcloud_oauth

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://accounts.artik.cloud/authorize
  • Scopes:
    • read:artikcloud: Read from ARTIK Cloud
    • write:artikcloud: Write from ARTIK Cloud

Usage

Peek into tests for examples about how to use the SDK., (*9)

More about ARTIK Cloud

If you are not familiar with ARTIK Cloud, we have extensive documentation at https://developer.artik.cloud/documentation, (*10)

The full ARTIK Cloud API specification can be found at https://developer.artik.cloud/documentation/api-reference/, (*11)

Check out advanced sample applications at https://developer.artik.cloud/documentation/samples/, (*12)

To create and manage your services and devices on ARTIK Cloud, create an account at https://developer.artik.cloud, (*13)

Also see the ARTIK Cloud blog for tutorials, updates, and more: http://artik.io/blog, (*14)

Licensed under the Apache License. See LICENSE., (*15)

The Versions

29/12 2017

dev-master

9999999-dev http://developer.artik.cloud

  Sources   Download

Apache V2 proprietary

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.5

 

The Development Requires

api php sdk artikcloud

29/12 2017

2.2.3

2.2.3.0 http://developer.artik.cloud

  Sources   Download

proprietary

The Requires

  • php >=5.5
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php sdk artikcloud

26/12 2017

2.2.2

2.2.2.0 http://developer.artik.cloud

  Sources   Download

proprietary

The Requires

  • php >=5.5
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php sdk artikcloud

14/06 2017

2.1.0

2.1.0.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

03/01 2017

2.0.7

2.0.7.0

This SDK helps you connect your PHP scripts to ARTIK Cloud. The SDK exposes a number of methods to easily execute REST API calls to ARTIK Cloud

  Sources   Download

Apache V2

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php sdk

18/11 2016

dev-develop

dev-develop

This SDK helps you connect your PHP scripts to ARTIK Cloud. The SDK exposes a number of methods to easily execute REST API calls to ARTIK Cloud

  Sources   Download

Apache V2

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php sdk

26/08 2016

2.0.5

2.0.5.0

  Sources   Download

Apache V2

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php sdk

29/04 2016

2.0.0

2.0.0.0 http://artik.cloud

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php sdk artikcloud