Class: Spotted::Models::TrackObject
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Spotted::Models::TrackObject
- Defined in:
- lib/spotted/models/track_object.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#album ⇒ Spotted::Models::TrackObject::Album?
The album on which the track appears.
-
#artists ⇒ Array<Spotted::Models::SimplifiedArtistObject>?
The artists who performed the track.
-
#available_markets ⇒ Array<String>?
A list of the countries in which the track can be played, identified by their [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
-
#disc_number ⇒ Integer?
The disc number (usually ‘1` unless the album consists of more than one disc).
-
#duration_ms ⇒ Integer?
The track length in milliseconds.
-
#explicit ⇒ Boolean?
Whether or not the track has explicit lyrics ( ‘true` = yes it does; `false` = no it does not OR unknown).
-
#external_ids ⇒ Spotted::Models::ExternalIDObject?
Known external IDs for the track.
-
#external_urls ⇒ Spotted::Models::ExternalURLObject?
Known external URLs for this track.
-
#href ⇒ String?
A link to the Web API endpoint providing full details of the track.
-
#id ⇒ String?
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the track.
-
#is_local ⇒ Boolean?
Whether or not the track is from a local file.
-
#is_playable ⇒ Boolean?
Part of the response when [Track Relinking](/documentation/web-api/concepts/track-relinking) is applied.
-
#linked_from ⇒ Spotted::Models::LinkedTrackObject?
Part of the response when [Track Relinking](/documentation/web-api/concepts/track-relinking) is applied, and the requested track has been replaced with different track.
-
#name ⇒ String?
The name of the track.
-
#popularity ⇒ Integer?
The popularity of the track.
- #preview_url ⇒ String? deprecated Deprecated.
-
#restrictions ⇒ Spotted::Models::TrackRestrictionObject?
Included in the response when a content restriction is applied.
-
#track_number ⇒ Integer?
The number of the track.
-
#type ⇒ Symbol, ...
The object type: “track”.
-
#uri ⇒ String?
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the track.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: nil, album: nil, artists: nil, available_markets: nil, disc_number: nil, duration_ms: nil, explicit: nil, external_ids: nil, external_urls: nil, href: nil, is_local: nil, is_playable: nil, linked_from: nil, name: nil, popularity: nil, preview_url: nil, restrictions: nil, track_number: nil, type: nil, uri: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see TrackObject 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: nil, album: nil, artists: nil, available_markets: nil, disc_number: nil, duration_ms: nil, explicit: nil, external_ids: nil, external_urls: nil, href: nil, is_local: nil, is_playable: nil, linked_from: nil, name: nil, popularity: nil, preview_url: nil, restrictions: nil, track_number: nil, type: nil, uri: nil) ⇒ Object
Some parameter documentations has been truncated, see Spotted::Models::TrackObject for more details.
|
|
# File 'lib/spotted/models/track_object.rb', line 149
|
Instance Attribute Details
#album ⇒ Spotted::Models::TrackObject::Album?
The album on which the track appears. The album object includes a link in ‘href` to full information about the album.
18 |
# File 'lib/spotted/models/track_object.rb', line 18 optional :album, -> { Spotted::TrackObject::Album } |
#artists ⇒ Array<Spotted::Models::SimplifiedArtistObject>?
The artists who performed the track. Each artist object includes a link in ‘href` to more detailed information about the artist.
25 |
# File 'lib/spotted/models/track_object.rb', line 25 optional :artists, -> { Spotted::Internal::Type::ArrayOf[Spotted::SimplifiedArtistObject] } |
#available_markets ⇒ Array<String>?
A list of the countries in which the track can be played, identified by their [ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
32 |
# File 'lib/spotted/models/track_object.rb', line 32 optional :available_markets, Spotted::Internal::Type::ArrayOf[String] |
#disc_number ⇒ Integer?
The disc number (usually ‘1` unless the album consists of more than one disc).
38 |
# File 'lib/spotted/models/track_object.rb', line 38 optional :disc_number, Integer |
#duration_ms ⇒ Integer?
The track length in milliseconds.
44 |
# File 'lib/spotted/models/track_object.rb', line 44 optional :duration_ms, Integer |
#explicit ⇒ Boolean?
Whether or not the track has explicit lyrics ( ‘true` = yes it does; `false` = no it does not OR unknown).
51 |
# File 'lib/spotted/models/track_object.rb', line 51 optional :explicit, Spotted::Internal::Type::Boolean |
#external_ids ⇒ Spotted::Models::ExternalIDObject?
Known external IDs for the track.
57 |
# File 'lib/spotted/models/track_object.rb', line 57 optional :external_ids, -> { Spotted::ExternalIDObject } |
#external_urls ⇒ Spotted::Models::ExternalURLObject?
Known external URLs for this track.
63 |
# File 'lib/spotted/models/track_object.rb', line 63 optional :external_urls, -> { Spotted::ExternalURLObject } |
#href ⇒ String?
A link to the Web API endpoint providing full details of the track.
69 |
# File 'lib/spotted/models/track_object.rb', line 69 optional :href, String |
#id ⇒ String?
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the track.
11 |
# File 'lib/spotted/models/track_object.rb', line 11 optional :id, String |
#is_local ⇒ Boolean?
Whether or not the track is from a local file.
75 |
# File 'lib/spotted/models/track_object.rb', line 75 optional :is_local, Spotted::Internal::Type::Boolean |
#is_playable ⇒ Boolean?
Part of the response when [Track Relinking](/documentation/web-api/concepts/track-relinking) is applied. If ‘true`, the track is playable in the given market. Otherwise `false`.
83 |
# File 'lib/spotted/models/track_object.rb', line 83 optional :is_playable, Spotted::Internal::Type::Boolean |
#linked_from ⇒ Spotted::Models::LinkedTrackObject?
Part of the response when [Track Relinking](/documentation/web-api/concepts/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.
92 |
# File 'lib/spotted/models/track_object.rb', line 92 optional :linked_from, -> { Spotted::LinkedTrackObject } |
#name ⇒ String?
The name of the track.
98 |
# File 'lib/spotted/models/track_object.rb', line 98 optional :name, String |
#popularity ⇒ Integer?
The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.<br/>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.<br/>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: the popularity value may lag actual popularity by a few days: the value is not updated in real time._
113 |
# File 'lib/spotted/models/track_object.rb', line 113 optional :popularity, Integer |
#preview_url ⇒ String?
A link to a 30 second preview (MP3 format) of the track. Can be ‘null`
121 |
# File 'lib/spotted/models/track_object.rb', line 121 optional :preview_url, String, nil?: true |
#restrictions ⇒ Spotted::Models::TrackRestrictionObject?
Included in the response when a content restriction is applied.
127 |
# File 'lib/spotted/models/track_object.rb', line 127 optional :restrictions, -> { Spotted::TrackRestrictionObject } |
#track_number ⇒ Integer?
The number of the track. If an album has several discs, the track number is the number on the specified disc.
134 |
# File 'lib/spotted/models/track_object.rb', line 134 optional :track_number, Integer |
#type ⇒ Symbol, ...
The object type: “track”.
140 |
# File 'lib/spotted/models/track_object.rb', line 140 optional :type, enum: -> { Spotted::TrackObject::Type } |
#uri ⇒ String?
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the track.
147 |
# File 'lib/spotted/models/track_object.rb', line 147 optional :uri, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/spotted/models/track_object.rb', line 357
|