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($id): \Wordlift\Client\Model\Account
Get an account.
Get the account
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
\Wordlift\Client\Model\Account
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
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
<?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;
}
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] |
\Wordlift\Client\Model\PageActiveAccount
- 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($id, $update_account_request): \Wordlift\Client\Model\Account
Update an account.
Update the account
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | ||
update_account_request | \Wordlift\Client\Model\UpdateAccountRequest |
\Wordlift\Client\Model\Account
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]