PluginProbe
Radio Station by netmix® – Manage and play your Show Schedule in WordPress! / trunk
Radio Station by netmix® – Manage and play your Show Schedule in WordPress! vtrunk
2.7.1 trunk 2.2.6 2.2.7 2.2.8 2.3.0 2.3.1 2.3.2 2.3.3 2.3.3.1 2.3.3.2 2.3.3.3 2.3.3.4 2.3.3.5 2.3.3.6 2.3.3.7 2.3.3.8 2.3.3.9 2.4.0 2.4.0.3 2.4.0.4 2.4.0.5 2.4.0.6 2.4.0.7 2.4.0.8 All 44 releases
radio-station / docs / API.md

API.md in Radio Station by netmix® – Manage and play your Show Schedule in WordPress! trunk, at docs/API.md

129 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 Radio Station Plugin API
2
3 ***
4
5 Since 2.3.0, Radio Station includes an API for all of your Station data.
6
7 ## Data Endpoints
8
9 Data Endpoints for Schedule and Show Data are available via WordPress REST API Routes (if option enabled.)
10 Alternatively, they are also available via WordPress Feed Links (again if that option is enabled.)
11 Note the default output format for all data endpoints is JSON.
12
13 #### Station Data
14
15 All Endpoints add the following top level Station data to the output:
16
17 * *timezone*: Radio Timezone (via Plugin Settings)
18 * *stream_url*: Streaming URL (via Plugin Settings)
19 * *station_url*: Station Home URL (via `site_url()`)
20 * *schedule_url*: Schedule Page URL (via Plugin Settings)
21 * *language*: Main Station Language Code (eg. en_US)
22 * *timestamp*: UTC Generated Timestamp for the Request
23 * *date_time*: Generated Date Time Stamp (YY-mm-dd H:i:s)
24 * *endpoints*: List of data endpoints and URLs (array) Note this list will be REST API Routes or Feed URLs depending on which is used to make the request.
25 * *success*: set to true (1) on request success and false (0) on failure
26
27 #### Show Data
28
29 Each `[Show]` data array referenced in the below Endpoints has the following keys:
30
31 * *id*: Show ID
32 * *name*: Show Title
33 * *slug*: Show Slug
34 * *url*: Show Permalink URL
35 * *latest*: Latest Audio URL
36 * *website*: Show Website URL
37 * *hosts*: Array of Show Hosts (display *name* and profile *url*)
38 * *producers*: Array of Show Producers (display *name* and profile *url*)
39 * *genres*: Array of Show Genres
40 * *languages*: Array of Show Languages
41
42
43 ### Endpoint List
44
45 #### Radio Discovery Endpoint
46
47 **/wp-json/radio/** and/or **/feed/radio/**
48
49 This is the base discovery Endpoint for all the other Endpoints. If REST URL is used, this will list the REST Routes, and if Feed URL is used this will list the Feed Endpoints.
50
51 * *namespace*: The base namespace for all Endpoints (default is */radio*)
52 * *routes*: Data array of all the available Endpoints URLs
53
54
55
56
57 #### Station Endpoint
58
59 **/wp-json/radio/station/** and/or **/feed/radio/station/**
60
61 An Endpoint for retrieving *ALL* available Station data at once.
62
63 * *station*: Data array containing the Data from every other Endpoint below.
64
65 The Station data has the following keys, each containing the data for that Endpoint:
66
67 * *broadcast*: see Broadcast Endpoint
68 * *schedule*: see Schedule Endpoint
69 * *shows*: see Shows Endpoint
70 * *genres*: see Genres Endpoint
71 * *languages*: see Languages Endpoint
72
73 #### Broadcast Endpoint
74
75 **/wp-json/radio/broadcast/** and/or **/feed/radio/broadcast/**
76
77 Lists the Current Show and Next Scheduled Show.
78
79 * *current_show*: Currently Scheduled `[Show]` Details
80 * *next_show*: Next Scheduled `[Show]` Details
81
82 #### Schedule Endpoint
83
84 **/wp-json/radio/schedule/** and/or **/feed/radio/schedule/**
85
86 * *schedule*: Data array of weekly Show Schedule by Day (ordered by Shift Times)
87
88 Each Scheduled Shift has the following keys:
89
90 * *day*: Scheduled Shift Day
91 * *start*: Scheduled Shift Start Time
92 * *end*: Scheduled Show End Time
93 * *updated*: Last Updated Timestamp for the Show
94 * *encore*: Whether the Scheduled Shift is an encore (repeat) airing. 0 or 1
95 * *split*: Whether the Scheduled Shift is split overnight. 0 or 1
96 * *override*: Whether the Shift is a Schedule Override. 0 or 1
97 * *show*: Data array of `[Show]` Details for this Shift
98
99 #### Shows Endpoint
100
101 **/wp-json/radio/shows/** and/or **/feed/radio/shows/**
102
103 Optionally, a single or comma-separated `show` argument will retrieve specific Show information.
104
105 * *shows*: Data array of all `[Shows]` (ordered by Show Name)
106
107 #### Genres Endpoint
108
109 **/wp-json/radio/genres/** and/or **/feed/radio/genres/**
110
111 Optionally, a single or comma-separated `genre` argument will retrieve specific Genre information.
112
113 * *genres*: Data array of all Genres with all the `[Shows]` for each Genre.
114
115 #### Languages Endpoint
116
117 **/wp-json/radio/languages/** and/or **/feed/radio/languages/**
118
119 Optionally, a single or comma-separated `language` argument will retrieve specific Language information.
120
121 * *languages*: Data array of all Languages with all the `[Shows]` for each Language.
122
123 #### [Pro] Episodes Endpoint
124
125 #### [Pro] Hosts Endpoint
126
127 #### [Pro] Producers Endpoint
128
129