crhg/remo-client

Client for nature api

v1.0.0 2018-05-30 05:42 UTC

This package is auto-updated.

Last update: 2024-11-21 20:59:07 UTC


README

Read/Write Nature Remo

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/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: oauth2
$config = Crhg\RemoClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Crhg\RemoClient\Api\DefaultApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$appliances = "appliances_example"; // string | List of all appliances' IDs comma separated

try {
    $apiInstance->applianceOrdersPost($appliances);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->applianceOrdersPost: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.nature.global/1

Documentation For Models

Documentation For Authorization

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://api.nature.global/oauth2/auth
  • Scopes:
  • basic.read: Read only access to user's profile (excluding email), Remos, appliances, signals.
  • basic: Read + write access to user's profile (excluding email), Remos, appliances, signals.
  • sendir: Send infrared signals through Remo.
  • detectappliance: Detect air conditioner model from infrared signals.

Author