Skip to content

Latest commit

 

History

History
285 lines (191 loc) · 7.94 KB

ContactApi.md

File metadata and controls

285 lines (191 loc) · 7.94 KB

radiomanager.ContactApi

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

Method HTTP request Description
createContact POST /contacts Create contact.
deleteContactById DELETE /contacts/{id} Delete contact by id
getContactById GET /contacts/{id} Get contact by id
listContacts GET /contacts Get all contacts.
updateContactByID PATCH /contacts/{id} Update contact by id

createContact

InlineResponse2002 createContact(contactDataInput)

Create contact.

Create contact.

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.ContactApi();
let contactDataInput = new radiomanager.ContactDataInput(); // ContactDataInput | Data **(Required)**
apiInstance.createContact(contactDataInput).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
contactDataInput ContactDataInput Data (Required)

Return type

InlineResponse2002

Authorization

API-Key

HTTP request headers

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

deleteContactById

InlineResponse202 deleteContactById(id)

Delete contact by id

Delete contact 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.ContactApi();
let id = 789; // Number | ID of Contact **(Required)**
apiInstance.deleteContactById(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

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

Return type

InlineResponse202

Authorization

API-Key

HTTP request headers

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

getContactById

ContactResult getContactById(id, opts)

Get contact by id

Get contact 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.ContactApi();
let id = 789; // Number | ID of Contact **(Required)**
let opts = {
  'externalStationId': 789 // Number | Query on a different (content providing) station *(Optional)*
};
apiInstance.getContactById(id, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number ID of Contact (Required)
externalStationId Number Query on a different (content providing) station (Optional) [optional]

Return type

ContactResult

Authorization

API-Key

HTTP request headers

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

listContacts

InlineResponse2005 listContacts(opts)

Get all contacts.

List all contacts.

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.ContactApi();
let opts = {
  'itemId': 789, // Number | Search on Item ID *(Optional)* `(Relation)`
  'modelTypeId': 789, // Number | Search on ModelType ID *(Optional)* `(Relation)`
  'tagId': 789, // Number | Search on Tag ID *(Optional)* `(Relation)`
  '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.listContacts(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]
tagId Number Search on Tag ID (Optional) `(Relation)` [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

InlineResponse2005

Authorization

API-Key

HTTP request headers

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

updateContactByID

InlineResponse202 updateContactByID(id, contactDataInput)

Update contact by id

Update contact 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.ContactApi();
let id = 789; // Number | ID of Contact **(Required)**
let contactDataInput = new radiomanager.ContactDataInput(); // ContactDataInput | Data *(Optional)*
apiInstance.updateContactByID(id, contactDataInput).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number ID of Contact (Required)
contactDataInput ContactDataInput Data (Optional)

Return type

InlineResponse202

Authorization

API-Key

HTTP request headers

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