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

filter: Statementstmt 58.8% 20 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 2 / 2 totaltotal 62.7% 27 / 43 SCAR 0.7
CC
1
Cov
59%
get_an_episode
2.0
get_multiple_episodes
2.0
BEGIN
1.0
CRAP 1.1
« lib/Net/Async/Spotify/API/Generated/Shows.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Users.pm »
1 package Net::Async::Spotify::API::Generated::Episodes;
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::Episodes - Package representing Spotify Episodes 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_episode
31  
32 get_an_episode - Get an Episode
33  
34 Get Spotify catalog information for a single episode 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 for the episode.
60  
61 =back
62  
63 =head3 query_parameter
64  
65 =over 4
66  
67 =item market
68  
69 Type: string | Required: optional
70 An ISO 3166-1 alpha-2 country code.
71 If a country code is specified, only shows and episodes that are available in that market will be returned.
72 If a valid user access token is specified in the request header, the country associated with
73 the user account will take priority over this parameter.
74 Note: If neither market or user country are provided, the content is considered unavailable for the client.
75 Users can view the country that is associated with their account in the account settings.
76  
77 =back
78  
79 and Response Objects being:
80  
81 - episode object
82  
83  
84 On success, the HTTP status code in the response header is 200
85 OK and the response body contains an episode object
86 in JSON format.
87 On error, the header status code is an error code
88 and the response body contains an error object.
89 If an episode is unavailable in the given market the HTTP status code in the response header is 404 NOT FOUND.Try in our Web Console
90  
91 =cut
92  
93 0 ▶async sub get_an_episode {
Subroutine get_an_episode: not called CC=1 SCAR=6.9
Pod documented
94 0 my ($self, %args) = @_;
95  
96 0 my $request->{method} = 'GET';
97 0 $request->{uri} = 'https://api.spotify.com/v1/episodes/{id}';
98 $request->{param} = {
99 0 header => {
100 'Authorization' => {
101 type => 'string',
102 required => 'required',
103 },
104 },
105 path_parameter => {
106 'id' => {
107 type => 'string',
108 required => 'required',
109 },
110 },
111 query_parameter => {
112 'market' => {
113 type => 'string',
114 required => 'optional',
115 },
116 },
117 };
118 0 my $response_objs = [
119 'episode object',
120  
121 ];
122  
123 0 await $self->call_api($request, $response_objs, %args);
124 2 }
125  
126 =head2 get_multiple_episodes
127  
128 get_multiple_episodes - Get Multiple Episodes
129  
130 Get Spotify catalog information for several episodes based on their Spotify IDs.
131  
132 with Request details being:
133  
134 =head3 header
135  
136 =over 4
137  
138 =item Authorization
139  
140 Type: string | Required: required
141 A valid access token from the Spotify Accounts service:
142 see the Web API Authorization Guide
143 for details.
144  
145 =back
146  
147 =head3 query_parameter
148  
149 =over 4
150  
151 =item ids
152  
153 Type: string | Required: required
154 A comma-separated list of the Spotify IDs for the episodes. Maximum: 50 IDs.
155  
156 =item market
157  
158 Type: string | Required: optional
159 An ISO 3166-1 alpha-2 country code.
160 If a country code is specified, only shows and episodes that are available in that market will be returned.
161 If a valid user access token is specified in the request header, the country associated with
162 the user account will take priority over this parameter.
163 Note: If neither market or user country are provided, the content is considered unavailable for the client.
164 Users can view the country that is associated with their account in the account settings.
165  
166 =back
167  
168 and Response Objects being:
169  
170 - an object
171 - an object
172  
173  
174 On success, the HTTP status code in the response header is 200
175 OK and the response body contains an object whose key is episodes and whose
176 value is an array of episode objects
177 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.
178 Duplicate ids in the query will result in duplicate objects in the response. If an episode is unavailable in the given market, a null value is returned.
179 On error, the header status code is an error code and the response body contains an error object.Try in our Web Console
180  
181 =cut
182  
183 0 ▶async sub get_multiple_episodes {
Subroutine get_multiple_episodes: not called CC=1 SCAR=6.9
Pod documented
184 0 my ($self, %args) = @_;
185  
186 0 my $request->{method} = 'GET';
187 0 $request->{uri} = 'https://api.spotify.com/v1/episodes';
188 $request->{param} = {
189 0 header => {
190 'Authorization' => {
191 type => 'string',
192 required => 'required',
193 },
194 },
195 query_parameter => {
196 'ids' => {
197 type => 'string',
198 required => 'required',
199 },
200 'market' => {
201 type => 'string',
202 required => 'optional',
203 },
204 },
205 };
206 0 my $response_objs = [
207 'an object',
208 'an object',
209  
210 ];
211  
212 0 await $self->call_api($request, $response_objs, %args);
213 2 }
214  
215 2 1;
« lib/Net/Async/Spotify/API/Generated/Shows.pm ↑ Summary lib/Net/Async/Spotify/API/Generated/Users.pm »