artikcloud/artikcloud-php

2.2.3 2017-12-28 23:24 UTC

This package is not auto-updated.

Last update: 2025-01-18 21:30:22 UTC


README

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

Requirements

PHP 5.5.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

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

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: artikcloud_oauth
ArtikCloud\Configuration::getDefaultConfiguration()->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

Documentation For Models

Documentation For Authorization

artikcloud_oauth

Usage

Peek into tests for examples about how to use the SDK.

More about ARTIK Cloud

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

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

Check out advanced sample applications at https://developer.artik.cloud/documentation/samples/

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

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

License and Copyright

Licensed under the Apache License. See LICENSE.