Skip to content

Latest commit

 

History

History
288 lines (222 loc) · 9.31 KB

BlockApi.md

File metadata and controls

288 lines (222 loc) · 9.31 KB

RadioManager.Api.BlockApi

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

Method HTTP request Description
GetBlockById GET /blocks/{id} Get block by id
GetCurrentBlock GET /blocks/current Get current Block
GetNextBlock GET /blocks/next Get upcoming Block
ListBlocks GET /blocks Get a list of all blocks currently in your station.

GetBlockById

BlockResult GetBlockById (long? id, long? externalStationId = null)

Get block by id

Get block by id

Example

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

namespace Example
{
    public class GetBlockByIdExample
    {
        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 BlockApi();
            var id = 789;  // long? | ID of Block **(Required)**
            var externalStationId = 789;  // long? | Query on a different (content providing) station *(Optional)* (optional) 

            try
            {
                // Get block by id
                BlockResult result = apiInstance.GetBlockById(id, externalStationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BlockApi.GetBlockById: " + e.Message );
            }
        }
    }
}

Parameters

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

Return type

BlockResult

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]

GetCurrentBlock

BlockResult GetCurrentBlock ()

Get current Block

Get current Block

Example

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

namespace Example
{
    public class GetCurrentBlockExample
    {
        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 BlockApi();

            try
            {
                // Get current Block
                BlockResult result = apiInstance.GetCurrentBlock();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BlockApi.GetCurrentBlock: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

BlockResult

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]

GetNextBlock

BlockResult GetNextBlock ()

Get upcoming Block

Get upcoming Block

Example

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

namespace Example
{
    public class GetNextBlockExample
    {
        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 BlockApi();

            try
            {
                // Get upcoming Block
                BlockResult result = apiInstance.GetNextBlock();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BlockApi.GetNextBlock: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

BlockResult

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]

ListBlocks

BlockResults ListBlocks (long? page = null, long? broadcastId = null, long? itemId = null, long? programId = null, DateTime? startMin = null, DateTime? startMax = null, long? limit = null, string orderBy = null, string orderDirection = null, long? externalStationId = null)

Get a list of all blocks currently in your station.

Get a list of all blocks currently in your station. This feature supports pagination and will give a maximum of 50 blocks back.

Example

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

namespace Example
{
    public class ListBlocksExample
    {
        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 BlockApi();
            var page = 789;  // long? | Current page *(Optional)* (optional)  (default to 1)
            var broadcastId = 789;  // long? | Search on Broadcast ID *(Optional)* `(Relation)` (optional) 
            var itemId = 789;  // long? | Search on Item ID *(Optional)* `(Relation)` (optional) 
            var programId = 789;  // long? | Search on Program ID *(Optional)* `(Relation)` (optional) 
            var startMin = 2013-10-20T19:20:30+01:00;  // DateTime? | Minimum start date *(Optional)* (optional) 
            var startMax = 2013-10-20T19:20:30+01:00;  // DateTime? | Maximum start date *(Optional)* (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
            {
                // Get a list of all blocks currently in your station.
                BlockResults result = apiInstance.ListBlocks(page, broadcastId, itemId, programId, startMin, startMax, limit, orderBy, orderDirection, externalStationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BlockApi.ListBlocks: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
page long? Current page (Optional) [optional] [default to 1]
broadcastId long? Search on Broadcast ID (Optional) `(Relation)` [optional]
itemId long? Search on Item ID (Optional) `(Relation)` [optional]
programId long? Search on Program ID (Optional) `(Relation)` [optional]
startMin DateTime? Minimum start date (Optional) [optional]
startMax DateTime? Maximum start date (Optional) [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

BlockResults

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]