lib/Net/Async/Spotify/API/Generated/Tracks.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_audio_analysis
2.0
get_audio_features
2.0
get_several_audio_features
2.0
CRAP 1.2
« lib/Net/Async/Spotify/API/Generated/Artists.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Albums.pm »
1 package Net::Async::Spotify::API::Generated::Tracks;
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::Tracks - Package representing Spotify Tracks 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_audio_analysis
31  
32 get_audio_analysis - Get Audio Analysis for a Track
33  
34 Get a detailed audio analysis for a single track identified by its unique
35 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 valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.
47  
48 =back
49  
50 =head3 path_parameter
51  
52 =over 4
53  
54 =item id
55  
56 Type: string | Required: required
57 The Spotify ID
58 for the track.
59  
60 =back
61  
62 and Response Objects being:
63  
64 - analysis object
65  
66  
67 On success, the HTTP status code in the response header is 200 OK and the response body contains an audio analysis 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
68  
69 =cut
70  
71 0 ▶async sub get_audio_analysis {
Subroutine get_audio_analysis: not called CC=1 SCAR=6.9
Pod documented
72 0 my ($self, %args) = @_;
73  
74 0 my $request->{method} = 'GET';
75 0 $request->{uri} = 'https://api.spotify.com/v1/audio-analysis/{id}';
76 $request->{param} = {
77 0 header => {
78 'Authorization' => {
79 type => 'string',
80 required => 'required',
81 },
82 },
83 path_parameter => {
84 'id' => {
85 type => 'string',
86 required => 'required',
87 },
88 },
89 };
90 0 my $response_objs = [
91 'analysis object',
92  
93 ];
94  
95 0 await $self->call_api($request, $response_objs, %args);
96 2 }
97  
98 =head2 get_audio_features
99  
100 get_audio_features - Get Audio Features for a Track
101  
102 Get audio feature information for a single track identified by its unique
103 Spotify ID.
104  
105 with Request details being:
106  
107 =head3 header
108  
109 =over 4
110  
111 =item Authorization
112  
113 Type: string | Required: required
114 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.
115  
116 =back
117  
118 =head3 path_parameter
119  
120 =over 4
121  
122 =item id
123  
124 Type: string | Required: required
125 The Spotify ID for the track.
126  
127 =back
128  
129 and Response Objects being:
130  
131 - features object
132  
133  
134 On success, the HTTP status code in the response header is 200 OK and the response body contains an audio features 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
135  
136 =cut
137  
138 0 ▶async sub get_audio_features {
Subroutine get_audio_features: not called CC=1 SCAR=6.9
Pod documented
139 0 my ($self, %args) = @_;
140  
141 0 my $request->{method} = 'GET';
142 0 $request->{uri} = 'https://api.spotify.com/v1/audio-features/{id}';
143 $request->{param} = {
144 0 header => {
145 'Authorization' => {
146 type => 'string',
147 required => 'required',
148 },
149 },
150 path_parameter => {
151 'id' => {
152 type => 'string',
153 required => 'required',
154 },
155 },
156 };
157 0 my $response_objs = [
158 'features object',
159  
160 ];
161  
162 0 await $self->call_api($request, $response_objs, %args);
163 2 }
164  
165 =head2 get_several_audio_features
166  
167 get_several_audio_features - Get Audio Features for Several Tracks
168  
169 Get audio features for multiple tracks based on their Spotify IDs.
170  
171 with Request details being:
172  
173 =head3 header
174  
175 =over 4
176  
177 =item Authorization
178  
179 Type: string | Required: required
180 A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details.
181  
182 =back
183  
184 =head3 query_parameter
185  
186 =over 4
187  
188 =item ids
189  
190 Type: string | Required: required
191 A comma-separated list of the Spotify IDs
192 for the tracks. Maximum: 100 IDs.
193  
194 =back
195  
196 and Response Objects being:
197  
198 - an object
199 - an object
200  
201  
202 On success, the HTTP status code in the response header is 200 OK
203 and the response body contains an object whose key is "audio_features" and
204 whose value is an array of audio features 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
205  
206 =cut
207  
208 0 ▶async sub get_several_audio_features {
Subroutine get_several_audio_features: not called CC=1 SCAR=6.9
Pod documented
209 0 my ($self, %args) = @_;
210  
211 0 my $request->{method} = 'GET';
212 0 $request->{uri} = 'https://api.spotify.com/v1/audio-features';
213 $request->{param} = {
214 0 header => {
215 'Authorization' => {
216 type => 'string',
217 required => 'required',
218 },
219 },
220 query_parameter => {
221 'ids' => {
222 type => 'string',
223 required => 'required',
224 },
225 },
226 };
227 0 my $response_objs = [
228 'an object',
229 'an object',
230  
231 ];
232  
233 0 await $self->call_api($request, $response_objs, %args);
234 2 }
235  
236 =head2 get_several_tracks
237  
238 get_several_tracks - Get Several Tracks
239  
240 Get Spotify catalog information for multiple tracks based on their Spotify IDs.
241  
242 with Request details being:
243  
244 =head3 header
245  
246 =over 4
247  
248 =item Authorization
249  
250 Type: string | Required: required
251 A valid access token from the Spotify Accounts service:
252 see the Web API Authorization Guide
253 for details.
254  
255 =back
256  
257 =head3 query_parameter
258  
259 =over 4
260  
261 =item ids
262  
263 Type: string | Required: required
264 A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs.
265  
266 =item market
267  
268 Type: string | Required: optional
269 An ISO 3166-1 alpha-2 country code or the string from_token. Provide this parameter if you want to apply Track Relinking.
270  
271 =back
272  
273 and Response Objects being:
274  
275 - an object
276 - an object
277  
278  
279 On success, the HTTP status code in the response header is 200
280 OK and the response body contains an object whose key is tracks and whose
281 value is an array of track objects
282 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
283  
284 =cut
285  
286 0 ▶async sub get_several_tracks {
Subroutine get_several_tracks: not called CC=1 SCAR=6.9
Pod documented
287 0 my ($self, %args) = @_;
288  
289 0 my $request->{method} = 'GET';
290 0 $request->{uri} = 'https://api.spotify.com/v1/tracks';
291 $request->{param} = {
292 0 header => {
293 'Authorization' => {
294 type => 'string',
295 required => 'required',
296 },
297 },
298 query_parameter => {
299 'ids' => {
300 type => 'string',
301 required => 'required',
302 },
303 'market' => {
304 type => 'string',
305 required => 'optional',
306 },
307 },
308 };
309 0 my $response_objs = [
310 'an object',
311 'an object',
312  
313 ];
314  
315 0 await $self->call_api($request, $response_objs, %args);
316 2 }
317  
318 =head2 get_track
319  
320 get_track - Get a Track
321  
322 Get Spotify catalog information for a single track identified by its
323 unique Spotify ID.
324  
325 with Request details being:
326  
327 =head3 header
328  
329 =over 4
330  
331 =item Authorization
332  
333 Type: string | Required: required
334 A valid access token from the Spotify Accounts service:
335 see the Web API Authorization Guide
336 for details.
337  
338 =back
339  
340 =head3 path_parameter
341  
342 =over 4
343  
344 =item id
345  
346 Type: string | Required: required
347 The Spotify ID
348 for the track.
349  
350 =back
351  
352 =head3 query_parameter
353  
354 =over 4
355  
356 =item market
357  
358 Type: string | Required: optional
359 An ISO 3166-1 alpha-2 country code
360 or the string from_token. Provide this parameter if you want to apply Track
361 Relinking.
362  
363 =back
364  
365 and Response Objects being:
366  
367 - track object
368  
369  
370 On success, the HTTP status code in the response header is 200
371 OK and the response body contains a track object
372 in JSON format. On error, the header status code is an error code
373 and the response body contains an error object.Try in our Web Console
374  
375 =cut
376  
377 0 ▶async sub get_track {
Subroutine get_track: not called CC=1 SCAR=6.9
Pod documented
378 0 my ($self, %args) = @_;
379  
380 0 my $request->{method} = 'GET';
381 0 $request->{uri} = 'https://api.spotify.com/v1/tracks/{id}';
382 $request->{param} = {
383 0 header => {
384 'Authorization' => {
385 type => 'string',
386 required => 'required',
387 },
388 },
389 path_parameter => {
390 'id' => {
391 type => 'string',
392 required => 'required',
393 },
394 },
395 query_parameter => {
396 'market' => {
397 type => 'string',
398 required => 'optional',
399 },
400 },
401 };
402 0 my $response_objs = [
403 'track object',
404  
405 ];
406  
407 0 await $self->call_api($request, $response_objs, %args);
408 2 }
409  
410 2 1;
« lib/Net/Async/Spotify/API/Generated/Artists.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Albums.pm »