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

filter: Statementstmt 33.7% 25 / 74 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 41.6% 5 / 12 Podpod 100% 7 / 7 totaltotal 39.7% 37 / 93 SCAR 2.5
CC
1
Cov
34%
get_a_categories_playlists
2.0
get_a_category
2.0
get_categories
2.0
CRAP 1.3
« lib/Net/Async/Spotify/API/Generated/Playlists.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Follow.pm »
1 package Net::Async::Spotify::API::Generated::Browse;
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::Browse - Package representing Spotify Browse 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_categories_playlists
31  
32 get_a_categories_playlists - Get a Category's Playlists
33  
34 Get a list of Spotify playlists tagged with a particular category.
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 category_id
54  
55 Type: string | Required: required
56 The Spotify category ID for the category.
57  
58 =back
59  
60 =head3 query_parameter
61  
62 =over 4
63  
64 =item country
65  
66 Type: string | Required: optional
67 A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country.
68  
69 =item limit
70  
71 Type: integer | Required: optional
72 The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
73  
74 =item offset
75  
76 Type: integer | Required: optional
77 The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.
78  
79 =back
80  
81 and Response Objects being:
82  
83 - playlist object
84  
85  
86 On success, the HTTP status code in the response header is 200 OK and the response body contains an array of simplified playlist 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.Once you have retrieved the list, you can use Get a Playlist and Get a Playlist’s Tracks to drill down further.Try in our Web Console
87  
88 =cut
89  
90 0 ▶async sub get_a_categories_playlists {
Subroutine get_a_categories_playlists: not called CC=1 SCAR=6.9
Pod documented
91 0 my ($self, %args) = @_;
92  
93 0 my $request->{method} = 'GET';
94 0 $request->{uri} = 'https://api.spotify.com/v1/browse/categories/{category_id}/playlists';
95 $request->{param} = {
96 0 header => {
97 'Authorization' => {
98 type => 'string',
99 required => 'required',
100 },
101 },
102 path_parameter => {
103 'category_id' => {
104 type => 'string',
105 required => 'required',
106 },
107 },
108 query_parameter => {
109 'country' => {
110 type => 'string',
111 required => 'optional',
112 },
113 'limit' => {
114 type => 'integer',
115 required => 'optional',
116 },
117 'offset' => {
118 type => 'integer',
119 required => 'optional',
120 },
121 },
122 };
123 0 my $response_objs = [
124 'playlist object',
125  
126 ];
127  
128 0 await $self->call_api($request, $response_objs, %args);
129 2 }
130  
131 =head2 get_a_category
132  
133 get_a_category - Get a Category
134  
135 Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
136  
137 with Request details being:
138  
139 =head3 header
140  
141 =over 4
142  
143 =item Authorization
144  
145 Type: string | Required: required
146 A valid user access token or your client credentials.
147  
148 =back
149  
150 =head3 path_parameter
151  
152 =over 4
153  
154 =item category_id
155  
156 Type: string | Required: required
157 The Spotify category ID for the category.
158  
159 =back
160  
161 =head3 query_parameter
162  
163 =over 4
164  
165 =item country
166  
167 Type: string | Required: optional
168 A country: an ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country.
169  
170 =item locale
171  
172 Type: string | Required: optional
173 The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the category strings returned in a particular language. Note that, if locale is not supplied, or if the specified language is not available, the category strings returned will be in the Spotify default language (American English).
174  
175 =back
176  
177 and Response Objects being:
178  
179 - category object
180  
181  
182 On success, the HTTP status code in the response header is 200 OK and the response body contains a category object in JSON format. On error, the header status code is an error code and the response body contains an error object.Once you have retrieved the category, you can use Get a Category’s Playlists to drill down further.Try in our Web Console
183  
184 =cut
185  
186 0 ▶async sub get_a_category {
Subroutine get_a_category: not called CC=1 SCAR=6.9
Pod documented
187 0 my ($self, %args) = @_;
188  
189 0 my $request->{method} = 'GET';
190 0 $request->{uri} = 'https://api.spotify.com/v1/browse/categories/{category_id}';
191 $request->{param} = {
192 0 header => {
193 'Authorization' => {
194 type => 'string',
195 required => 'required',
196 },
197 },
198 path_parameter => {
199 'category_id' => {
200 type => 'string',
201 required => 'required',
202 },
203 },
204 query_parameter => {
205 'country' => {
206 type => 'string',
207 required => 'optional',
208 },
209 'locale' => {
210 type => 'string',
211 required => 'optional',
212 },
213 },
214 };
215 0 my $response_objs = [
216 'category object',
217  
218 ];
219  
220 0 await $self->call_api($request, $response_objs, %args);
221 2 }
222  
223 =head2 get_categories
224  
225 get_categories - Get All Categories
226  
227 Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
228  
229 with Request details being:
230  
231 =head3 header
232  
233 =over 4
234  
235 =item Authorization
236  
237 Type: string | Required: required
238 A valid user access token or your client credentials.
239  
240 =back
241  
242 =head3 query_parameter
243  
244 =over 4
245  
246 =item country
247  
248 Type: string | Required: optional
249 A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to narrow the list of returned categories to those relevant to a particular country. If omitted, the returned items will be globally relevant.
250  
251 =item limit
252  
253 Type: integer | Required: optional
254 The maximum number of categories to return. Default: 20. Minimum: 1. Maximum: 50.
255  
256 =item locale
257  
258 Type: string | Required: optional
259 The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”. Provide this parameter if you want the category metadata returned in a particular language. Note that, if locale is not supplied, or if the specified language is not available, all strings will be returned in the Spotify default language (American English). The locale parameter, combined with the country parameter, may give odd results if not carefully matched. For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings.
260  
261 =item offset
262  
263 Type: integer | Required: optional
264 The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of categories.
265  
266 =back
267  
268 and Response Objects being:
269  
270 - an object
271  
272  
273 On success, the HTTP status code in the response header is 200 OK and the response body contains an object with a categories field, with an array of category 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.Once you have retrieved the list, you can use Get a Category to drill down further.Try in our Web Console
274  
275 =cut
276  
277 0 ▶async sub get_categories {
Subroutine get_categories: not called CC=1 SCAR=6.9
Pod documented
278 0 my ($self, %args) = @_;
279  
280 0 my $request->{method} = 'GET';
281 0 $request->{uri} = 'https://api.spotify.com/v1/browse/categories';
282 $request->{param} = {
283 0 header => {
284 'Authorization' => {
285 type => 'string',
286 required => 'required',
287 },
288 },
289 query_parameter => {
290 'country' => {
291 type => 'string',
292 required => 'optional',
293 },
294 'limit' => {
295 type => 'integer',
296 required => 'optional',
297 },
298 'locale' => {
299 type => 'string',
300 required => 'optional',
301 },
302 'offset' => {
303 type => 'integer',
304 required => 'optional',
305 },
306 },
307 };
308 0 my $response_objs = [
309 'an object',
310  
311 ];
312  
313 0 await $self->call_api($request, $response_objs, %args);
314 2 }
315  
316 =head2 get_featured_playlists
317  
318 get_featured_playlists - Get All Featured Playlists
319  
320 Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab).
321  
322 with Request details being:
323  
324 =head3 header
325  
326 =over 4
327  
328 =item Authorization
329  
330 Type: string | Required: required
331 A valid user access token or your client credentials.
332  
333 =back
334  
335 =head3 query_parameter
336  
337 =over 4
338  
339 =item country
340  
341 Type: string | Required: optional
342 A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.
343  
344 =item limit
345  
346 Type: integer | Required: optional
347 The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
348  
349 =item locale
350  
351 Type: string | Required: optional
352 The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”. Provide this parameter if you want the results returned in a particular language (where available). Note that, if locale is not supplied, or if the specified language is not available, all strings will be returned in the Spotify default language (American English). The locale parameter, combined with the country parameter, may give odd results if not carefully matched. For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings.
353  
354 =item offset
355  
356 Type: integer | Required: optional
357 The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.
358  
359 =item timestamp
360  
361 Type: string | Required: optional
362 A timestamp in ISO 8601 format: yyyy-MM-ddTHH:mm:ss. Use this parameter to specify the user’s local time to get results tailored for that specific date and time in the day. If not provided, the response defaults to the current UTC time. Example: “2014-10-23T09:00:00” for a user whose local time is 9AM. If there were no featured playlists (or there is no data) at the specified time, the response will revert to the current UTC time.
363  
364 =back
365  
366 and Response Objects being:
367  
368 - playlist object
369 - playlist object
370  
371  
372 On success, the HTTP status code in the response header is 200 OK and the response body contains a message and a playlists object. The playlists object contains an array of simplified playlist 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.Once you have retrieved the list of playlist objects, you can use Get a Playlist and Get a Playlist’s Tracks to drill down further.Try in our Web Console
373  
374 =cut
375  
376 0 ▶async sub get_featured_playlists {
Subroutine get_featured_playlists: not called CC=1 SCAR=6.9
Pod documented
377 0 my ($self, %args) = @_;
378  
379 0 my $request->{method} = 'GET';
380 0 $request->{uri} = 'https://api.spotify.com/v1/browse/featured-playlists';
381 $request->{param} = {
382 0 header => {
383 'Authorization' => {
384 type => 'string',
385 required => 'required',
386 },
387 },
388 query_parameter => {
389 'country' => {
390 type => 'string',
391 required => 'optional',
392 },
393 'limit' => {
394 type => 'integer',
395 required => 'optional',
396 },
397 'locale' => {
398 type => 'string',
399 required => 'optional',
400 },
401 'offset' => {
402 type => 'integer',
403 required => 'optional',
404 },
405 'timestamp' => {
406 type => 'string',
407 required => 'optional',
408 },
409 },
410 };
411 0 my $response_objs = [
412 'playlist object',
413 'playlist object',
414  
415 ];
416  
417 0 await $self->call_api($request, $response_objs, %args);
418 2 }
419  
420 =head2 get_new_releases
421  
422 get_new_releases - Get All New Releases
423  
424 Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).
425  
426 with Request details being:
427  
428 =head3 header
429  
430 =over 4
431  
432 =item Authorization
433  
434 Type: string | Required: required
435 A valid user access token or your client credentials.
436  
437 =back
438  
439 =head3 query_parameter
440  
441 =over 4
442  
443 =item country
444  
445 Type: string | Required: optional
446 A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.
447  
448 =item limit
449  
450 Type: integer | Required: optional
451 The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
452  
453 =item offset
454  
455 Type: integer | Required: optional
456 The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.
457  
458 =back
459  
460 and Response Objects being:
461  
462 - album object
463  
464  
465 On success, the HTTP status code in the response header is 200 OK and the response body contains a message and analbums object. The albums object 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.Once you have retrieved the list, you can use Get an Album’s Tracks to drill down further.The results are returned in an order reflected within the Spotify clients, and therefore may not be ordered by date.Try in our Web Console
466  
467 =cut
468  
469 0 ▶async sub get_new_releases {
Subroutine get_new_releases: not called CC=1 SCAR=6.9
Pod documented
470 0 my ($self, %args) = @_;
471  
472 0 my $request->{method} = 'GET';
473 0 $request->{uri} = 'https://api.spotify.com/v1/browse/new-releases';
474 $request->{param} = {
475 0 header => {
476 'Authorization' => {
477 type => 'string',
478 required => 'required',
479 },
480 },
481 query_parameter => {
482 'country' => {
483 type => 'string',
484 required => 'optional',
485 },
486 'limit' => {
487 type => 'integer',
488 required => 'optional',
489 },
490 'offset' => {
491 type => 'integer',
492 required => 'optional',
493 },
494 },
495 };
496 0 my $response_objs = [
497 'album object',
498  
499 ];
500  
501 0 await $self->call_api($request, $response_objs, %args);
502 2 }
503  
504 =head2 get_recommendation_genres
505  
506 get_recommendation_genres - Get Recommendation Genres
507  
508 Retrieve a list of available genres seed parameter values for recommendations.
509  
510 with Request details being:
511  
512 =head3 header
513  
514 =over 4
515  
516 =item Authorization
517  
518 Type: string | Required: required
519 A valid user access token or your client credentials.
520  
521 =back
522  
523 and Response Objects being:
524  
525 - response object
526  
527  
528 On success, the HTTP status code in the response header is 200 OK and the response body contains a recommendations response object in JSON format.Try in our Web Console
529  
530 =cut
531  
532 0 ▶async sub get_recommendation_genres {
Subroutine get_recommendation_genres: not called CC=1 SCAR=6.9
Pod documented
533 0 my ($self, %args) = @_;
534  
535 0 my $request->{method} = 'GET';
536 0 $request->{uri} = 'https://api.spotify.com/v1/recommendations/available-genre-seeds';
537 $request->{param} = {
538 0 header => {
539 'Authorization' => {
540 type => 'string',
541 required => 'required',
542 },
543 },
544 };
545 0 my $response_objs = [
546 'response object',
547  
548 ];
549  
550 0 await $self->call_api($request, $response_objs, %args);
551 2 }
552  
553 =head2 get_recommendations
554  
555 get_recommendations - Get Recommendations
556  
557 Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details.
558  
559 with Request details being:
560  
561 =head3 header
562  
563 =over 4
564  
565 =item Authorization
566  
567 Type: string | Required: required
568 A valid user access token or your client credentials.
569  
570 =back
571  
572 =head3 query_parameter
573  
574 =over 4
575  
576 =item limit
577  
578 Type: integer | Required: optional
579 The target size of the list of recommended tracks. For seeds with unusually small pools or when highly restrictive filtering is applied, it may be impossible to generate the requested number of recommended tracks. Debugging information for such cases is available in the response. Default: 20. Minimum: 1. Maximum: 100.
580  
581 =item market
582  
583 Type: string | Required: optional
584 An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking. Because min_*, max_* and target_* are applied to pools before relinking, the generated results may not precisely match the filters applied. Original, non-relinked tracks are available via the linked_from attribute of the relinked track response.
585  
586 =item max_acousticness
587  
588 Type: number | Required: optional
589 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
590  
591 =item max_danceability
592  
593 Type: number | Required: optional
594 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
595  
596 =item max_duration_ms
597  
598 Type: integer | Required: optional
599 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
600  
601 =item max_energy
602  
603 Type: number | Required: optional
604 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
605  
606 =item max_instrumentalness
607  
608 Type: number | Required: optional
609 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
610  
611 =item max_key
612  
613 Type: integer | Required: optional
614 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
615  
616 =item max_liveness
617  
618 Type: number | Required: optional
619 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
620  
621 =item max_loudness
622  
623 Type: number | Required: optional
624 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
625  
626 =item max_mode
627  
628 Type: integer | Required: optional
629 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
630  
631 =item max_popularity
632  
633 Type: integer | Required: optional
634 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
635  
636 =item max_speechiness
637  
638 Type: number | Required: optional
639 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
640  
641 =item max_tempo
642  
643 Type: number | Required: optional
644 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
645  
646 =item max_time_signature
647  
648 Type: integer | Required: optional
649 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
650  
651 =item max_valence
652  
653 Type: number | Required: optional
654 For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, max_instrumentalness=0.35 would filter out most tracks that are likely to be instrumental.
655  
656 =item min_acousticness
657  
658 Type: number | Required: optional
659 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
660  
661 =item min_danceability
662  
663 Type: number | Required: optional
664 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
665  
666 =item min_duration_ms
667  
668 Type: integer | Required: optional
669 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
670  
671 =item min_energy
672  
673 Type: number | Required: optional
674 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
675  
676 =item min_instrumentalness
677  
678 Type: number | Required: optional
679 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
680  
681 =item min_key
682  
683 Type: integer | Required: optional
684 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
685  
686 =item min_liveness
687  
688 Type: number | Required: optional
689 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
690  
691 =item min_loudness
692  
693 Type: number | Required: optional
694 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
695  
696 =item min_mode
697  
698 Type: integer | Required: optional
699 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
700  
701 =item min_popularity
702  
703 Type: integer | Required: optional
704 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
705  
706 =item min_speechiness
707  
708 Type: number | Required: optional
709 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
710  
711 =item min_tempo
712  
713 Type: number | Required: optional
714 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
715  
716 =item min_time_signature
717  
718 Type: integer | Required: optional
719 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
720  
721 =item min_valence
722  
723 Type: number | Required: optional
724 For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided. See tunable track attributes below for the list of available options. For example, min_tempo=140 would restrict results to only those tracks with a tempo of greater than 140 beats per minute.
725  
726 =item seed_artists
727  
728 Type: string | Required: required
729 A comma separated list of Spotify IDs for seed artists. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
730  
731 =item seed_genres
732  
733 Type: string | Required: required
734 A comma separated list of any genres in the set of available genre seeds. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
735  
736 =item seed_tracks
737  
738 Type: string | Required: required
739 A comma separated list of Spotify IDs for a seed track. Up to 5 seed values may be provided in any combination of seed_artists, seed_tracks and seed_genres.
740  
741 =item target_acousticness
742  
743 Type: number | Required: optional
744 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
745  
746 =item target_danceability
747  
748 Type: number | Required: optional
749 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
750  
751 =item target_duration_ms
752  
753 Type: integer | Required: optional
754 Target duration of the track (ms)
755  
756 =item target_energy
757  
758 Type: number | Required: optional
759 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
760  
761 =item target_instrumentalness
762  
763 Type: number | Required: optional
764 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
765  
766 =item target_key
767  
768 Type: integer | Required: optional
769 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
770  
771 =item target_liveness
772  
773 Type: number | Required: optional
774 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
775  
776 =item target_loudness
777  
778 Type: number | Required: optional
779 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
780  
781 =item target_mode
782  
783 Type: integer | Required: optional
784 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
785  
786 =item target_popularity
787  
788 Type: integer | Required: optional
789 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
790  
791 =item target_speechiness
792  
793 Type: number | Required: optional
794 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
795  
796 =item target_tempo
797  
798 Type: number | Required: optional
799 Target tempo (BPM)
800  
801 =item target_time_signature
802  
803 Type: integer | Required: optional
804 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
805  
806 =item target_valence
807  
808 Type: number | Required: optional
809 For each of the tunable track attributes (below) a target value may be provided. Tracks with the attribute values nearest to the target values will be preferred. For example, you might request target_energy=0.6 and target_danceability=0.8. All target values will be weighed equally in ranking results.
810  
811 =back
812  
813 and Response Objects being:
814  
815 - response object
816  
817  
818 On success, the HTTP status code in the response header is 200 OK and the response body contains a recommendations response object in JSON format.Try in our Web Console
819  
820 =cut
821  
822 0 ▶async sub get_recommendations {
Subroutine get_recommendations: not called CC=1 SCAR=6.9
Pod documented
823 0 my ($self, %args) = @_;
824  
825 0 my $request->{method} = 'GET';
826 0 $request->{uri} = 'https://api.spotify.com/v1/recommendations';
827 $request->{param} = {
828 0 header => {
829 'Authorization' => {
830 type => 'string',
831 required => 'required',
832 },
833 },
834 query_parameter => {
835 'limit' => {
836 type => 'integer',
837 required => 'optional',
838 },
839 'market' => {
840 type => 'string',
841 required => 'optional',
842 },
843 'max_acousticness' => {
844 type => 'number',
845 required => 'optional',
846 },
847 'max_danceability' => {
848 type => 'number',
849 required => 'optional',
850 },
851 'max_duration_ms' => {
852 type => 'integer',
853 required => 'optional',
854 },
855 'max_energy' => {
856 type => 'number',
857 required => 'optional',
858 },
859 'max_instrumentalness' => {
860 type => 'number',
861 required => 'optional',
862 },
863 'max_key' => {
864 type => 'integer',
865 required => 'optional',
866 },
867 'max_liveness' => {
868 type => 'number',
869 required => 'optional',
870 },
871 'max_loudness' => {
872 type => 'number',
873 required => 'optional',
874 },
875 'max_mode' => {
876 type => 'integer',
877 required => 'optional',
878 },
879 'max_popularity' => {
880 type => 'integer',
881 required => 'optional',
882 },
883 'max_speechiness' => {
884 type => 'number',
885 required => 'optional',
886 },
887 'max_tempo' => {
888 type => 'number',
889 required => 'optional',
890 },
891 'max_time_signature' => {
892 type => 'integer',
893 required => 'optional',
894 },
895 'max_valence' => {
896 type => 'number',
897 required => 'optional',
898 },
899 'min_acousticness' => {
900 type => 'number',
901 required => 'optional',
902 },
903 'min_danceability' => {
904 type => 'number',
905 required => 'optional',
906 },
907 'min_duration_ms' => {
908 type => 'integer',
909 required => 'optional',
910 },
911 'min_energy' => {
912 type => 'number',
913 required => 'optional',
914 },
915 'min_instrumentalness' => {
916 type => 'number',
917 required => 'optional',
918 },
919 'min_key' => {
920 type => 'integer',
921 required => 'optional',
922 },
923 'min_liveness' => {
924 type => 'number',
925 required => 'optional',
926 },
927 'min_loudness' => {
928 type => 'number',
929 required => 'optional',
930 },
931 'min_mode' => {
932 type => 'integer',
933 required => 'optional',
934 },
935 'min_popularity' => {
936 type => 'integer',
937 required => 'optional',
938 },
939 'min_speechiness' => {
940 type => 'number',
941 required => 'optional',
942 },
943 'min_tempo' => {
944 type => 'number',
945 required => 'optional',
946 },
947 'min_time_signature' => {
948 type => 'integer',
949 required => 'optional',
950 },
951 'min_valence' => {
952 type => 'number',
953 required => 'optional',
954 },
955 'seed_artists' => {
956 type => 'string',
957 required => 'required',
958 },
959 'seed_genres' => {
960 type => 'string',
961 required => 'required',
962 },
963 'seed_tracks' => {
964 type => 'string',
965 required => 'required',
966 },
967 'target_acousticness' => {
968 type => 'number',
969 required => 'optional',
970 },
971 'target_danceability' => {
972 type => 'number',
973 required => 'optional',
974 },
975 'target_duration_ms' => {
976 type => 'integer',
977 required => 'optional',
978 },
979 'target_energy' => {
980 type => 'number',
981 required => 'optional',
982 },
983 'target_instrumentalness' => {
984 type => 'number',
985 required => 'optional',
986 },
987 'target_key' => {
988 type => 'integer',
989 required => 'optional',
990 },
991 'target_liveness' => {
992 type => 'number',
993 required => 'optional',
994 },
995 'target_loudness' => {
996 type => 'number',
997 required => 'optional',
998 },
999 'target_mode' => {
1000 type => 'integer',
1001 required => 'optional',
1002 },
1003 'target_popularity' => {
1004 type => 'integer',
1005 required => 'optional',
1006 },
1007 'target_speechiness' => {
1008 type => 'number',
1009 required => 'optional',
1010 },
1011 'target_tempo' => {
1012 type => 'number',
1013 required => 'optional',
1014 },
1015 'target_time_signature' => {
1016 type => 'integer',
1017 required => 'optional',
1018 },
1019 'target_valence' => {
1020 type => 'number',
1021 required => 'optional',
1022 },
1023 },
1024 };
1025 0 my $response_objs = [
1026 'response object',
1027  
1028 ];
1029  
1030 0 await $self->call_api($request, $response_objs, %args);
1031 2 }
1032  
1033 2 1;
« lib/Net/Async/Spotify/API/Generated/Playlists.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Follow.pm »