Skip to content

Latest commit

 

History

History
283 lines (189 loc) · 7.96 KB

CampaignApi.md

File metadata and controls

283 lines (189 loc) · 7.96 KB

radiomanager.CampaignApi

All URIs are relative to https://radiomanager.io/api/v2

Method HTTP request Description
createCampaign POST /campaigns Create campaign.
deleteCampaignById DELETE /campaigns/{id} Delete campaign by id
getCampaignById GET /campaigns/{id} Get campaign by id
listCampaigns GET /campaigns Get all campaigns.
updateCampaignByID PATCH /campaigns/{id} Update campaign by id

createCampaign

InlineResponse2002 createCampaign(campaignDataInput)

Create campaign.

Create campaign.

Example

import radiomanager from 'radiomanager';
let defaultClient = radiomanager.ApiClient.instance;
// Configure API key authorization: API-Key
let API-Key = defaultClient.authentications['API-Key'];
API-Key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API-Key.apiKeyPrefix = 'Token';

let apiInstance = new radiomanager.CampaignApi();
let campaignDataInput = new radiomanager.CampaignDataInput(); // CampaignDataInput | Data **(Required)**
apiInstance.createCampaign(campaignDataInput).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
campaignDataInput CampaignDataInput Data (Required)

Return type

InlineResponse2002

Authorization

API-Key

HTTP request headers

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

deleteCampaignById

InlineResponse202 deleteCampaignById(id)

Delete campaign by id

Delete campaign by id

Example

import radiomanager from 'radiomanager';
let defaultClient = radiomanager.ApiClient.instance;
// Configure API key authorization: API-Key
let API-Key = defaultClient.authentications['API-Key'];
API-Key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API-Key.apiKeyPrefix = 'Token';

let apiInstance = new radiomanager.CampaignApi();
let id = 789; // Number | ID of Campaign **(Required)**
apiInstance.deleteCampaignById(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number ID of Campaign (Required)

Return type

InlineResponse202

Authorization

API-Key

HTTP request headers

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

getCampaignById

CampaignResult getCampaignById(id)

Get campaign by id

Get campaign by id

Example

import radiomanager from 'radiomanager';
let defaultClient = radiomanager.ApiClient.instance;
// Configure API key authorization: API-Key
let API-Key = defaultClient.authentications['API-Key'];
API-Key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API-Key.apiKeyPrefix = 'Token';

let apiInstance = new radiomanager.CampaignApi();
let id = 789; // Number | ID of Campaign **(Required)**
apiInstance.getCampaignById(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number ID of Campaign (Required)

Return type

CampaignResult

Authorization

API-Key

HTTP request headers

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

listCampaigns

InlineResponse2004 listCampaigns(opts)

Get all campaigns.

List all campaigns.

Example

import radiomanager from 'radiomanager';
let defaultClient = radiomanager.ApiClient.instance;
// Configure API key authorization: API-Key
let API-Key = defaultClient.authentications['API-Key'];
API-Key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API-Key.apiKeyPrefix = 'Token';

let apiInstance = new radiomanager.CampaignApi();
let opts = {
  'itemId': 789, // Number | Search on Item ID *(Optional)* `(Relation)`
  'modelTypeId': 789, // Number | Search on ModelType ID *(Optional)* `(Relation)`
  'startMin': new Date("2013-10-20T19:20:30+01:00"), // Date | Minimum start date *(Optional)*
  'startMax': new Date("2013-10-20T19:20:30+01:00"), // Date | Maximum start date *(Optional)*
  'page': 1, // Number | Current page *(Optional)*
  'limit': 789, // Number | Results per page *(Optional)*
  'orderBy': "orderBy_example", // String | Field to order the results *(Optional)*
  'orderDirection': "orderDirection_example", // String | Direction of ordering *(Optional)*
  'externalStationId': 789 // Number | Query on a different (content providing) station *(Optional)*
};
apiInstance.listCampaigns(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
itemId Number Search on Item ID (Optional) `(Relation)` [optional]
modelTypeId Number Search on ModelType ID (Optional) `(Relation)` [optional]
startMin Date Minimum start date (Optional) [optional]
startMax Date Maximum start date (Optional) [optional]
page Number Current page (Optional) [optional] [default to 1]
limit Number Results per page (Optional) [optional]
orderBy String Field to order the results (Optional) [optional]
orderDirection String Direction of ordering (Optional) [optional]
externalStationId Number Query on a different (content providing) station (Optional) [optional]

Return type

InlineResponse2004

Authorization

API-Key

HTTP request headers

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

updateCampaignByID

InlineResponse202 updateCampaignByID(id, campaignDataInput)

Update campaign by id

Update campaign by id

Example

import radiomanager from 'radiomanager';
let defaultClient = radiomanager.ApiClient.instance;
// Configure API key authorization: API-Key
let API-Key = defaultClient.authentications['API-Key'];
API-Key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//API-Key.apiKeyPrefix = 'Token';

let apiInstance = new radiomanager.CampaignApi();
let id = 789; // Number | ID of Campaign **(Required)**
let campaignDataInput = new radiomanager.CampaignDataInput(); // CampaignDataInput | Data **(Optional)**
apiInstance.updateCampaignByID(id, campaignDataInput).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number ID of Campaign (Required)
campaignDataInput CampaignDataInput Data (Optional)

Return type

InlineResponse202

Authorization

API-Key

HTTP request headers

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