lib/Net/Async/Spotify/Object/Generated/Track.pm

filter: Statementstmt 78.9% 15 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 76.0% 19 / 25 CC 1 SCAR 1.8
CC
1
Cov
79%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Net/Async/Spotify/Object/Generated/SimplifiedTrack.pm ↑ Summary lib/Net/Async/Spotify/Object/Generated/TrackRestriction.pm »
1 package Net::Async::Spotify::Object::Generated::Track;
2  
3 32 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 32 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 32 our $VERSION = '0.002'; # VERSION
7 32 our $AUTHORITY = 'cpan:VNEALV'; # AUTHORITY
8  
9 32 ▶use mro;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 32 ▶use parent qw(Net::Async::Spotify::Object::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 =encoding utf8
13  
14 =head1 NAME
15  
16 Net::Async::Spotify::Object::Generated::Track - Package representing Spotify Track Object
17  
18 =head1 DESCRIPTION
19  
20 Autogenerated module.
21 Based on https://developer.spotify.com/documentation/web-api/reference/#objects-index
22 Check C<crawl-api-doc.pl> for more information.
23  
24 =head1 PARAMETERS
25  
26 Those are Spotify Track Object attributes:
27  
28 =over 4
29  
30 =item album
31  
32 Type:SimplifiedAlbumObject
33 Description:The album on which the track appears. The album object includes a link in href to full information about the album.
34  
35 =item artists
36  
37 Type:Array[ArtistObject]
38 Description:The artists who performed the track. Each artist object includes a link in href to more detailed information about the artist.
39  
40 =item available_markets
41  
42 Type:Array[String]
43 Description:A list of the countries in which the track can be played, identified by their ISO 3166-1 alpha-2 code.
44  
45 =item disc_number
46  
47 Type:Integer
48 Description:The disc number (usually 1 unless the album consists of more than one disc).
49  
50 =item duration_ms
51  
52 Type:Integer
53 Description:The track length in milliseconds.
54  
55 =item explicit
56  
57 Type:Boolean
58 Description:Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).
59  
60 =item external_ids
61  
62 Type:ExternalIdObject
63 Description:Known external IDs for the track.
64  
65 =item external_urls
66  
67 Type:ExternalUrlObject
68 Description:Known external URLs for this track.
69  
70 =item href
71  
72 Type:String
73 Description:A link to the Web API endpoint providing full details of the track.
74  
75 =item id
76  
77 Type:String
78 Description:The Spotify ID for the track.
79  
80 =item is_local
81  
82 Type:Boolean
83 Description:Whether or not the track is from a local file.
84  
85 =item is_playable
86  
87 Type:Boolean
88 Description:Part of the response when Track Relinking is applied. If true , the track is playable in the given market. Otherwise false.
89  
90 =item linked_from
91  
92 Type:
93 Description:Part of the response when Track Relinking is applied, and the requested track has been replaced with different track. The track in the linked_from object contains information about the originally requested track.
94  
95 =item name
96  
97 Type:String
98 Description:The name of the track.
99  
100 =item popularity
101  
102 Type:Integer
103 Description:The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularity is calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how recent those plays are.Generally speaking, songs that are being played a lot now will have a higher popularity than songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album) are rated independently. Artist and album popularity is derived mathematically from track popularity. Note that the popularity value may lag actual popularity by a few days: the value is not updated in real time.
104  
105 =item preview_url
106  
107 Type:String
108 Description:A link to a 30 second preview (MP3 format) of the track. Can be null
109  
110 =item restrictions
111  
112 Type:TrackRestrictionObject
113 Description:Included in the response when a content restriction is applied.
114 See Restriction Object for more details.
115  
116 =item track_number
117  
118 Type:Integer
119 Description:The number of the track. If an album has several discs, the track number is the number on the specified disc.
120  
121 =item type
122  
123 Type:String
124 Description:The object type: “track”.
125  
126 =item uri
127  
128 Type:String
129 Description:The Spotify URI for the track.
130  
131 =back
132  
133 =cut
134  
135 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
136 0 my ($class, %args) = @_;
137  
138 0 my $fields = {
139 album => 'SimplifiedAlbumObject',
140 artists => 'Array[ArtistObject]',
141 available_markets => 'Array[String]',
142 disc_number => 'Integer',
143 duration_ms => 'Integer',
144 explicit => 'Boolean',
145 external_ids => 'ExternalIdObject',
146 external_urls => 'ExternalUrlObject',
147 href => 'String',
148 id => 'String',
149 is_local => 'Boolean',
150 is_playable => 'Boolean',
151 linked_from => '',
152 name => 'String',
153 popularity => 'Integer',
154 preview_url => 'String',
155 restrictions => 'TrackRestrictionObject',
156 track_number => 'Integer',
157 type => 'String',
158 uri => 'String',
159 };
160  
161 0 my $obj = next::method($class, $fields, %args);
162  
163 0 return $obj;
164 }
165  
166 32 1;
« lib/Net/Async/Spotify/Object/Generated/SimplifiedTrack.pm ↑ Summary lib/Net/Async/Spotify/Object/Generated/TrackRestriction.pm »