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, 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](/documentation/web-api/concepts/spotify-uris-ids) 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.

  • 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](/documentation/web-api/concepts/spotify-uris-ids) for the trac



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

Instance Attribute Details

#artistsArray<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_marketsArray<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.

Returns:

  • (Array<String>, nil)


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

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

#disc_numberInteger?

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

Returns:

  • (Integer, nil)


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

optional :disc_number, Integer

#duration_msInteger?

The track length in milliseconds.

Returns:

  • (Integer, nil)


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

optional :duration_ms, Integer

#explicitBoolean?

Whether or not the track has explicit lyrics ( ‘true` = yes it does; `false` = no it does not OR unknown).

Returns:

  • (Boolean, nil)


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

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

#external_urlsSpotted::Models::ExternalURLObject?

External URLs for this track.



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

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

#hrefString?

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

Returns:

  • (String, nil)


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

optional :href, String

#idString?

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

Returns:

  • (String, nil)


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

optional :id, String

#is_localBoolean?

Whether or not the track is from a local file.

Returns:

  • (Boolean, nil)


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

optional :is_local, Spotted::Internal::Type::Boolean

#is_playableBoolean?

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

Returns:

  • (Boolean, nil)


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

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

#linked_fromSpotted::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 }

#nameString?

The name of the track.

Returns:

  • (String, nil)


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

optional :name, String

#preview_urlString?

Deprecated.

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

Returns:

  • (String, nil)


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

optional :preview_url, String, nil?: true

#restrictionsSpotted::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_numberInteger?

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

Returns:

  • (Integer, nil)


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

optional :track_number, Integer

#typeString?

The object type: “track”.

Returns:

  • (String, nil)


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

optional :type, String

#uriString?

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

Returns:

  • (String, nil)


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

optional :uri, String