Skip to content

Latest commit

 

History

History
158 lines (122 loc) · 5.5 KB

GenreApi.md

File metadata and controls

158 lines (122 loc) · 5.5 KB

RadioManager.Api.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 (long? id, long? externalStationId = null)

Get genre by id

Get genre by id

Example

using System;
using System.Diagnostics;
using RadioManager.Api;
using RadioManager.Client;
using RadioManager.Model;

namespace Example
{
    public class GetGenreByIdExample
    {
        public void main()
        {
            // Configure API key authorization: API Key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");

            var apiInstance = new GenreApi();
            var id = 789;  // long? | ID of Genre **(Required)**
            var externalStationId = 789;  // long? | Query on a different (content providing) station *(Optional)* (optional) 

            try
            {
                // Get genre by id
                GenreResult result = apiInstance.GetGenreById(id, externalStationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GenreApi.GetGenreById: " + e.Message );
            }
        }
    }
}

Parameters

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

Return type

GenreResult

Authorization

[API Key](../README.md#API Key)

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListGenres

GenreResults ListGenres (long? page = null, long? parentId = null, long? programId = null, long? broadcastId = null, long? limit = null, string orderBy = null, string orderDirection = null, long? externalStationId = null)

List all genres.

List all genres.

Example

using System;
using System.Diagnostics;
using RadioManager.Api;
using RadioManager.Client;
using RadioManager.Model;

namespace Example
{
    public class ListGenresExample
    {
        public void main()
        {
            // Configure API key authorization: API Key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");

            var apiInstance = new GenreApi();
            var page = 789;  // long? | Current page *(Optional)* (optional) 
            var parentId = 789;  // long? | Search on Parent ID of Genre *(Optional)* (optional) 
            var programId = 789;  // long? | Search on Program ID *(Optional)* `(Relation)` (optional) 
            var broadcastId = 789;  // long? | Search on Broadcast ID *(Optional)* `(Relation)` (optional) 
            var limit = 789;  // long? | Results per page *(Optional)* (optional) 
            var orderBy = orderBy_example;  // string | Field to order the results *(Optional)* (optional) 
            var orderDirection = orderDirection_example;  // string | Direction of ordering *(Optional)* (optional) 
            var externalStationId = 789;  // long? | Query on a different (content providing) station *(Optional)* (optional) 

            try
            {
                // List all genres.
                GenreResults result = apiInstance.ListGenres(page, parentId, programId, broadcastId, limit, orderBy, orderDirection, externalStationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GenreApi.ListGenres: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
page long? Current page (Optional) [optional]
parentId long? Search on Parent ID of Genre (Optional) [optional]
programId long? Search on Program ID (Optional) `(Relation)` [optional]
broadcastId long? Search on Broadcast ID (Optional) `(Relation)` [optional]
limit long? Results per page (Optional) [optional]
orderBy string Field to order the results (Optional) [optional]
orderDirection string Direction of ordering (Optional) [optional]
externalStationId long? Query on a different (content providing) station (Optional) [optional]

Return type

GenreResults

Authorization

[API Key](../README.md#API Key)

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]