SwaggerClient-php
Read/Write Nature Remo, (*1)
This PHP package is automatically generated by the Swagger Codegen project:, (*2)
- API version: 1.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.5 and later, (*3)
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:, (*4)
{
"repositories": [
{
"type": "git",
"url": "https://github.com/crhg/remo-client.git"
}
],
"require": {
"crhg/remo-client": "*@dev"
}
}
Then run composer install
, (*5)
Manual Installation
Download the files and include autoload.php
:, (*6)
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:, (*7)
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:, (*8)
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, (*9)
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