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, Type

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: , type: , uri: , restrictions: nil) ⇒ Object

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

Parameters:



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

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

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

  # @!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:, type:, uri:, restrictions: nil)
  #   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 type [Symbol, Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::Type] The object type.
  #
  #   @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the albu
  #
  #   @param restrictions [Spotted::Models::AlbumRestrictionObject] Included in the response when a content restriction is applied.

  # 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

  # The object type.
  #
  # @see Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item#type
  module Type
    extend Spotted::Internal::Type::Enum

    ALBUM = :album

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

Instance Attribute Details

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

The type of the album.



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

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.



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

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


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

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

#external_urlsSpotted::Models::ExternalURLObject

Known external URLs for this album.



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

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

#hrefString

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

Returns:

  • (String)


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

required :href, String

#idString

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

Returns:

  • (String)


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

required :id, String

#imagesArray<Spotted::Models::ImageObject>

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

Returns:



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

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)


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

required :name, String

#release_dateString

The date the album was first released.

Returns:

  • (String)


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

required :release_date, String

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

The precision with which ‘release_date` value is known.



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

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

#restrictionsSpotted::Models::AlbumRestrictionObject?

Included in the response when a content restriction is applied.



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

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

#total_tracksInteger

The number of tracks in the album.

Returns:

  • (Integer)


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

required :total_tracks, Integer

#typeSymbol, Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::Type

The object type.



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

required :type, enum: -> { Spotted::Models::BrowseGetNewReleasesResponse::Albums::Item::Type }

#uriString

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

Returns:

  • (String)


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

required :uri, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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