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>? deprecated Deprecated.
-
#disc_number ⇒ Integer?
The disc number (usually
1unless 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? deprecated Deprecated.
-
#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 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 is applied.
- #linked_from ⇒ Spotted::Models::LinkedTrackObject? deprecated Deprecated.
-
#name ⇒ String?
The name of the track.
- #popularity ⇒ Integer? deprecated Deprecated.
- #preview_url ⇒ String? deprecated Deprecated.
-
#published ⇒ Boolean?
The playlist's public/private status (if it should be added to the user's profile or not):
truethe playlist will be public,falsethe playlist will be private,nullthe playlist status is not relevant. -
#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 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, published: 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, published: 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 167
|
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 code.
34 |
# File 'lib/spotted/models/track_object.rb', line 34 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).
40 |
# File 'lib/spotted/models/track_object.rb', line 40 optional :disc_number, Integer |
#duration_ms ⇒ Integer?
The track length in milliseconds.
46 |
# File 'lib/spotted/models/track_object.rb', line 46 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).
53 |
# File 'lib/spotted/models/track_object.rb', line 53 optional :explicit, Spotted::Internal::Type::Boolean |
#external_ids ⇒ Spotted::Models::ExternalIDObject?
Known external IDs for the track.
61 |
# File 'lib/spotted/models/track_object.rb', line 61 optional :external_ids, -> { Spotted::ExternalIDObject } |
#external_urls ⇒ Spotted::Models::ExternalURLObject?
Known external URLs for this track.
67 |
# File 'lib/spotted/models/track_object.rb', line 67 optional :external_urls, -> { Spotted::ExternalURLObject } |
#href ⇒ String?
A link to the Web API endpoint providing full details of the track.
73 |
# File 'lib/spotted/models/track_object.rb', line 73 optional :href, String |
#id ⇒ String?
The Spotify ID 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.
79 |
# File 'lib/spotted/models/track_object.rb', line 79 optional :is_local, Spotted::Internal::Type::Boolean |
#is_playable ⇒ Boolean?
Part of the response when
Track Relinking is applied.
If true, the track is playable in the given market. Otherwise false.
87 |
# File 'lib/spotted/models/track_object.rb', line 87 optional :is_playable, Spotted::Internal::Type::Boolean |
#linked_from ⇒ Spotted::Models::LinkedTrackObject?
Part of the response when
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.
98 |
# File 'lib/spotted/models/track_object.rb', line 98 optional :linked_from, -> { Spotted::LinkedTrackObject } |
#name ⇒ String?
The name of the track.
104 |
# File 'lib/spotted/models/track_object.rb', line 104 optional :name, String |
#popularity ⇒ Integer?
The popularity of the track. The value will be between 0 and 100, with 100 being
the most popular.
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.
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.
121 |
# File 'lib/spotted/models/track_object.rb', line 121 optional :popularity, Integer |
#preview_url ⇒ String?
A link to a 30 second preview (MP3 format) of the track. Can be null
129 |
# File 'lib/spotted/models/track_object.rb', line 129 optional :preview_url, String, nil?: true |
#published ⇒ Boolean?
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
139 |
# File 'lib/spotted/models/track_object.rb', line 139 optional :published, Spotted::Internal::Type::Boolean |
#restrictions ⇒ Spotted::Models::TrackRestrictionObject?
Included in the response when a content restriction is applied.
145 |
# File 'lib/spotted/models/track_object.rb', line 145 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.
152 |
# File 'lib/spotted/models/track_object.rb', line 152 optional :track_number, Integer |
#type ⇒ Symbol, ...
The object type: "track".
158 |
# File 'lib/spotted/models/track_object.rb', line 158 optional :type, enum: -> { Spotted::TrackObject::Type } |
#uri ⇒ String?
The Spotify URI for the track.
165 |
# File 'lib/spotted/models/track_object.rb', line 165 optional :uri, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/spotted/models/track_object.rb', line 379
|