Skip to content

Latest commit

 

History

History
170 lines (111 loc) · 4.11 KB

ServerApi.md

File metadata and controls

170 lines (111 loc) · 4.11 KB

Supla\ApiClient\ServerApi

All URIs are relative to https://YOUR_SUPLA_SERVER/api/v3.

Method HTTP request Description
getServerInfo() GET /server-info Get the server info
getSuplaServerStatus() GET /server-status Get the SUPLA Server status
getTokenInfo() GET /token-info Returns information about used access token

getServerInfo()

getServerInfo(): \Supla\ApiClient\Model\InlineResponse200

Get the server info

Example

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



$apiInstance = new Supla\ApiClient\Api\ServerApi(
    // 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()
);

try {
    $result = $apiInstance->getServerInfo();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ServerApi->getServerInfo: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Supla\ApiClient\Model\InlineResponse200

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSuplaServerStatus()

getSuplaServerStatus(): \Supla\ApiClient\Model\InlineResponse2001

Get the SUPLA Server status

Example

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



$apiInstance = new Supla\ApiClient\Api\ServerApi(
    // 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()
);

try {
    $result = $apiInstance->getSuplaServerStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ServerApi->getSuplaServerStatus: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Supla\ApiClient\Model\InlineResponse2001

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTokenInfo()

getTokenInfo(): \Supla\ApiClient\Model\InlineResponse2002

Returns information about used access token

Example

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


// Configure Bearer authorization: BearerAuth
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure OAuth2 access token for authorization: OAuth2
$config = Supla\ApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Supla\ApiClient\Api\ServerApi(
    // 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
);

try {
    $result = $apiInstance->getTokenInfo();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ServerApi->getTokenInfo: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Supla\ApiClient\Model\InlineResponse2002

Authorization

BearerAuth, OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]