Class: Spotted::Models::AlbumListResponse::Album
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Spotted::Models::AlbumListResponse::Album
- Defined in:
- lib/spotted/models/album_list_response.rb
Defined Under Namespace
Modules: AlbumType, ReleaseDatePrecision, Type Classes: Tracks
Instance Attribute Summary collapse
-
#album_type ⇒ Symbol, Spotted::Models::AlbumListResponse::Album::AlbumType
The type of the album.
-
#artists ⇒ Array<Spotted::Models::SimplifiedArtistObject>?
The artists of the album.
-
#available_markets ⇒ Array<String>
The markets in which the album is available: [ISO 3166-1 alpha-2 country codes](en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
-
#copyrights ⇒ Array<Spotted::Models::CopyrightObject>?
The copyright statements of the album.
-
#external_ids ⇒ Spotted::Models::ExternalIDObject?
Known external IDs for the album.
-
#external_urls ⇒ Spotted::Models::ExternalURLObject
Known external URLs for this album.
- #genres ⇒ Array<String>? deprecated Deprecated.
-
#href ⇒ String
A link to the Web API endpoint providing full details of the album.
-
#id ⇒ String
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the album.
-
#images ⇒ Array<Spotted::Models::ImageObject>
The cover art for the album in various sizes, widest first.
-
#label ⇒ String?
The label associated with the album.
-
#name ⇒ String
The name of the album.
-
#popularity ⇒ Integer?
The popularity of the album.
-
#release_date ⇒ String
The date the album was first released.
-
#release_date_precision ⇒ Symbol, Spotted::Models::AlbumListResponse::Album::ReleaseDatePrecision
The precision with which ‘release_date` value is known.
-
#restrictions ⇒ Spotted::Models::AlbumRestrictionObject?
Included in the response when a content restriction is applied.
-
#total_tracks ⇒ Integer
The number of tracks in the album.
-
#tracks ⇒ Spotted::Models::AlbumListResponse::Album::Tracks?
The tracks of the album.
-
#type ⇒ Symbol, Spotted::Models::AlbumListResponse::Album::Type
The object type.
-
#uri ⇒ String
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the album.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: , album_type: , available_markets: , external_urls: , href: , images: , name: , release_date: , release_date_precision: , total_tracks: , type: , uri: , artists: nil, copyrights: nil, external_ids: nil, genres: nil, label: nil, popularity: nil, restrictions: nil, tracks: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Album for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id: , album_type: , available_markets: , external_urls: , href: , images: , name: , release_date: , release_date_precision: , total_tracks: , type: , uri: , artists: nil, copyrights: nil, external_ids: nil, genres: nil, label: nil, popularity: nil, restrictions: nil, tracks: nil) ⇒ Object
Some parameter documentations has been truncated, see Spotted::Models::AlbumListResponse::Album for more details.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/spotted/models/album_list_response.rb', line 15 class Album < Spotted::Internal::Type::BaseModel # @!attribute id # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the # album. # # @return [String] required :id, String # @!attribute album_type # The type of the album. # # @return [Symbol, Spotted::Models::AlbumListResponse::Album::AlbumType] required :album_type, enum: -> { Spotted::Models::AlbumListResponse::Album::AlbumType } # @!attribute available_markets # The markets in which the album is available: # [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). # _**NOTE**: an album is considered available in a market when at least 1 of its # tracks is available in that market._ # # @return [Array<String>] required :available_markets, Spotted::Internal::Type::ArrayOf[String] # @!attribute external_urls # Known external URLs for this album. # # @return [Spotted::Models::ExternalURLObject] required :external_urls, -> { Spotted::ExternalURLObject } # @!attribute href # A link to the Web API endpoint providing full details of the album. # # @return [String] required :href, String # @!attribute images # The cover art for the album in various sizes, widest first. # # @return [Array<Spotted::Models::ImageObject>] required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] } # @!attribute name # The name of the album. In case of an album takedown, the value may be an empty # string. # # @return [String] required :name, String # @!attribute release_date # The date the album was first released. # # @return [String] required :release_date, String # @!attribute release_date_precision # The precision with which `release_date` value is known. # # @return [Symbol, Spotted::Models::AlbumListResponse::Album::ReleaseDatePrecision] required :release_date_precision, enum: -> { Spotted::Models::AlbumListResponse::Album::ReleaseDatePrecision } # @!attribute total_tracks # The number of tracks in the album. # # @return [Integer] required :total_tracks, Integer # @!attribute type # The object type. # # @return [Symbol, Spotted::Models::AlbumListResponse::Album::Type] required :type, enum: -> { Spotted::Models::AlbumListResponse::Album::Type } # @!attribute uri # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the # album. # # @return [String] required :uri, String # @!attribute artists # The artists of the album. Each artist object includes a link in `href` to more # detailed information about the artist. # # @return [Array<Spotted::Models::SimplifiedArtistObject>, nil] optional :artists, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedArtistObject] } # @!attribute copyrights # The copyright statements of the album. # # @return [Array<Spotted::Models::CopyrightObject>, nil] optional :copyrights, -> { Spotted::Internal::Type::ArrayOf[Spotted::CopyrightObject] } # @!attribute external_ids # Known external IDs for the album. # # @return [Spotted::Models::ExternalIDObject, nil] optional :external_ids, -> { Spotted::ExternalIDObject } # @!attribute genres # @deprecated # # **Deprecated** The array is always empty. # # @return [Array<String>, nil] optional :genres, Spotted::Internal::Type::ArrayOf[String] # @!attribute label # The label associated with the album. # # @return [String, nil] optional :label, String # @!attribute popularity # The popularity of the album. The value will be between 0 and 100, with 100 being # the most popular. # # @return [Integer, nil] optional :popularity, Integer # @!attribute restrictions # Included in the response when a content restriction is applied. # # @return [Spotted::Models::AlbumRestrictionObject, nil] optional :restrictions, -> { Spotted::AlbumRestrictionObject } # @!attribute tracks # The tracks of the album. # # @return [Spotted::Models::AlbumListResponse::Album::Tracks, nil] optional :tracks, -> { Spotted::Models::AlbumListResponse::Album::Tracks } # @!method initialize(id:, album_type:, available_markets:, external_urls:, href:, images:, name:, release_date:, release_date_precision:, total_tracks:, type:, uri:, artists: nil, copyrights: nil, external_ids: nil, genres: nil, label: nil, popularity: nil, restrictions: nil, tracks: nil) # Some parameter documentations has been truncated, see # {Spotted::Models::AlbumListResponse::Album} for more details. # # @param id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the album # # @param album_type [Symbol, Spotted::Models::AlbumListResponse::Album::AlbumType] The type of the album. # # @param available_markets [Array<String>] The markets in which the album is available: [ISO 3166-1 alpha-2 country codes]( # # @param external_urls [Spotted::Models::ExternalURLObject] Known external URLs for this album. # # @param href [String] A link to the Web API endpoint providing full details of the album. # # @param images [Array<Spotted::Models::ImageObject>] The cover art for the album in various sizes, widest first. # # @param name [String] The name of the album. In case of an album takedown, the value may be an empty s # # @param release_date [String] The date the album was first released. # # @param release_date_precision [Symbol, Spotted::Models::AlbumListResponse::Album::ReleaseDatePrecision] The precision with which `release_date` value is known. # # @param total_tracks [Integer] The number of tracks in the album. # # @param type [Symbol, Spotted::Models::AlbumListResponse::Album::Type] The object type. # # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the albu # # @param artists [Array<Spotted::Models::SimplifiedArtistObject>] The artists of the album. Each artist object includes a link in `href` to more d # # @param copyrights [Array<Spotted::Models::CopyrightObject>] The copyright statements of the album. # # @param external_ids [Spotted::Models::ExternalIDObject] Known external IDs for the album. # # @param genres [Array<String>] **Deprecated** The array is always empty. # # @param label [String] The label associated with the album. # # @param popularity [Integer] The popularity of the album. The value will be between 0 and 100, with 100 being # # @param restrictions [Spotted::Models::AlbumRestrictionObject] Included in the response when a content restriction is applied. # # @param tracks [Spotted::Models::AlbumListResponse::Album::Tracks] The tracks of the album. # The type of the album. # # @see Spotted::Models::AlbumListResponse::Album#album_type module AlbumType extend Spotted::Internal::Type::Enum ALBUM = :album SINGLE = :single COMPILATION = :compilation # @!method self.values # @return [Array<Symbol>] end # The precision with which `release_date` value is known. # # @see Spotted::Models::AlbumListResponse::Album#release_date_precision module ReleaseDatePrecision extend Spotted::Internal::Type::Enum YEAR = :year MONTH = :month DAY = :day # @!method self.values # @return [Array<Symbol>] end # The object type. # # @see Spotted::Models::AlbumListResponse::Album#type module Type extend Spotted::Internal::Type::Enum ALBUM = :album # @!method self.values # @return [Array<Symbol>] end # @see Spotted::Models::AlbumListResponse::Album#tracks class Tracks < Spotted::Internal::Type::BaseModel # @!attribute href # A link to the Web API endpoint returning the full result of the request # # @return [String] required :href, String # @!attribute items # # @return [Array<Spotted::Models::SimplifiedTrackObject>] required :items, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedTrackObject] } # @!attribute limit # The maximum number of items in the response (as set in the query or by default). # # @return [Integer] required :limit, Integer # @!attribute next_ # URL to the next page of items. ( `null` if none) # # @return [String, nil] required :next_, String, api_name: :next, nil?: true # @!attribute offset # The offset of the items returned (as set in the query or by default) # # @return [Integer] required :offset, Integer # @!attribute previous # URL to the previous page of items. ( `null` if none) # # @return [String, nil] required :previous, String, nil?: true # @!attribute total # The total number of items available to return. # # @return [Integer] required :total, Integer # @!method initialize(href:, items:, limit:, next_:, offset:, previous:, total:) # Some parameter documentations has been truncated, see # {Spotted::Models::AlbumListResponse::Album::Tracks} for more details. # # The tracks of the album. # # @param href [String] A link to the Web API endpoint returning the full result of the request # # @param items [Array<Spotted::Models::SimplifiedTrackObject>] # # @param limit [Integer] The maximum number of items in the response (as set in the query or by default). # # @param next_ [String, nil] URL to the next page of items. ( `null` if none) # # @param offset [Integer] The offset of the items returned (as set in the query or by default) # # @param previous [String, nil] URL to the previous page of items. ( `null` if none) # # @param total [Integer] The total number of items available to return. end end |
Instance Attribute Details
#album_type ⇒ Symbol, Spotted::Models::AlbumListResponse::Album::AlbumType
The type of the album.
27 |
# File 'lib/spotted/models/album_list_response.rb', line 27 required :album_type, enum: -> { Spotted::Models::AlbumListResponse::Album::AlbumType } |
#artists ⇒ Array<Spotted::Models::SimplifiedArtistObject>?
The artists of the album. Each artist object includes a link in ‘href` to more detailed information about the artist.
100 |
# File 'lib/spotted/models/album_list_response.rb', line 100 optional :artists, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedArtistObject] } |
#available_markets ⇒ Array<String>
The markets in which the album is available: [ISO 3166-1 alpha-2 country codes](en.wikipedia.org/wiki/ISO_3166-1_alpha-2). _NOTE: an album is considered available in a market when at least 1 of its tracks is available in that market._
36 |
# File 'lib/spotted/models/album_list_response.rb', line 36 required :available_markets, Spotted::Internal::Type::ArrayOf[String] |
#copyrights ⇒ Array<Spotted::Models::CopyrightObject>?
The copyright statements of the album.
106 |
# File 'lib/spotted/models/album_list_response.rb', line 106 optional :copyrights, -> { Spotted::Internal::Type::ArrayOf[Spotted::CopyrightObject] } |
#external_ids ⇒ Spotted::Models::ExternalIDObject?
Known external IDs for the album.
112 |
# File 'lib/spotted/models/album_list_response.rb', line 112 optional :external_ids, -> { Spotted::ExternalIDObject } |
#external_urls ⇒ Spotted::Models::ExternalURLObject
Known external URLs for this album.
42 |
# File 'lib/spotted/models/album_list_response.rb', line 42 required :external_urls, -> { Spotted::ExternalURLObject } |
#genres ⇒ Array<String>?
Deprecated The array is always empty.
120 |
# File 'lib/spotted/models/album_list_response.rb', line 120 optional :genres, Spotted::Internal::Type::ArrayOf[String] |
#href ⇒ String
A link to the Web API endpoint providing full details of the album.
48 |
# File 'lib/spotted/models/album_list_response.rb', line 48 required :href, String |
#id ⇒ String
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the album.
21 |
# File 'lib/spotted/models/album_list_response.rb', line 21 required :id, String |
#images ⇒ Array<Spotted::Models::ImageObject>
The cover art for the album in various sizes, widest first.
54 |
# File 'lib/spotted/models/album_list_response.rb', line 54 required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] } |
#label ⇒ String?
The label associated with the album.
126 |
# File 'lib/spotted/models/album_list_response.rb', line 126 optional :label, String |
#name ⇒ String
The name of the album. In case of an album takedown, the value may be an empty string.
61 |
# File 'lib/spotted/models/album_list_response.rb', line 61 required :name, String |
#popularity ⇒ Integer?
The popularity of the album. The value will be between 0 and 100, with 100 being the most popular.
133 |
# File 'lib/spotted/models/album_list_response.rb', line 133 optional :popularity, Integer |
#release_date ⇒ String
The date the album was first released.
67 |
# File 'lib/spotted/models/album_list_response.rb', line 67 required :release_date, String |
#release_date_precision ⇒ Symbol, Spotted::Models::AlbumListResponse::Album::ReleaseDatePrecision
The precision with which ‘release_date` value is known.
73 74 |
# File 'lib/spotted/models/album_list_response.rb', line 73 required :release_date_precision, enum: -> { Spotted::Models::AlbumListResponse::Album::ReleaseDatePrecision } |
#restrictions ⇒ Spotted::Models::AlbumRestrictionObject?
Included in the response when a content restriction is applied.
139 |
# File 'lib/spotted/models/album_list_response.rb', line 139 optional :restrictions, -> { Spotted::AlbumRestrictionObject } |
#total_tracks ⇒ Integer
The number of tracks in the album.
80 |
# File 'lib/spotted/models/album_list_response.rb', line 80 required :total_tracks, Integer |
#tracks ⇒ Spotted::Models::AlbumListResponse::Album::Tracks?
The tracks of the album.
145 |
# File 'lib/spotted/models/album_list_response.rb', line 145 optional :tracks, -> { Spotted::Models::AlbumListResponse::Album::Tracks } |
#type ⇒ Symbol, Spotted::Models::AlbumListResponse::Album::Type
The object type.
86 |
# File 'lib/spotted/models/album_list_response.rb', line 86 required :type, enum: -> { Spotted::Models::AlbumListResponse::Album::Type } |
#uri ⇒ String
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the album.
93 |
# File 'lib/spotted/models/album_list_response.rb', line 93 required :uri, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/spotted/models/album_list_response.rb', line 201
|