PHP code example of emnify / emnify-sdk

1. Go to this page and download the library: Download emnify/emnify-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

emnify / emnify-sdk example snippets



iInstance = new Swagger\Client\Api\ApplicationTokensApi(
    // 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
);
$body = new \Swagger\Client\Model\ApplicationToken(); // \Swagger\Client\Model\ApplicationToken | 
$app_token_id = 1.2; // float | application token ID

try {
    $apiInstance->applicationTokenByIdPatch($body, $app_token_id);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationTokensApi->applicationTokenByIdPatch: ', $e->getMessage(), PHP_EOL;
}


$apiInstance = new Swagger\Client\Api\ApplicationTokensApi(
    // 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->applicationTokenGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationTokensApi->applicationTokenGet: ', $e->getMessage(), PHP_EOL;
}


$apiInstance = new Swagger\Client\Api\ApplicationTokensApi(
    // 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
);
$body = new \Swagger\Client\Model\CreateApplicationTokenrequest(); // \Swagger\Client\Model\CreateApplicationTokenrequest | 

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