Skip to content

Latest commit

 

History

History
145 lines (100 loc) · 4.83 KB

PlatformConsumptionsApi.md

File metadata and controls

145 lines (100 loc) · 4.83 KB

Wordlift\Client\PlatformConsumptionsApi

All URIs are relative to https://api.wordlift.io, except if the operation defines another base path.

Method HTTP request Description
createOrUpdateMyPlatformConsumption() PUT /platform-limit/consumptions/me Create or update the Platform Consumption
getMyPlatformConsumption() GET /platform-limit/consumptions/me Get the Platform Consumption

createOrUpdateMyPlatformConsumption()

createOrUpdateMyPlatformConsumption($applies_to, $consumption_to_add): \Wordlift\Client\Model\PageWithLimits

Create or update the Platform Consumption

Create or update the Platform Consumption for the authenticated user.

Example

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


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

// Configure API key authorization: ApiKey
$config = Wordlift\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Wordlift\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new Wordlift\Client\Api\PlatformConsumptionsApi(
    // 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
);
$applies_to = 'applies_to_example'; // string
$consumption_to_add = 1; // int

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

Parameters

Name Type Description Notes
applies_to string
consumption_to_add int [optional] [default to 1]

Return type

\Wordlift\Client\Model\PageWithLimits

Authorization

OAuth2, ApiKey

HTTP request headers

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

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

getMyPlatformConsumption()

getMyPlatformConsumption($applies_to, $include_subscription, $include_limit): \Wordlift\Client\Model\PageWithLimits

Get the Platform Consumption

Get the Platform Consumption for the authenticated user.

Example

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


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

// Configure API key authorization: ApiKey
$config = Wordlift\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Wordlift\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new Wordlift\Client\Api\PlatformConsumptionsApi(
    // 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
);
$applies_to = 'applies_to_example'; // string
$include_subscription = True; // bool
$include_limit = True; // bool

try {
    $result = $apiInstance->getMyPlatformConsumption($applies_to, $include_subscription, $include_limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlatformConsumptionsApi->getMyPlatformConsumption: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
applies_to string
include_subscription bool [optional]
include_limit bool [optional]

Return type

\Wordlift\Client\Model\PageWithLimits

Authorization

OAuth2, ApiKey

HTTP request headers

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

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