lib/Net/Async/Spotify/API/Generated/Albums.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_an_album
2.0
get_an_albums_tracks
2.0
get_multiple_albums
2.0
CRAP 1.1
« lib/Net/Async/Spotify/API/Generated/Tracks.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Shows.pm »
1 package Net::Async::Spotify::API::Generated::Albums;
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::Albums - Package representing Spotify Albums 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_album
31  
32 get_an_album - Get an Album
33  
34 Get Spotify catalog information for a single album.
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 album.
57  
58 =back
59  
60 =head3 query_parameter
61  
62 =over 4
63  
64 =item market
65  
66 Type: string | Required: optional
67 The market you’d like to request. Synonym for country.
68  
69 =back
70  
71 and Response Objects being:
72  
73 - album object
74  
75  
76 On success, the HTTP status code in the response header is 200 OK and the response body contains an album 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
77  
78 =cut
79  
80 0 ▶async sub get_an_album {
Subroutine get_an_album: not called CC=1 SCAR=6.9
Pod documented
81 0 my ($self, %args) = @_;
82  
83 0 my $request->{method} = 'GET';
84 0 $request->{uri} = 'https://api.spotify.com/v1/albums/{id}';
85 $request->{param} = {
86 0 header => {
87 'Authorization' => {
88 type => 'string',
89 required => 'required',
90 },
91 },
92 path_parameter => {
93 'id' => {
94 type => 'string',
95 required => 'required',
96 },
97 },
98 query_parameter => {
99 'market' => {
100 type => 'string',
101 required => 'optional',
102 },
103 },
104 };
105 0 my $response_objs = [
106 'album object',
107  
108 ];
109  
110 0 await $self->call_api($request, $response_objs, %args);
111 2 }
112  
113 =head2 get_an_albums_tracks
114  
115 get_an_albums_tracks - Get an Album's Tracks
116  
117 Get Spotify catalog information about an album’s tracks.
118 Optional parameters can be used to limit the number of tracks returned.
119  
120 with Request details being:
121  
122 =head3 header
123  
124 =over 4
125  
126 =item Authorization
127  
128 Type: string | Required: required
129 A valid user access token or your client credentials.
130  
131 =back
132  
133 =head3 path_parameter
134  
135 =over 4
136  
137 =item id
138  
139 Type: string | Required: required
140 The Spotify ID of the album.
141  
142 =back
143  
144 =head3 query_parameter
145  
146 =over 4
147  
148 =item limit
149  
150 Type: integer | Required: optional
151 The maximum number of tracks to return. Default: 20. Minimum: 1. Maximum: 50.
152  
153 =item market
154  
155 Type: string | Required: optional
156 An ISO 3166-1 alpha-2 country code or the string from_token.
157 Provide this parameter if you want to apply Track Relinking.
158  
159 =item offset
160  
161 Type: integer | Required: optional
162 The index of the first track to return. Default: 0 (the first object). Use with limit to get the next set of tracks.
163  
164 =back
165  
166 and Response Objects being:
167  
168 - album object
169  
170  
171 On success, the HTTP status code in the response header is 200 OK and the response body contains an album 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
172  
173 =cut
174  
175 0 ▶async sub get_an_albums_tracks {
Subroutine get_an_albums_tracks: not called CC=1 SCAR=6.9
Pod documented
176 0 my ($self, %args) = @_;
177  
178 0 my $request->{method} = 'GET';
179 0 $request->{uri} = 'https://api.spotify.com/v1/albums/{id}/tracks';
180 $request->{param} = {
181 0 header => {
182 'Authorization' => {
183 type => 'string',
184 required => 'required',
185 },
186 },
187 path_parameter => {
188 'id' => {
189 type => 'string',
190 required => 'required',
191 },
192 },
193 query_parameter => {
194 'limit' => {
195 type => 'integer',
196 required => 'optional',
197 },
198 'market' => {
199 type => 'string',
200 required => 'optional',
201 },
202 'offset' => {
203 type => 'integer',
204 required => 'optional',
205 },
206 },
207 };
208 0 my $response_objs = [
209 'album object',
210  
211 ];
212  
213 0 await $self->call_api($request, $response_objs, %args);
214 2 }
215  
216 =head2 get_multiple_albums
217  
218 get_multiple_albums - Get Multiple Albums
219  
220 Get Spotify catalog information for multiple albums identified by their Spotify IDs.
221  
222 with Request details being:
223  
224 =head3 header
225  
226 =over 4
227  
228 =item Authorization
229  
230 Type: string | Required: required
231 A valid user access token or your client credentials.
232  
233 =back
234  
235 =head3 query_parameter
236  
237 =over 4
238  
239 =item ids
240  
241 Type: string | Required: required
242 A comma-separated list of the Spotify IDs for the albums. Maximum: 20 IDs.
243  
244 =item market
245  
246 Type: string | Required: optional
247 An ISO 3166-1 alpha-2 country code or the string from_token.
248 Provide this parameter if you want to apply Track Relinking.
249  
250 =back
251  
252 and Response Objects being:
253  
254 - an object
255 - an object
256  
257  
258 On success, the HTTP status code in the response header is 200 OK and the response body contains an object whose key is "albums" and whose value is an array of album 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
259  
260 =cut
261  
262 0 ▶async sub get_multiple_albums {
Subroutine get_multiple_albums: not called CC=1 SCAR=6.9
Pod documented
263 0 my ($self, %args) = @_;
264  
265 0 my $request->{method} = 'GET';
266 0 $request->{uri} = 'https://api.spotify.com/v1/albums';
267 $request->{param} = {
268 0 header => {
269 'Authorization' => {
270 type => 'string',
271 required => 'required',
272 },
273 },
274 query_parameter => {
275 'ids' => {
276 type => 'string',
277 required => 'required',
278 },
279 'market' => {
280 type => 'string',
281 required => 'optional',
282 },
283 },
284 };
285 0 my $response_objs = [
286 'an object',
287 'an object',
288  
289 ];
290  
291 0 await $self->call_api($request, $response_objs, %args);
292 2 }
293  
294 2 1;
« lib/Net/Async/Spotify/API/Generated/Tracks.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Shows.pm »