All URIs are relative to https://up.go-adserver.com
| Method | HTTP request | Description |
|---|---|---|
| apiV1AdspacesGet | GET /api/v1/adspaces | List ad zones owned by the caller. |
| apiV1AdspacesIdGet | GET /api/v1/adspaces/{id} | Get a single adspace. |
ApiV1AdspacesGet200Response apiV1AdspacesGet(siteId, page, perPage)
List ad zones owned by the caller.
import {
Configuration,
AdspacesApi,
} from 'goadserver-sdk';
import type { ApiV1AdspacesGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new AdspacesApi(config);
const body = {
// number | Filter to one site. (optional)
siteId: 56,
// number (optional)
page: 56,
// number (optional)
perPage: 56,
} satisfies ApiV1AdspacesGetRequest;
try {
const data = await api.apiV1AdspacesGet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| siteId | number |
Filter to one site. | [Optional] [Defaults to undefined] |
| page | number |
[Optional] [Defaults to 1] |
|
| perPage | number |
[Optional] [Defaults to 100] |
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Adspace list (filtered by resource_filter.site_ids/adzone_ids when set). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1AdspacesIdGet(id)
Get a single adspace.
import {
Configuration,
AdspacesApi,
} from 'goadserver-sdk';
import type { ApiV1AdspacesIdGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new AdspacesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1AdspacesIdGetRequest;
try {
const data = await api.apiV1AdspacesIdGet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Adspace | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]