Class: Spotted::Models::SimplifiedTrackObject

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

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

Some parameter documentations has been truncated, see Spotted::Models::SimplifiedTrackObject for more details.

Parameters:

  • id (String) (defaults to: nil) —

    The Spotify ID for the track

  • artists (Array<Spotted::Models::SimplifiedArtistObject>) (defaults to: nil) —

    The artists who performed the track. Each artist object includes a link in `href

  • available_markets (Array<String>) (defaults to: nil) —

    A list of the countries in which the track can be played, identified by their [I

  • disc_number (Integer) (defaults to: nil) —

    The disc number (usually 1 unless the album consists of more than one disc).

  • duration_ms (Integer) (defaults to: nil) —

    The track length in milliseconds.

  • explicit (Boolean) (defaults to: nil) —

    Whether or not the track has explicit lyrics ( true = yes it does; false = n

  • external_urls (Spotted::Models::ExternalURLObject) (defaults to: nil) —

    External URLs for this track.

  • href (String) (defaults to: nil) —

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

  • is_local (Boolean) (defaults to: nil) —

    Whether or not the track is from a local file.

  • is_playable (Boolean) (defaults to: nil) —

    Part of the response when [Track Relinking](/documentation/web-api/concepts/trac

  • linked_from (Spotted::Models::LinkedTrackObject) (defaults to: nil) —

    Part of the response when [Track Relinking](/documentation/web-api/concepts/trac

  • name (String) (defaults to: nil) —

    The name of the track.

  • preview_url (String, nil) (defaults to: nil) —

    A URL to a 30 second preview (MP3 format) of the track.

  • published (Boolean) (defaults to: nil) —

    The playlist's public/private status (if it should be added to the user's profil

  • restrictions (Spotted::Models::TrackRestrictionObject) (defaults to: nil) —

    Included in the response when a content restriction is applied.

  • track_number (Integer) (defaults to: nil) —

    The number of the track. If an album has several discs, the track number is the

  • type (String) (defaults to: nil) —

    The object type: "track".

  • uri (String) (defaults to: nil) —

    The Spotify URI for the trac



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

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

Deprecated.

A list of the countries in which the track can be played, identified by their ISO 3166-1 alpha-2 code.

Returns:

  • (Array<String>, nil)


27
# File 'lib/spotted/models/simplified_track_object.rb', line 27

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

Returns:

  • (Integer, nil)


33
# File 'lib/spotted/models/simplified_track_object.rb', line 33

optional :disc_number, Integer

#duration_ms ⇒ Integer?

The track length in milliseconds.

Returns:

  • (Integer, nil)


39
# File 'lib/spotted/models/simplified_track_object.rb', line 39

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

Returns:

  • (Boolean, nil)


46
# File 'lib/spotted/models/simplified_track_object.rb', line 46

optional :explicit, Spotted::Internal::Type::Boolean

#external_urls ⇒ Spotted::Models::ExternalURLObject?

External URLs for this track.



52
# File 'lib/spotted/models/simplified_track_object.rb', line 52

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

#href ⇒ String?

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

Returns:

  • (String, nil)


58
# File 'lib/spotted/models/simplified_track_object.rb', line 58

optional :href, String

#id ⇒ String?

The Spotify ID for the track.

Returns:

  • (String, nil)


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.

Returns:

  • (Boolean, nil)


64
# File 'lib/spotted/models/simplified_track_object.rb', line 64

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.

Returns:

  • (Boolean, nil)


72
# File 'lib/spotted/models/simplified_track_object.rb', line 72

optional :is_playable, Spotted::Internal::Type::Boolean

#linked_from ⇒ Spotted::Models::LinkedTrackObject?

Deprecated.

Part of the response when 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.



84
# File 'lib/spotted/models/simplified_track_object.rb', line 84

optional :linked_from, -> { Spotted::LinkedTrackObject }

#name ⇒ String?

The name of the track.

Returns:

  • (String, nil)


90
# File 'lib/spotted/models/simplified_track_object.rb', line 90

optional :name, String

#preview_url ⇒ String?

Deprecated.

A URL to a 30 second preview (MP3 format) of the track.

Returns:

  • (String, nil)


98
# File 'lib/spotted/models/simplified_track_object.rb', line 98

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

Returns:

  • (Boolean, nil)


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

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

#restrictions ⇒ Spotted::Models::TrackRestrictionObject?

Included in the response when a content restriction is applied.



114
# File 'lib/spotted/models/simplified_track_object.rb', line 114

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.

Returns:

  • (Integer, nil)


121
# File 'lib/spotted/models/simplified_track_object.rb', line 121

optional :track_number, Integer

#type ⇒ String?

The object type: "track".

Returns:

  • (String, nil)


127
# File 'lib/spotted/models/simplified_track_object.rb', line 127

optional :type, String

#uri ⇒ String?

The Spotify URI for the track.

Returns:

  • (String, nil)


134
# File 'lib/spotted/models/simplified_track_object.rb', line 134

optional :uri, String