lib/Net/Async/Spotify/API/Generated/Shows.pm

filter: Statementstmt 50.0% 21 / 42 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 100% 3 / 3 totaltotal 54.7% 29 / 53 SCAR 1.2
CC
1
Cov
50%
get_a_show
2.0
get_a_shows_episodes
2.0
get_multiple_shows
2.0
CRAP 1.1
« lib/Net/Async/Spotify/API/Generated/Albums.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Episodes.pm »
1 package Net::Async::Spotify::API::Generated::Shows;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.001'; # VERSION
7 2 our $AUTHORITY = 'cpan:VNEALV'; # AUTHORITY
8  
9 2 ▶use mro;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use parent qw(Net::Async::Spotify::API::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 ▶use Future::AsyncAwait;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 =encoding utf8
15  
16 =head1 NAME
17  
18 Net::Async::Spotify::API::Generated::Shows - Package representing Spotify Shows API
19  
20 =head1 DESCRIPTION
21  
22 Autogenerated module.
23 Based on https://developer.spotify.com/documentation/web-api/reference/#reference-index
24 Check C<crawl-api-doc.pl> for more information.
25  
26 =head1 METHODS
27  
28 =cut
29  
30 =head2 get_a_show
31  
32 get_a_show - Get a Show
33  
34 Get Spotify catalog information for a single show identified by its
35 unique Spotify ID.
36  
37 with Request details being:
38  
39 =head3 header
40  
41 =over 4
42  
43 =item Authorization
44  
45 Type: string | Required: required
46 A valid access token from the Spotify Accounts service:
47 see the Web API Authorization Guide
48 for details.
49  
50 =back
51  
52 =head3 path_parameter
53  
54 =over 4
55  
56 =item id
57  
58 Type: string | Required: required
59 The Spotify ID
60 for the show.
61  
62 =back
63  
64 =head3 query_parameter
65  
66 =over 4
67  
68 =item market
69  
70 Type: string | Required: optional
71 An ISO 3166-1 alpha-2 country code.
72 If a country code is specified, only shows and episodes that are available in that market will be returned.
73 If a valid user access token is specified in the request header, the country associated with
74 the user account will take priority over this parameter.
75 Note: If neither market or user country are provided, the content is considered unavailable for the client.
76 Users can view the country that is associated with their account in the account settings.
77  
78 =back
79  
80 and Response Objects being:
81  
82 - show object
83  
84  
85 On success, the HTTP status code in the response header is 200
86 OK and the response body contains a show object
87 in JSON format.
88 On error, the header status code is an error code
89 and the response body contains an error object.
90 If a show is unavailable in the given market the HTTP status code in the response header is 404 NOT FOUND.Try in our Web Console
91  
92 =cut
93  
94 0 ▶async sub get_a_show {
Subroutine get_a_show: not called CC=1 SCAR=6.9
Pod documented
95 0 my ($self, %args) = @_;
96  
97 0 my $request->{method} = 'GET';
98 0 $request->{uri} = 'https://api.spotify.com/v1/shows/{id}';
99 $request->{param} = {
100 0 header => {
101 'Authorization' => {
102 type => 'string',
103 required => 'required',
104 },
105 },
106 path_parameter => {
107 'id' => {
108 type => 'string',
109 required => 'required',
110 },
111 },
112 query_parameter => {
113 'market' => {
114 type => 'string',
115 required => 'optional',
116 },
117 },
118 };
119 0 my $response_objs = [
120 'show object',
121  
122 ];
123  
124 0 await $self->call_api($request, $response_objs, %args);
125 2 }
126  
127 =head2 get_a_shows_episodes
128  
129 get_a_shows_episodes - Get a Show's Episodes
130  
131 Get Spotify catalog information about an show’s episodes. Optional parameters can be used to limit the number of episodes returned.
132  
133 with Request details being:
134  
135 =head3 header
136  
137 =over 4
138  
139 =item Authorization
140  
141 Type: string | Required: required
142 valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.
143  
144 =back
145  
146 =head3 path_parameter
147  
148 =over 4
149  
150 =item id
151  
152 Type: string | Required: required
153 The Spotify ID for the show.
154  
155 =back
156  
157 =head3 query_parameter
158  
159 =over 4
160  
161 =item limit
162  
163 Type: integer | Required: optional
164 The maximum number of episodes to return. Default: 20. Minimum: 1. Maximum: 50.
165  
166 =item market
167  
168 Type: string | Required: optional
169 An ISO 3166-1 alpha-2 country code.
170 If a country code is specified, only shows and episodes that are available in that market will be returned.
171 If a valid user access token is specified in the request header, the country associated with
172 the user account will take priority over this parameter.
173 Note: If neither market or user country are provided, the content is considered unavailable for the client.
174 Users can view the country that is associated with their account in the account settings.
175  
176 =item offset
177  
178 Type: integer | Required: optional
179 The index of the first episode to return. Default: 0 (the first object). Use with limit to get the next set of episodes.
180  
181 =back
182  
183 and Response Objects being:
184  
185 - episode object
186  
187  
188 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of simplified episode objects (wrapped in a paging object) in JSON format.
189 On error, the header status code is an error code and the response body contains an error object.
190 If a show is unavailable in the given market the HTTP status code in the response header is 404 NOT FOUND. Unavailable episodes are filtered out.Try in our Web Console
191  
192 =cut
193  
194 0 ▶async sub get_a_shows_episodes {
Subroutine get_a_shows_episodes: not called CC=1 SCAR=6.9
Pod documented
195 0 my ($self, %args) = @_;
196  
197 0 my $request->{method} = 'GET';
198 0 $request->{uri} = 'https://api.spotify.com/v1/shows/{id}/episodes';
199 $request->{param} = {
200 0 header => {
201 'Authorization' => {
202 type => 'string',
203 required => 'required',
204 },
205 },
206 path_parameter => {
207 'id' => {
208 type => 'string',
209 required => 'required',
210 },
211 },
212 query_parameter => {
213 'limit' => {
214 type => 'integer',
215 required => 'optional',
216 },
217 'market' => {
218 type => 'string',
219 required => 'optional',
220 },
221 'offset' => {
222 type => 'integer',
223 required => 'optional',
224 },
225 },
226 };
227 0 my $response_objs = [
228 'episode object',
229  
230 ];
231  
232 0 await $self->call_api($request, $response_objs, %args);
233 2 }
234  
235 =head2 get_multiple_shows
236  
237 get_multiple_shows - Get Multiple Shows
238  
239 Get Spotify catalog information for several shows based on their Spotify IDs.
240  
241 with Request details being:
242  
243 =head3 header
244  
245 =over 4
246  
247 =item Authorization
248  
249 Type: string | Required: required
250 A valid access token from the Spotify Accounts service:
251 see the Web API Authorization Guide
252 for details.
253  
254 =back
255  
256 =head3 query_parameter
257  
258 =over 4
259  
260 =item ids
261  
262 Type: string | Required: required
263 A comma-separated list of the Spotify IDs for the shows. Maximum: 50 IDs.
264  
265 =item market
266  
267 Type: string | Required: optional
268 An ISO 3166-1 alpha-2 country code.
269 If a country code is specified, only shows and episodes that are available in that market will be returned.
270 If a valid user access token is specified in the request header, the country associated with
271 the user account will take priority over this parameter.
272 Note: If neither market or user country are provided, the content is considered unavailable for the client.
273 Users can view the country that is associated with their account in the account settings.
274  
275 =back
276  
277 and Response Objects being:
278  
279 - an object
280 - an object
281  
282  
283 On success, the HTTP status code in the response header is 200
284 OK and the response body contains an object whose key is shows and whose
285 value is an array of simple show object
286 in JSON format.Objects are returned in the order requested. If an object is not found, a null value is returned in the appropriate position. If a show is unavailable in the given market, a null value is returned. Duplicate ids in the query will result in duplicate objects in the response. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
287  
288 =cut
289  
290 0 ▶async sub get_multiple_shows {
Subroutine get_multiple_shows: not called CC=1 SCAR=6.9
Pod documented
291 0 my ($self, %args) = @_;
292  
293 0 my $request->{method} = 'GET';
294 0 $request->{uri} = 'https://api.spotify.com/v1/shows';
295 $request->{param} = {
296 0 header => {
297 'Authorization' => {
298 type => 'string',
299 required => 'required',
300 },
301 },
302 query_parameter => {
303 'ids' => {
304 type => 'string',
305 required => 'required',
306 },
307 'market' => {
308 type => 'string',
309 required => 'optional',
310 },
311 },
312 };
313 0 my $response_objs = [
314 'an object',
315 'an object',
316  
317 ];
318  
319 0 await $self->call_api($request, $response_objs, %args);
320 2 }
321  
322 2 1;
« lib/Net/Async/Spotify/API/Generated/Albums.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Episodes.pm »