Skip to content

Latest commit

 

History

History
221 lines (155 loc) · 6.9 KB

AccountsApi.md

File metadata and controls

221 lines (155 loc) · 6.9 KB

Wordlift\Client\AccountsApi

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

Method HTTP request Description
getAccount() GET /accounts/{id} Get an account.
listAccounts() GET /accounts List
updateAccount() PUT /accounts/{id} Update an account.

getAccount()

getAccount($id): \Wordlift\Client\Model\Account

Get an account.

Get the account

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 HTTP basic authorization: BasicAuth
$config = Wordlift\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Wordlift\Client\Api\AccountsApi(
    // 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
);
$id = 56; // int

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

Parameters

Name Type Description Notes
id int

Return type

\Wordlift\Client\Model\Account

Authorization

OAuth2, BasicAuth

HTTP request headers

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

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

listAccounts()

listAccounts($cursor, $limit, $can_content_generation, $include_entity_count, $include_all_accounts, $include_subscription, $url, $ng_dataset_id): \Wordlift\Client\Model\PageActiveAccount

List

List the accounts

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 HTTP basic authorization: BasicAuth
$config = Wordlift\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Wordlift\Client\Api\AccountsApi(
    // 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
);
$cursor = 'cursor_example'; // string | The cursor
$limit = 10; // int
$can_content_generation = True; // bool | Filter accounts that can or cannot do Content Generation
$include_entity_count = false; // bool | Add entity count data
$include_all_accounts = false; // bool | Include all the accounts the user has access to
$include_subscription = false; // bool | Include the subscription data
$url = 'url_example'; // string | The URL
$ng_dataset_id = 'ng_dataset_id_example'; // string | The dataset id

try {
    $result = $apiInstance->listAccounts($cursor, $limit, $can_content_generation, $include_entity_count, $include_all_accounts, $include_subscription, $url, $ng_dataset_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->listAccounts: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
cursor string The cursor [optional]
limit int [optional] [default to 10]
can_content_generation bool Filter accounts that can or cannot do Content Generation [optional]
include_entity_count bool Add entity count data [optional] [default to false]
include_all_accounts bool Include all the accounts the user has access to [optional] [default to false]
include_subscription bool Include the subscription data [optional] [default to false]
url string The URL [optional]
ng_dataset_id string The dataset id [optional]

Return type

\Wordlift\Client\Model\PageActiveAccount

Authorization

OAuth2, BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.wordlift.accounts+json;version=1

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

updateAccount()

updateAccount($id, $update_account_request): \Wordlift\Client\Model\Account

Update an account.

Update the account

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 HTTP basic authorization: BasicAuth
$config = Wordlift\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Wordlift\Client\Api\AccountsApi(
    // 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
);
$id = 56; // int
$update_account_request = new \Wordlift\Client\Model\UpdateAccountRequest(); // \Wordlift\Client\Model\UpdateAccountRequest

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

Parameters

Name Type Description Notes
id int
update_account_request \Wordlift\Client\Model\UpdateAccountRequest

Return type

\Wordlift\Client\Model\Account

Authorization

OAuth2, BasicAuth

HTTP request headers

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

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