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

filter: Statementstmt 39.6% 23 / 58 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 5 / 10 Podpod 100% 5 / 5 totaltotal 45.2% 33 / 73 SCAR 2.0
CC
1
Cov
40%
get_an_artist
2.0
get_an_artists_albums
2.0
get_an_artists_related_artists
2.0
CRAP 1.2
« lib/Net/Async/Spotify/API/Generated/Follow.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Tracks.pm »
1 package Net::Async::Spotify::API::Generated::Artists;
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::Artists - Package representing Spotify Artists 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_an_artist
31  
32 get_an_artist - Get an Artist
33  
34 Get Spotify catalog information for a single artist identified by their unique Spotify ID.
35  
36 with Request details being:
37  
38 =head3 header
39  
40 =over 4
41  
42 =item Authorization
43  
44 Type: string | Required: required
45 A valid user access token or your client credentials.
46  
47 =back
48  
49 =head3 path_parameter
50  
51 =over 4
52  
53 =item id
54  
55 Type: string | Required: required
56 The Spotify ID of the artist.
57  
58 =back
59  
60 and Response Objects being:
61  
62 - artist object
63  
64  
65 On success, the HTTP status code in the response header is 200 OK and the response body contains an artist object in JSON format. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
66  
67 =cut
68  
69 0 ▶async sub get_an_artist {
Subroutine get_an_artist: not called CC=1 SCAR=6.9
Pod documented
70 0 my ($self, %args) = @_;
71  
72 0 my $request->{method} = 'GET';
73 0 $request->{uri} = 'https://api.spotify.com/v1/artists/{id}';
74 $request->{param} = {
75 0 header => {
76 'Authorization' => {
77 type => 'string',
78 required => 'required',
79 },
80 },
81 path_parameter => {
82 'id' => {
83 type => 'string',
84 required => 'required',
85 },
86 },
87 };
88 0 my $response_objs = [
89 'artist object',
90  
91 ];
92  
93 0 await $self->call_api($request, $response_objs, %args);
94 2 }
95  
96 =head2 get_an_artists_albums
97  
98 get_an_artists_albums - Get an Artist's Albums
99  
100 Get Spotify catalog information about an artist’s albums.
101  
102 with Request details being:
103  
104 =head3 header
105  
106 =over 4
107  
108 =item Authorization
109  
110 Type: string | Required: required
111 A valid user access token or your client credentials.
112  
113 =back
114  
115 =head3 path_parameter
116  
117 =over 4
118  
119 =item id
120  
121 Type: string | Required: required
122 The Spotify ID for the artist.
123  
124 =back
125  
126 =head3 query_parameter
127  
128 =over 4
129  
130 =item include_groups
131  
132 Type: string | Required: optional
133 A comma-separated list of keywords that will be used to filter the response. If not supplied, all album types will be returned. Valid values are:- album- single- appears_on- compilationFor example: include_groups=album,single.
134  
135 =item limit
136  
137 Type: integer | Required: optional
138 The number of album objects to return. Default: 20. Minimum: 1. Maximum: 50. For example: limit=2
139  
140 =item market
141  
142 Type: string | Required: optional
143 Synonym for country. An ISO 3166-1 alpha-2 country code or the string from_token.Supply this parameter to limit the response to one particular geographical market. For example, for albums available in Sweden: market=SE.If not given, results will be returned for all markets and you are likely to get duplicate results per album, one for each market in which the album is available!
144  
145 =item offset
146  
147 Type: integer | Required: optional
148 The index of the first album to return. Default: 0 (i.e., the first album). Use with limit to get the next set of albums.
149  
150 =back
151  
152 and Response Objects being:
153  
154 - album object
155  
156  
157 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of simplified album objects (wrapped in a paging object) in JSON format. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
158  
159 =cut
160  
161 0 ▶async sub get_an_artists_albums {
Subroutine get_an_artists_albums: not called CC=1 SCAR=6.9
Pod documented
162 0 my ($self, %args) = @_;
163  
164 0 my $request->{method} = 'GET';
165 0 $request->{uri} = 'https://api.spotify.com/v1/artists/{id}/albums';
166 $request->{param} = {
167 0 header => {
168 'Authorization' => {
169 type => 'string',
170 required => 'required',
171 },
172 },
173 path_parameter => {
174 'id' => {
175 type => 'string',
176 required => 'required',
177 },
178 },
179 query_parameter => {
180 'include_groups' => {
181 type => 'string',
182 required => 'optional',
183 },
184 'limit' => {
185 type => 'integer',
186 required => 'optional',
187 },
188 'market' => {
189 type => 'string',
190 required => 'optional',
191 },
192 'offset' => {
193 type => 'integer',
194 required => 'optional',
195 },
196 },
197 };
198 0 my $response_objs = [
199 'album object',
200  
201 ];
202  
203 0 await $self->call_api($request, $response_objs, %args);
204 2 }
205  
206 =head2 get_an_artists_related_artists
207  
208 get_an_artists_related_artists - Get an Artist's Related Artists
209  
210 Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community’s listening history.
211  
212 with Request details being:
213  
214 =head3 header
215  
216 =over 4
217  
218 =item Authorization
219  
220 Type: string | Required: required
221 A valid user access token or your client credentials.
222  
223 =back
224  
225 =head3 path_parameter
226  
227 =over 4
228  
229 =item id
230  
231 Type: string | Required: required
232 The Spotify ID for the artist
233  
234 =back
235  
236 and Response Objects being:
237  
238 - an object
239  
240  
241 On success, the HTTP status code in the response header is 200 OK and the response body contains an object whose key is "artists" and whose value is an array of up to 20 artist objects in JSON format. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
242  
243 =cut
244  
245 0 ▶async sub get_an_artists_related_artists {
Subroutine get_an_artists_related_artists: not called CC=1 SCAR=6.9
Pod documented
246 0 my ($self, %args) = @_;
247  
248 0 my $request->{method} = 'GET';
249 0 $request->{uri} = 'https://api.spotify.com/v1/artists/{id}/related-artists';
250 $request->{param} = {
251 0 header => {
252 'Authorization' => {
253 type => 'string',
254 required => 'required',
255 },
256 },
257 path_parameter => {
258 'id' => {
259 type => 'string',
260 required => 'required',
261 },
262 },
263 };
264 0 my $response_objs = [
265 'an object',
266  
267 ];
268  
269 0 await $self->call_api($request, $response_objs, %args);
270 2 }
271  
272 =head2 get_an_artists_top_tracks
273  
274 get_an_artists_top_tracks - Get an Artist's Top Tracks
275  
276 Get Spotify catalog information about an artist’s top tracks by country.
277  
278 with Request details being:
279  
280 =head3 header
281  
282 =over 4
283  
284 =item Authorization
285  
286 Type: string | Required: required
287 A valid user access token or your client credentials.
288  
289 =back
290  
291 =head3 path_parameter
292  
293 =over 4
294  
295 =item id
296  
297 Type: string | Required: required
298 The Spotify ID for the artist
299  
300 =back
301  
302 =head3 query_parameter
303  
304 =over 4
305  
306 =item market
307  
308 Type: string | Required: required
309 An ISO 3166-1 alpha-2 country code or the string from_token. Synonym for country.
310  
311 =back
312  
313 and Response Objects being:
314  
315 - an object
316  
317  
318 On success, the HTTP status code in the response header is 200 OK and the response body contains an object whose key is "tracks" and whose value is an array of up to 10 track objects in JSON format. On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
319  
320 =cut
321  
322 0 ▶async sub get_an_artists_top_tracks {
Subroutine get_an_artists_top_tracks: not called CC=1 SCAR=6.9
Pod documented
323 0 my ($self, %args) = @_;
324  
325 0 my $request->{method} = 'GET';
326 0 $request->{uri} = 'https://api.spotify.com/v1/artists/{id}/top-tracks';
327 $request->{param} = {
328 0 header => {
329 'Authorization' => {
330 type => 'string',
331 required => 'required',
332 },
333 },
334 path_parameter => {
335 'id' => {
336 type => 'string',
337 required => 'required',
338 },
339 },
340 query_parameter => {
341 'market' => {
342 type => 'string',
343 required => 'required',
344 },
345 },
346 };
347 0 my $response_objs = [
348 'an object',
349  
350 ];
351  
352 0 await $self->call_api($request, $response_objs, %args);
353 2 }
354  
355 =head2 get_multiple_artists
356  
357 get_multiple_artists - Get Multiple Artists
358  
359 Get Spotify catalog information for several artists based on their Spotify IDs.
360  
361 with Request details being:
362  
363 =head3 header
364  
365 =over 4
366  
367 =item Authorization
368  
369 Type: string | Required: required
370 A valid user access token or your client credentials.
371  
372 =back
373  
374 =head3 query_parameter
375  
376 =over 4
377  
378 =item ids
379  
380 Type: string | Required: required
381 A comma-separated list of the Spotify IDs for the artists. Maximum: 50 IDs.
382  
383 =back
384  
385 and Response Objects being:
386  
387 - an object
388 - an object
389  
390  
391 On success, the HTTP status code in the response header is 200 OK and the response body contains an object whose key is "artists" and whose value is an array of artist objects 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. 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
392  
393 =cut
394  
395 0 ▶async sub get_multiple_artists {
Subroutine get_multiple_artists: not called CC=1 SCAR=6.9
Pod documented
396 0 my ($self, %args) = @_;
397  
398 0 my $request->{method} = 'GET';
399 0 $request->{uri} = 'https://api.spotify.com/v1/artists';
400 $request->{param} = {
401 0 header => {
402 'Authorization' => {
403 type => 'string',
404 required => 'required',
405 },
406 },
407 query_parameter => {
408 'ids' => {
409 type => 'string',
410 required => 'required',
411 },
412 },
413 };
414 0 my $response_objs = [
415 'an object',
416 'an object',
417  
418 ];
419  
420 0 await $self->call_api($request, $response_objs, %args);
421 2 }
422  
423 2 1;
« lib/Net/Async/Spotify/API/Generated/Follow.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Tracks.pm »