Class: Spotted::Models::SimplifiedTrackObject
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Spotted::Models::SimplifiedTrackObject
- Defined in:
- lib/spotted/models/simplified_track_object.rb
Instance Attribute Summary collapse
-
#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_urls ⇒ Spotted::Models::ExternalURLObject?
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 is only part of the response if the track linking, in fact, exists.
-
#name ⇒ String?
The name 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 ⇒ String?
The object type: “track”.
-
#uri ⇒ String?
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the track.
Instance Method Summary collapse
-
#initialize(id: nil, artists: nil, available_markets: nil, disc_number: nil, duration_ms: nil, explicit: nil, external_urls: nil, href: nil, is_local: nil, is_playable: nil, linked_from: nil, name: nil, preview_url: nil, restrictions: nil, track_number: nil, type: nil, uri: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see SimplifiedTrackObject 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, artists: nil, available_markets: nil, disc_number: nil, duration_ms: nil, explicit: nil, external_urls: nil, href: nil, is_local: nil, is_playable: nil, linked_from: nil, name: nil, preview_url: nil, restrictions: nil, track_number: nil, type: nil, uri: nil) ⇒ Object
Some parameter documentations has been truncated, see Spotted::Models::SimplifiedTrackObject for more details.
|
|
# File 'lib/spotted/models/simplified_track_object.rb', line 122
|
Instance Attribute Details
#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.
18 |
# File 'lib/spotted/models/simplified_track_object.rb', line 18 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.
25 |
# File 'lib/spotted/models/simplified_track_object.rb', line 25 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).
31 |
# File 'lib/spotted/models/simplified_track_object.rb', line 31 optional :disc_number, Integer |
#duration_ms ⇒ Integer?
The track length in milliseconds.
37 |
# File 'lib/spotted/models/simplified_track_object.rb', line 37 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).
44 |
# File 'lib/spotted/models/simplified_track_object.rb', line 44 optional :explicit, Spotted::Internal::Type::Boolean |
#external_urls ⇒ Spotted::Models::ExternalURLObject?
External URLs for this track.
50 |
# File 'lib/spotted/models/simplified_track_object.rb', line 50 optional :external_urls, -> { Spotted::ExternalURLObject } |
#href ⇒ String?
A link to the Web API endpoint providing full details of the track.
56 |
# File 'lib/spotted/models/simplified_track_object.rb', line 56 optional :href, String |
#id ⇒ String?
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the track.
11 |
# File 'lib/spotted/models/simplified_track_object.rb', line 11 optional :id, String |
#is_local ⇒ Boolean?
Whether or not the track is from a local file.
62 |
# File 'lib/spotted/models/simplified_track_object.rb', line 62 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`.
70 |
# File 'lib/spotted/models/simplified_track_object.rb', line 70 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 is only part of the response if the track linking, in fact, exists. The requested track has been replaced with a different track. The track in the ‘linked_from` object contains information about the originally requested track.
80 |
# File 'lib/spotted/models/simplified_track_object.rb', line 80 optional :linked_from, -> { Spotted::LinkedTrackObject } |
#name ⇒ String?
The name of the track.
86 |
# File 'lib/spotted/models/simplified_track_object.rb', line 86 optional :name, String |
#preview_url ⇒ String?
A URL to a 30 second preview (MP3 format) of the track.
94 |
# File 'lib/spotted/models/simplified_track_object.rb', line 94 optional :preview_url, String, nil?: true |
#restrictions ⇒ Spotted::Models::TrackRestrictionObject?
Included in the response when a content restriction is applied.
100 |
# File 'lib/spotted/models/simplified_track_object.rb', line 100 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.
107 |
# File 'lib/spotted/models/simplified_track_object.rb', line 107 optional :track_number, Integer |
#type ⇒ String?
The object type: “track”.
113 |
# File 'lib/spotted/models/simplified_track_object.rb', line 113 optional :type, String |
#uri ⇒ String?
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the track.
120 |
# File 'lib/spotted/models/simplified_track_object.rb', line 120 optional :uri, String |