Class: Spotted::Models::AlbumRetrieveResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/spotted/models/album_retrieve_response.rb

Overview

Defined Under Namespace

Modules: AlbumType, ReleaseDatePrecision Classes: Tracks

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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:, uri:, artists: nil, copyrights: nil, external_ids: nil, genres: nil, label: nil, popularity: nil, published: nil, restrictions: nil, tracks: nil, type: :album) ⇒ Object

Some parameter documentations has been truncated, see Spotted::Models::AlbumRetrieveResponse for more details.

Parameters:

  • id (String)

    The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the album

  • album_type (Symbol, Spotted::Models::AlbumRetrieveResponse::AlbumType)

    The type of the album.

  • available_markets (Array<String>)

    The markets in which the album is available: [ISO 3166-1 alpha-2 country codes](

  • external_urls (Spotted::Models::ExternalURLObject)

    Known external URLs for this album.

  • href (String)

    A link to the Web API endpoint providing full details of the album.

  • images (Array<Spotted::Models::ImageObject>)

    The cover art for the album in various sizes, widest first.

  • name (String)

    The name of the album. In case of an album takedown, the value may be an empty s

  • release_date (String)

    The date the album was first released.

  • release_date_precision (Symbol, Spotted::Models::AlbumRetrieveResponse::ReleaseDatePrecision)

    The precision with which ‘release_date` value is known.

  • total_tracks (Integer)

    The number of tracks in the album.

  • uri (String)

    The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the albu

  • artists (Array<Spotted::Models::SimplifiedArtistObject>) (defaults to: nil)

    The artists of the album. Each artist object includes a link in ‘href` to more d

  • copyrights (Array<Spotted::Models::CopyrightObject>) (defaults to: nil)

    The copyright statements of the album.

  • external_ids (Spotted::Models::ExternalIDObject) (defaults to: nil)

    Known external IDs for the album.

  • genres (Array<String>) (defaults to: nil)

    Deprecated The array is always empty.

  • label (String) (defaults to: nil)

    The label associated with the album.

  • popularity (Integer) (defaults to: nil)

    The popularity of the album. The value will be between 0 and 100, with 100 being

  • published (Boolean) (defaults to: nil)

    The playlist’s public/private status (if it should be added to the user’s profil

  • restrictions (Spotted::Models::AlbumRestrictionObject) (defaults to: nil)

    Included in the response when a content restriction is applied.

  • tracks (Spotted::Models::AlbumRetrieveResponse::Tracks) (defaults to: nil)

    The tracks of the album.

  • type (Symbol, :album) (defaults to: :album)

    The object type.



# File 'lib/spotted/models/album_retrieve_response.rb', line 156

Instance Attribute Details

#album_typeSymbol, Spotted::Models::AlbumRetrieveResponse::AlbumType

The type of the album.



18
# File 'lib/spotted/models/album_retrieve_response.rb', line 18

required :album_type, enum: -> { Spotted::Models::AlbumRetrieveResponse::AlbumType }

#artistsArray<Spotted::Models::SimplifiedArtistObject>?

The artists of the album. Each artist object includes a link in ‘href` to more detailed information about the artist.



93
# File 'lib/spotted/models/album_retrieve_response.rb', line 93

optional :artists, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedArtistObject] }

#available_marketsArray<String>

Deprecated.

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._

Returns:

  • (Array<String>)


29
# File 'lib/spotted/models/album_retrieve_response.rb', line 29

required :available_markets, Spotted::Internal::Type::ArrayOf[String]

#copyrightsArray<Spotted::Models::CopyrightObject>?

The copyright statements of the album.

Returns:



99
# File 'lib/spotted/models/album_retrieve_response.rb', line 99

optional :copyrights, -> { Spotted::Internal::Type::ArrayOf[Spotted::CopyrightObject] }

#external_idsSpotted::Models::ExternalIDObject?

Deprecated.

Known external IDs for the album.



107
# File 'lib/spotted/models/album_retrieve_response.rb', line 107

optional :external_ids, -> { Spotted::ExternalIDObject }

#external_urlsSpotted::Models::ExternalURLObject

Known external URLs for this album.



35
# File 'lib/spotted/models/album_retrieve_response.rb', line 35

required :external_urls, -> { Spotted::ExternalURLObject }

#genresArray<String>?

Deprecated.

Deprecated The array is always empty.

Returns:

  • (Array<String>, nil)


115
# File 'lib/spotted/models/album_retrieve_response.rb', line 115

optional :genres, Spotted::Internal::Type::ArrayOf[String]

#hrefString

A link to the Web API endpoint providing full details of the album.

Returns:

  • (String)


41
# File 'lib/spotted/models/album_retrieve_response.rb', line 41

required :href, String

#idString

The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the album.

Returns:

  • (String)


12
# File 'lib/spotted/models/album_retrieve_response.rb', line 12

required :id, String

#imagesArray<Spotted::Models::ImageObject>

The cover art for the album in various sizes, widest first.

Returns:



47
# File 'lib/spotted/models/album_retrieve_response.rb', line 47

required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] }

#labelString?

Deprecated.

The label associated with the album.

Returns:

  • (String, nil)


123
# File 'lib/spotted/models/album_retrieve_response.rb', line 123

optional :label, String

#nameString

The name of the album. In case of an album takedown, the value may be an empty string.

Returns:

  • (String)


54
# File 'lib/spotted/models/album_retrieve_response.rb', line 54

required :name, String

#popularityInteger?

Deprecated.

The popularity of the album. The value will be between 0 and 100, with 100 being the most popular.

Returns:

  • (Integer, nil)


132
# File 'lib/spotted/models/album_retrieve_response.rb', line 132

optional :popularity, Integer

#publishedBoolean?

The playlist’s public/private status (if it should be added to the user’s profile or not): ‘true` the playlist will be public, `false` the playlist will be private, `null` the playlist status is not relevant. For more about public/private status, see [Working with Playlists](/documentation/web-api/concepts/playlists)

Returns:

  • (Boolean, nil)


142
# File 'lib/spotted/models/album_retrieve_response.rb', line 142

optional :published, Spotted::Internal::Type::Boolean

#release_dateString

The date the album was first released.

Returns:

  • (String)


60
# File 'lib/spotted/models/album_retrieve_response.rb', line 60

required :release_date, String

#release_date_precisionSymbol, Spotted::Models::AlbumRetrieveResponse::ReleaseDatePrecision

The precision with which ‘release_date` value is known.



66
67
# File 'lib/spotted/models/album_retrieve_response.rb', line 66

required :release_date_precision,
enum: -> { Spotted::Models::AlbumRetrieveResponse::ReleaseDatePrecision }

#restrictionsSpotted::Models::AlbumRestrictionObject?

Included in the response when a content restriction is applied.



148
# File 'lib/spotted/models/album_retrieve_response.rb', line 148

optional :restrictions, -> { Spotted::AlbumRestrictionObject }

#total_tracksInteger

The number of tracks in the album.

Returns:

  • (Integer)


73
# File 'lib/spotted/models/album_retrieve_response.rb', line 73

required :total_tracks, Integer

#tracksSpotted::Models::AlbumRetrieveResponse::Tracks?

The tracks of the album.



154
# File 'lib/spotted/models/album_retrieve_response.rb', line 154

optional :tracks, -> { Spotted::Models::AlbumRetrieveResponse::Tracks }

#typeSymbol, :album

The object type.

Returns:

  • (Symbol, :album)


79
# File 'lib/spotted/models/album_retrieve_response.rb', line 79

required :type, const: :album

#uriString

The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the album.

Returns:

  • (String)


86
# File 'lib/spotted/models/album_retrieve_response.rb', line 86

required :uri, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/spotted/models/album_retrieve_response.rb', line 212