Skip to content

Latest commit

 

History

History
118 lines (78 loc) · 2.92 KB

GenreApi.md

File metadata and controls

118 lines (78 loc) · 2.92 KB

radiomanager.GenreApi

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

Method HTTP request Description
getGenreById GET /genres/{id} Get genre by id
listGenres GET /genres List all genres.

getGenreById

GenreResult getGenreById(id)

Get genre by id

Get genre 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.GenreApi();
let id = 789; // Number | 
apiInstance.getGenreById(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id Number

Return type

GenreResult

Authorization

API-Key

HTTP request headers

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

listGenres

InlineResponse2006 listGenres(opts)

List all genres.

List all genres.

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.GenreApi();
let opts = {
  '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)*
};
apiInstance.listGenres(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
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]

Return type

InlineResponse2006

Authorization

API-Key

HTTP request headers

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