Class: Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item

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

Defined Under Namespace

Modules: AlbumType, ReleaseDatePrecision

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:, artists:, available_markets:, external_urls:, href:, images:, name:, release_date:, release_date_precision:, total_tracks:, uri:, published: nil, restrictions: nil, type: :album) ⇒ Object

Some parameter documentations has been truncated, see Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item for more details.

Parameters:

  • id (String)

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

  • album_type (Symbol, Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::AlbumType)

    The type of the album.

  • artists (Array<Spotted::Models::SimplifiedArtistObject>)

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

  • 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::BrowseGetNewReleasesResponse::Albums::Item::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

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

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

    The object type.



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
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 89

class Item < 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::BrowseGetNewReleasesResponse::Albums::Item::AlbumType]
  required :album_type, enum: -> { Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::AlbumType }

  # @!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>]
  required :artists, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedArtistObject] }

  # @!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::BrowseGetNewReleasesResponse::Albums::Item::ReleaseDatePrecision]
  required :release_date_precision,
           enum: -> { Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::ReleaseDatePrecision }

  # @!attribute total_tracks
  #   The number of tracks in the album.
  #
  #   @return [Integer]
  required :total_tracks, Integer

  # @!attribute type
  #   The object type.
  #
  #   @return [Symbol, :album]
  required :type, const: :album

  # @!attribute uri
  #   The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
  #   album.
  #
  #   @return [String]
  required :uri, String

  # @!attribute published
  #   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)
  #
  #   @return [Boolean, nil]
  optional :published, Spotted::Internal::Type::Boolean

  # @!attribute restrictions
  #   Included in the response when a content restriction is applied.
  #
  #   @return [Spotted::Models::AlbumRestrictionObject, nil]
  optional :restrictions, -> { Spotted::AlbumRestrictionObject }

  # @!method initialize(id:, album_type:, artists:, available_markets:, external_urls:, href:, images:, name:, release_date:, release_date_precision:, total_tracks:, uri:, published: nil, restrictions: nil, type: :album)
  #   Some parameter documentations has been truncated, see
  #   {Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item} 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::BrowseGetNewReleasesResponse::Albums::Item::AlbumType] The type of the album.
  #
  #   @param artists [Array<Spotted::Models::SimplifiedArtistObject>] The artists of the album. Each artist object includes a link in `href` to more d
  #
  #   @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::BrowseGetNewReleasesResponse::Albums::Item::ReleaseDatePrecision] The precision with which `release_date` value is known.
  #
  #   @param total_tracks [Integer] The number of tracks in the album.
  #
  #   @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the albu
  #
  #   @param published [Boolean] The playlist's public/private status (if it should be added to the user's profil
  #
  #   @param restrictions [Spotted::Models::AlbumRestrictionObject] Included in the response when a content restriction is applied.
  #
  #   @param type [Symbol, :album] The object type.

  # The type of the album.
  #
  # @see Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item#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::BrowseGetNewReleasesResponse::Albums::Item#release_date_precision
  module ReleaseDatePrecision
    extend Spotted::Internal::Type::Enum

    YEAR = :year
    MONTH = :month
    DAY = :day

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#album_typeSymbol, Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::AlbumType

The type of the album.



101
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 101

required :album_type, enum: -> { Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::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.



108
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 108

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

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

Returns:

  • (Array<String>)


117
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 117

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

#external_urlsSpotted::Models::ExternalURLObject

Known external URLs for this album.



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

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

#hrefString

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

Returns:

  • (String)


129
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 129

required :href, String

#idString

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

Returns:

  • (String)


95
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 95

required :id, String

#imagesArray<Spotted::Models::ImageObject>

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

Returns:



135
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 135

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

#nameString

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

Returns:

  • (String)


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

required :name, String

#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)


184
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 184

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

#release_dateString

The date the album was first released.

Returns:

  • (String)


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

required :release_date, String

#release_date_precisionSymbol, Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::ReleaseDatePrecision

The precision with which ‘release_date` value is known.



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

required :release_date_precision,
enum: -> { Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::ReleaseDatePrecision }

#restrictionsSpotted::Models::AlbumRestrictionObject?

Included in the response when a content restriction is applied.



190
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 190

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

#total_tracksInteger

The number of tracks in the album.

Returns:

  • (Integer)


161
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 161

required :total_tracks, Integer

#typeSymbol, :album

The object type.

Returns:

  • (Symbol, :album)


167
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 167

required :type, const: :album

#uriString

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

Returns:

  • (String)


174
# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 174

required :uri, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/spotted/models/browse_get_new_releases_response.rb', line 236