« lib/Net/Async/Spotify/API/Generated/Albums.pm
↑ Summary
lib/Net/Async/Spotify/API/Generated/Episodes.pm »
| 1 | package Net::Async::Spotify::API::Generated::Shows; | ||||||||||||
| 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.002'; # 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::Shows - Package representing Spotify Shows 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 | 0 | ▶ | sub mapping { shift->{mapping} } | ||||||||||
|
Subroutine
mapping: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 31 | |||||||||||||
| 32 | =head2 get_a_show | ||||||||||||
| 33 | |||||||||||||
| 34 | get_a_show - Get a Show | ||||||||||||
| 35 | |||||||||||||
| 36 | Get Spotify catalog information for a single show identified by its | ||||||||||||
| 37 | unique Spotify ID. | ||||||||||||
| 38 | |||||||||||||
| 39 | with Request details being: | ||||||||||||
| 40 | |||||||||||||
| 41 | =head3 header | ||||||||||||
| 42 | |||||||||||||
| 43 | =over 4 | ||||||||||||
| 44 | |||||||||||||
| 45 | =item Authorization | ||||||||||||
| 46 | |||||||||||||
| 47 | Type: string | Required: required | ||||||||||||
| 48 | A valid access token from the Spotify Accounts service: | ||||||||||||
| 49 | see the Web API Authorization Guide | ||||||||||||
| 50 | for details. | ||||||||||||
| 51 | |||||||||||||
| 52 | =back | ||||||||||||
| 53 | |||||||||||||
| 54 | =head3 path_parameter | ||||||||||||
| 55 | |||||||||||||
| 56 | =over 4 | ||||||||||||
| 57 | |||||||||||||
| 58 | =item id | ||||||||||||
| 59 | |||||||||||||
| 60 | Type: string | Required: required | ||||||||||||
| 61 | The Spotify ID | ||||||||||||
| 62 | for the show. | ||||||||||||
| 63 | |||||||||||||
| 64 | =back | ||||||||||||
| 65 | |||||||||||||
| 66 | =head3 query_parameter | ||||||||||||
| 67 | |||||||||||||
| 68 | =over 4 | ||||||||||||
| 69 | |||||||||||||
| 70 | =item market | ||||||||||||
| 71 | |||||||||||||
| 72 | Type: string | Required: optional | ||||||||||||
| 73 | An ISO 3166-1 alpha-2 country code. | ||||||||||||
| 74 | If a country code is specified, only shows and episodes that are available in that market will be returned. | ||||||||||||
| 75 | If a valid user access token is specified in the request header, the country associated with | ||||||||||||
| 76 | the user account will take priority over this parameter. | ||||||||||||
| 77 | Note: If neither market or user country are provided, the content is considered unavailable for the client. | ||||||||||||
| 78 | Users can view the country that is associated with their account in the account settings. | ||||||||||||
| 79 | |||||||||||||
| 80 | =back | ||||||||||||
| 81 | |||||||||||||
| 82 | and Response Objects being: | ||||||||||||
| 83 | |||||||||||||
| 84 | - show object | ||||||||||||
| 85 | |||||||||||||
| 86 | |||||||||||||
| 87 | On success, the HTTP status code in the response header is 200 | ||||||||||||
| 88 | OK and the response body contains a show object | ||||||||||||
| 89 | in JSON format. | ||||||||||||
| 90 | On error, the header status code is an error code | ||||||||||||
| 91 | and the response body contains an error object. | ||||||||||||
| 92 | If a show is unavailable in the given market the HTTP status code in the response header is 404 NOT FOUND.Try in our Web Console | ||||||||||||
| 93 | |||||||||||||
| 94 | =cut | ||||||||||||
| 95 | |||||||||||||
| 96 | 0 | ▶ | async sub get_a_show { | ||||||||||
|
Subroutine
get_a_show: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 97 | 0 | my ($self, %args) = @_; | |||||||||||
| 98 | |||||||||||||
| 99 | 0 | my $mapping = $self->mapping; | |||||||||||
| 100 | 0 | ▶ | my $request->{method} = $mapping->{get_a_show}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_show"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_a_show"}{"method"} // "GET"
$mapping->{"get_a_show"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_a_show"}{"method"}
| |||||||||||||
| 101 | 0 | ▶ | $request->{uri} = $mapping->{get_a_show}{uri} // 'https://api.spotify.com/v1/shows/{id}'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_show"}{"uri"} // "https://api.spotify.com/v1/shows/{id}"
MC/DC0%0/1
$mapping->{"get_a_show"}{"uri"} // "https://api.spotify.com/v1/shows/{id}"
$mapping->{"get_a_show"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_a_show"}{"uri"}
| |||||||||||||
| 102 | $request->{param} = $mapping->{get_a_show}{param} // { | ||||||||||||
| 103 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_show"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"market", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_a_show"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"market", {"type", "string", "required", "optional"}}}
$mapping->{"get_a_show"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_a_show"}{"param"}
| |||||||||||||
| 104 | 'Authorization' => { | ||||||||||||
| 105 | type => 'string', | ||||||||||||
| 106 | required => 'required', | ||||||||||||
| 107 | }, | ||||||||||||
| 108 | }, | ||||||||||||
| 109 | path_parameter => { | ||||||||||||
| 110 | 'id' => { | ||||||||||||
| 111 | type => 'string', | ||||||||||||
| 112 | required => 'required', | ||||||||||||
| 113 | }, | ||||||||||||
| 114 | }, | ||||||||||||
| 115 | query_parameter => { | ||||||||||||
| 116 | 'market' => { | ||||||||||||
| 117 | type => 'string', | ||||||||||||
| 118 | required => 'optional', | ||||||||||||
| 119 | }, | ||||||||||||
| 120 | }, | ||||||||||||
| 121 | }; | ||||||||||||
| 122 | my $response_objs = $mapping->{get_a_show}{response} // [ | ||||||||||||
| 123 | 0 | ▶ | 'show object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_show"}{"response"} // ["show object"]
MC/DC0%0/1
$mapping->{"get_a_show"}{"response"} // ["show object"]
$mapping->{"get_a_show"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_a_show"}{"response"}
| |||||||||||||
| 124 | |||||||||||||
| 125 | ]; | ||||||||||||
| 126 | |||||||||||||
| 127 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 128 | 2 | } | |||||||||||
| 129 | |||||||||||||
| 130 | =head2 get_a_shows_episodes | ||||||||||||
| 131 | |||||||||||||
| 132 | get_a_shows_episodes - Get a Show's Episodes | ||||||||||||
| 133 | |||||||||||||
| 134 | Get Spotify catalog information about an show’s episodes. Optional parameters can be used to limit the number of episodes returned. | ||||||||||||
| 135 | |||||||||||||
| 136 | with Request details being: | ||||||||||||
| 137 | |||||||||||||
| 138 | =head3 header | ||||||||||||
| 139 | |||||||||||||
| 140 | =over 4 | ||||||||||||
| 141 | |||||||||||||
| 142 | =item Authorization | ||||||||||||
| 143 | |||||||||||||
| 144 | Type: string | Required: required | ||||||||||||
| 145 | valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. | ||||||||||||
| 146 | |||||||||||||
| 147 | =back | ||||||||||||
| 148 | |||||||||||||
| 149 | =head3 path_parameter | ||||||||||||
| 150 | |||||||||||||
| 151 | =over 4 | ||||||||||||
| 152 | |||||||||||||
| 153 | =item id | ||||||||||||
| 154 | |||||||||||||
| 155 | Type: string | Required: required | ||||||||||||
| 156 | The Spotify ID for the show. | ||||||||||||
| 157 | |||||||||||||
| 158 | =back | ||||||||||||
| 159 | |||||||||||||
| 160 | =head3 query_parameter | ||||||||||||
| 161 | |||||||||||||
| 162 | =over 4 | ||||||||||||
| 163 | |||||||||||||
| 164 | =item limit | ||||||||||||
| 165 | |||||||||||||
| 166 | Type: integer | Required: optional | ||||||||||||
| 167 | The maximum number of episodes to return. Default: 20. Minimum: 1. Maximum: 50. | ||||||||||||
| 168 | |||||||||||||
| 169 | =item market | ||||||||||||
| 170 | |||||||||||||
| 171 | Type: string | Required: optional | ||||||||||||
| 172 | An ISO 3166-1 alpha-2 country code. | ||||||||||||
| 173 | If a country code is specified, only shows and episodes that are available in that market will be returned. | ||||||||||||
| 174 | If a valid user access token is specified in the request header, the country associated with | ||||||||||||
| 175 | the user account will take priority over this parameter. | ||||||||||||
| 176 | Note: If neither market or user country are provided, the content is considered unavailable for the client. | ||||||||||||
| 177 | Users can view the country that is associated with their account in the account settings. | ||||||||||||
| 178 | |||||||||||||
| 179 | =item offset | ||||||||||||
| 180 | |||||||||||||
| 181 | Type: integer | Required: optional | ||||||||||||
| 182 | The index of the first episode to return. Default: 0 (the first object). Use with limit to get the next set of episodes. | ||||||||||||
| 183 | |||||||||||||
| 184 | =back | ||||||||||||
| 185 | |||||||||||||
| 186 | and Response Objects being: | ||||||||||||
| 187 | |||||||||||||
| 188 | - episode object | ||||||||||||
| 189 | |||||||||||||
| 190 | |||||||||||||
| 191 | On success, the HTTP status code in the response header is 200 OK and the response body contains an array of simplified episode objects (wrapped in a paging object) in JSON format. | ||||||||||||
| 192 | On error, the header status code is an error code and the response body contains an error object. | ||||||||||||
| 193 | If a show is unavailable in the given market the HTTP status code in the response header is 404 NOT FOUND. Unavailable episodes are filtered out.Try in our Web Console | ||||||||||||
| 194 | |||||||||||||
| 195 | =cut | ||||||||||||
| 196 | |||||||||||||
| 197 | 0 | ▶ | async sub get_a_shows_episodes { | ||||||||||
|
Subroutine
get_a_shows_episodes: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 198 | 0 | my ($self, %args) = @_; | |||||||||||
| 199 | |||||||||||||
| 200 | 0 | my $mapping = $self->mapping; | |||||||||||
| 201 | 0 | ▶ | my $request->{method} = $mapping->{get_a_shows_episodes}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_shows_episodes"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_a_shows_episodes"}{"method"} // "GET"
$mapping->{"get_a_shows_episodes"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_a_shows_episodes"}{"method"}
| |||||||||||||
| 202 | 0 | ▶ | $request->{uri} = $mapping->{get_a_shows_episodes}{uri} // 'https://api.spotify.com/v1/shows/{id}/episodes'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_shows_episodes"}{"uri"} // "https://api.spotify.com/v1/shows/{id}/episodes"
MC/DC0%0/1
$mapping->{"get_a_shows_episodes"}{"uri"} // "https://api.spotify.com/v1/shows/{id}/episodes"
$mapping->{"get_a_shows_episodes"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_a_shows_episodes"}{"uri"}
| |||||||||||||
| 203 | $request->{param} = $mapping->{get_a_shows_episodes}{param} // { | ||||||||||||
| 204 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_shows_episodes"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_a_shows_episodes"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "path_parameter", {"id", {"type", "string", "required", "required"}}, "query_parameter", {"limit", {"type", "integer", "required", "optional"}, "market", {"type", "string", "required", "optional"}, "offset", {"type", "integer", "required", "optional"}}}
$mapping->{"get_a_shows_episodes"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_a_shows_episodes"}{"param"}
| |||||||||||||
| 205 | 'Authorization' => { | ||||||||||||
| 206 | type => 'string', | ||||||||||||
| 207 | required => 'required', | ||||||||||||
| 208 | }, | ||||||||||||
| 209 | }, | ||||||||||||
| 210 | path_parameter => { | ||||||||||||
| 211 | 'id' => { | ||||||||||||
| 212 | type => 'string', | ||||||||||||
| 213 | required => 'required', | ||||||||||||
| 214 | }, | ||||||||||||
| 215 | }, | ||||||||||||
| 216 | query_parameter => { | ||||||||||||
| 217 | 'limit' => { | ||||||||||||
| 218 | type => 'integer', | ||||||||||||
| 219 | required => 'optional', | ||||||||||||
| 220 | }, | ||||||||||||
| 221 | 'market' => { | ||||||||||||
| 222 | type => 'string', | ||||||||||||
| 223 | required => 'optional', | ||||||||||||
| 224 | }, | ||||||||||||
| 225 | 'offset' => { | ||||||||||||
| 226 | type => 'integer', | ||||||||||||
| 227 | required => 'optional', | ||||||||||||
| 228 | }, | ||||||||||||
| 229 | }, | ||||||||||||
| 230 | }; | ||||||||||||
| 231 | my $response_objs = $mapping->{get_a_shows_episodes}{response} // [ | ||||||||||||
| 232 | 0 | ▶ | 'episode object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_a_shows_episodes"}{"response"} // ["episode object"]
MC/DC0%0/1
$mapping->{"get_a_shows_episodes"}{"response"} // ["episode object"]
$mapping->{"get_a_shows_episodes"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_a_shows_episodes"}{"response"}
| |||||||||||||
| 233 | |||||||||||||
| 234 | ]; | ||||||||||||
| 235 | |||||||||||||
| 236 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 237 | 2 | } | |||||||||||
| 238 | |||||||||||||
| 239 | =head2 get_multiple_shows | ||||||||||||
| 240 | |||||||||||||
| 241 | get_multiple_shows - Get Multiple Shows | ||||||||||||
| 242 | |||||||||||||
| 243 | Get Spotify catalog information for several shows based on their Spotify IDs. | ||||||||||||
| 244 | |||||||||||||
| 245 | with Request details being: | ||||||||||||
| 246 | |||||||||||||
| 247 | =head3 header | ||||||||||||
| 248 | |||||||||||||
| 249 | =over 4 | ||||||||||||
| 250 | |||||||||||||
| 251 | =item Authorization | ||||||||||||
| 252 | |||||||||||||
| 253 | Type: string | Required: required | ||||||||||||
| 254 | A valid access token from the Spotify Accounts service: | ||||||||||||
| 255 | see the Web API Authorization Guide | ||||||||||||
| 256 | for details. | ||||||||||||
| 257 | |||||||||||||
| 258 | =back | ||||||||||||
| 259 | |||||||||||||
| 260 | =head3 query_parameter | ||||||||||||
| 261 | |||||||||||||
| 262 | =over 4 | ||||||||||||
| 263 | |||||||||||||
| 264 | =item ids | ||||||||||||
| 265 | |||||||||||||
| 266 | Type: string | Required: required | ||||||||||||
| 267 | A comma-separated list of the Spotify IDs for the shows. Maximum: 50 IDs. | ||||||||||||
| 268 | |||||||||||||
| 269 | =item market | ||||||||||||
| 270 | |||||||||||||
| 271 | Type: string | Required: optional | ||||||||||||
| 272 | An ISO 3166-1 alpha-2 country code. | ||||||||||||
| 273 | If a country code is specified, only shows and episodes that are available in that market will be returned. | ||||||||||||
| 274 | If a valid user access token is specified in the request header, the country associated with | ||||||||||||
| 275 | the user account will take priority over this parameter. | ||||||||||||
| 276 | Note: If neither market or user country are provided, the content is considered unavailable for the client. | ||||||||||||
| 277 | Users can view the country that is associated with their account in the account settings. | ||||||||||||
| 278 | |||||||||||||
| 279 | =back | ||||||||||||
| 280 | |||||||||||||
| 281 | and Response Objects being: | ||||||||||||
| 282 | |||||||||||||
| 283 | - an object | ||||||||||||
| 284 | - an object | ||||||||||||
| 285 | |||||||||||||
| 286 | |||||||||||||
| 287 | On success, the HTTP status code in the response header is 200 | ||||||||||||
| 288 | OK and the response body contains an object whose key is shows and whose | ||||||||||||
| 289 | value is an array of simple show object | ||||||||||||
| 290 | 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. If a show is unavailable in the given market, a null value is returned. 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 | ||||||||||||
| 291 | |||||||||||||
| 292 | =cut | ||||||||||||
| 293 | |||||||||||||
| 294 | 0 | ▶ | async sub get_multiple_shows { | ||||||||||
|
Subroutine
get_multiple_shows: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 295 | 0 | my ($self, %args) = @_; | |||||||||||
| 296 | |||||||||||||
| 297 | 0 | my $mapping = $self->mapping; | |||||||||||
| 298 | 0 | ▶ | my $request->{method} = $mapping->{get_multiple_shows}{method} // 'GET'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_shows"}{"method"} // "GET"
MC/DC0%0/1
$mapping->{"get_multiple_shows"}{"method"} // "GET"
$mapping->{"get_multiple_shows"}{"method"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_shows"}{"method"}
| |||||||||||||
| 299 | 0 | ▶ | $request->{uri} = $mapping->{get_multiple_shows}{uri} // 'https://api.spotify.com/v1/shows'; | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_shows"}{"uri"} // "https://api.spotify.com/v1/shows"
MC/DC0%0/1
$mapping->{"get_multiple_shows"}{"uri"} // "https://api.spotify.com/v1/shows"
$mapping->{"get_multiple_shows"}{"uri"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_shows"}{"uri"}
| |||||||||||||
| 300 | $request->{param} = $mapping->{get_multiple_shows}{param} // { | ||||||||||||
| 301 | 0 | ▶ | header => { | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_shows"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"ids", {"type", "string", "required", "required"}, "market", {"type", "string", "required", "optional"}}}
MC/DC0%0/1
$mapping->{"get_multiple_shows"}{"param"} // {"header", {"Authorization", {"type", "string", "required", "required"}}, "query_parameter", {"ids", {"type", "string", "required", "required"}, "market", {"type", "string", "required", "optional"}}}
$mapping->{"get_multiple_shows"}{"param"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_shows"}{"param"}
| |||||||||||||
| 302 | 'Authorization' => { | ||||||||||||
| 303 | type => 'string', | ||||||||||||
| 304 | required => 'required', | ||||||||||||
| 305 | }, | ||||||||||||
| 306 | }, | ||||||||||||
| 307 | query_parameter => { | ||||||||||||
| 308 | 'ids' => { | ||||||||||||
| 309 | type => 'string', | ||||||||||||
| 310 | required => 'required', | ||||||||||||
| 311 | }, | ||||||||||||
| 312 | 'market' => { | ||||||||||||
| 313 | type => 'string', | ||||||||||||
| 314 | required => 'optional', | ||||||||||||
| 315 | }, | ||||||||||||
| 316 | }, | ||||||||||||
| 317 | }; | ||||||||||||
| 318 | my $response_objs = $mapping->{get_multiple_shows}{response} // [ | ||||||||||||
| 319 | 0 | ▶ | 'an object', | ||||||||||
|
Condition0%0/2
$mapping->{"get_multiple_shows"}{"response"} // ["an object", "an object"]
MC/DC0%0/1
$mapping->{"get_multiple_shows"}{"response"} // ["an object", "an object"]
$mapping->{"get_multiple_shows"}{"response"}
Truth table0%0/2
A
A= $mapping->{"get_multiple_shows"}{"response"}
| |||||||||||||
| 320 | 'an object', | ||||||||||||
| 321 | |||||||||||||
| 322 | ]; | ||||||||||||
| 323 | |||||||||||||
| 324 | 0 | await $self->call_api($request, $response_objs, %args); | |||||||||||
| 325 | 2 | } | |||||||||||
| 326 | |||||||||||||
| 327 | 2 | 1; | |||||||||||