All URIs are relative to https://api.ebay.com/commerce/notification/v1.
Method | HTTP request | Description |
---|---|---|
getTopic() | GET /topic/{topic_id} | |
getTopics() | GET /topic |
getTopic($topic_id): \eBay\Commerce\Notification\Model\Topic
This method allows applications to retrieve details for the specified topic. This information includes supported schema versions, formats, and other metadata for the topic. Applications can subscribe to any of the topics for a supported schema version and format, limited by the authorization scopes required to subscribe to the topic. A topic specifies the type of information to be received and the data types associated with an event. An event occurs in the eBay system, such as when a user requests deletion or revokes access for an application. An event is an instance of an event type (topic). Specify the topic to retrieve using the topic_id URI parameter. Note: Use the getTopics method to find a topic if you do not know the topic ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: api_auth
$config = eBay\Commerce\Notification\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new eBay\Commerce\Notification\Api\TopicApi(
// 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
);
$topic_id = 'topic_id_example'; // string | The ID of the topic for which to retrieve the details.
try {
$result = $apiInstance->getTopic($topic_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TopicApi->getTopic: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
topic_id | string | The ID of the topic for which to retrieve the details. |
\eBay\Commerce\Notification\Model\Topic
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getTopics($limit, $continuation_token): \eBay\Commerce\Notification\Model\TopicSearchResponse
This method returns a paginated collection of all supported topics, along with the details for the topics. This information includes supported schema versions, formats, and other metadata for the topics. Applications can subscribe to any of the topics for a supported schema version and format, limited by the authorization scopes required to subscribe to the topic. A topic specifies the type of information to be received and the data types associated with an event. An event occurs in the eBay system, such as when a user requests deletion or revokes access for an application. An event is an instance of an event type (topic).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: api_auth
$config = eBay\Commerce\Notification\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new eBay\Commerce\Notification\Api\TopicApi(
// 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
);
$limit = 'limit_example'; // string | The maximum number of items to return per page from the result set. A result set is the complete set of results returned by the method. Range is from 10-100. If this parameter is omitted, the default value is used. Default: 20 Maximum: 100 items per page
$continuation_token = 'continuation_token_example'; // string | The token used to access the next set of results.
try {
$result = $apiInstance->getTopics($limit, $continuation_token);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TopicApi->getTopics: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
limit | string | The maximum number of items to return per page from the result set. A result set is the complete set of results returned by the method. Range is from 10-100. If this parameter is omitted, the default value is used. Default: 20 Maximum: 100 items per page | [optional] |
continuation_token | string | The token used to access the next set of results. | [optional] |
\eBay\Commerce\Notification\Model\TopicSearchResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]