Skip to content

Client library for accessing nature remo global API

Notifications You must be signed in to change notification settings

crhg/remo-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerClient-php

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

Class Method HTTP request Description
DefaultApi applianceOrdersPost POST /appliance_orders
DefaultApi appliancesApplianceAirconSettingsPost POST /appliances/{appliance}/aircon_settings
DefaultApi appliancesApplianceDeletePost POST /appliances/{appliance}/delete
DefaultApi appliancesAppliancePost POST /appliances/{appliance}
DefaultApi appliancesApplianceSignalOrdersPost POST /appliances/{appliance}/signal_orders
DefaultApi appliancesApplianceSignalsGet GET /appliances/{appliance}/signals
DefaultApi appliancesApplianceSignalsPost POST /appliances/{appliance}/signals
DefaultApi appliancesGet GET /appliances
DefaultApi appliancesPost POST /appliances
DefaultApi detectappliancePost POST /detectappliance
DefaultApi devicesDeviceDeletePost POST /devices/{device}/delete
DefaultApi devicesDeviceHumidityOffsetPost POST /devices/{device}/humidity_offset
DefaultApi devicesDevicePost POST /devices/{device}
DefaultApi devicesDeviceTemperatureOffsetPost POST /devices/{device}/temperature_offset
DefaultApi devicesGet GET /devices
DefaultApi signalsSignalDeletePost POST /signals/{signal}/delete
DefaultApi signalsSignalPost POST /signals/{signal}
DefaultApi signalsSignalSendPost POST /signals/{signal}/send
DefaultApi usersMeGet GET /users/me
DefaultApi usersMePost POST /users/me

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

About

Client library for accessing nature remo global API

Resources

Stars

Watchers

Forks

Packages

No packages published