Class: Spotted::Models::SimplifiedEpisodeObject

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

Defined Under Namespace

Modules: ReleaseDatePrecision

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:, audio_preview_url:, description:, duration_ms:, explicit:, external_urls:, href:, html_description:, images:, is_externally_hosted:, is_playable:, languages:, name:, release_date:, release_date_precision:, uri:, language: nil, published: nil, restrictions: nil, resume_point: nil, type: :episode) ⇒ Object

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

Parameters:

  • id (String)

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

  • audio_preview_url (String, nil)

    A URL to a 30 second preview (MP3 format) of the episode. ‘null` if not availabl

  • description (String)

    A description of the episode. HTML tags are stripped away from this field, use ‘

  • duration_ms (Integer)

    The episode length in milliseconds.

  • explicit (Boolean)

    Whether or not the episode has explicit content (true = yes it does; false = no

  • external_urls (Spotted::Models::ExternalURLObject)

    External URLs for this episode.

  • href (String)

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

  • html_description (String)

    A description of the episode. This field may contain HTML tags.

  • images (Array<Spotted::Models::ImageObject>)

    The cover art for the episode in various sizes, widest first.

  • is_externally_hosted (Boolean)

    True if the episode is hosted outside of Spotify’s CDN.

  • is_playable (Boolean)

    True if the episode is playable in the given market. Otherwise false.

  • languages (Array<String>)

    A list of the languages used in the episode, identified by their [ISO 639-1](htt

  • name (String)

    The name of the episode.

  • release_date (String)

    The date the episode was first released, for example ‘“1981-12-15”`. Depending o

  • release_date_precision (Symbol, Spotted::Models::SimplifiedEpisodeObject::ReleaseDatePrecision)

    The precision with which ‘release_date` value is known.

  • uri (String)

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

  • language (String) (defaults to: nil)

    The language used in the episode, identified by a [ISO 639](en.wikipedia

  • published (Boolean) (defaults to: nil)

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

  • restrictions (Spotted::Models::EpisodeRestrictionObject) (defaults to: nil)

    Included in the response when a content restriction is applied.

  • resume_point (Spotted::Models::ResumePointObject) (defaults to: nil)

    The user’s most recent position in the episode. Set if the supplied access token

  • type (Symbol, :episode) (defaults to: :episode)

    The object type.



# File 'lib/spotted/models/simplified_episode_object.rb', line 150

Instance Attribute Details

#audio_preview_urlString?

Deprecated.

A URL to a 30 second preview (MP3 format) of the episode. ‘null` if not available.

Returns:

  • (String, nil)


20
# File 'lib/spotted/models/simplified_episode_object.rb', line 20

required :audio_preview_url, String, nil?: true

#descriptionString

A description of the episode. HTML tags are stripped away from this field, use ‘html_description` field in case HTML tags are needed.

Returns:

  • (String)


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

required :description, String

#duration_msInteger

The episode length in milliseconds.

Returns:

  • (Integer)


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

required :duration_ms, Integer

#explicitBoolean

Whether or not the episode has explicit content (true = yes it does; false = no it does not OR unknown).

Returns:

  • (Boolean)


40
# File 'lib/spotted/models/simplified_episode_object.rb', line 40

required :explicit, Spotted::Internal::Type::Boolean

#external_urlsSpotted::Models::ExternalURLObject

External URLs for this episode.



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

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

#hrefString

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

Returns:

  • (String)


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

required :href, String

#html_descriptionString

A description of the episode. This field may contain HTML tags.

Returns:

  • (String)


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

required :html_description, String

#idString

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

Returns:

  • (String)


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

required :id, String

#imagesArray<Spotted::Models::ImageObject>

The cover art for the episode in various sizes, widest first.

Returns:



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

required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] }

#is_externally_hostedBoolean

True if the episode is hosted outside of Spotify’s CDN.

Returns:

  • (Boolean)


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

required :is_externally_hosted, Spotted::Internal::Type::Boolean

#is_playableBoolean

True if the episode is playable in the given market. Otherwise false.

Returns:

  • (Boolean)


76
# File 'lib/spotted/models/simplified_episode_object.rb', line 76

required :is_playable, Spotted::Internal::Type::Boolean

#languageString?

Deprecated.

The language used in the episode, identified by a [ISO 639](en.wikipedia.org/wiki/ISO_639) code. This field is deprecated and might be removed in the future. Please use the ‘languages` field instead.

Returns:

  • (String, nil)


125
# File 'lib/spotted/models/simplified_episode_object.rb', line 125

optional :language, String

#languagesArray<String>

A list of the languages used in the episode, identified by their [ISO 639-1](en.wikipedia.org/wiki/ISO_639) code.

Returns:

  • (Array<String>)


83
# File 'lib/spotted/models/simplified_episode_object.rb', line 83

required :languages, Spotted::Internal::Type::ArrayOf[String]

#nameString

The name of the episode.

Returns:

  • (String)


89
# File 'lib/spotted/models/simplified_episode_object.rb', line 89

required :name, String

#publishedBoolean?

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](/documentation/web-api/concepts/playlists)

Returns:

  • (Boolean, nil)


135
# File 'lib/spotted/models/simplified_episode_object.rb', line 135

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

#release_dateString

The date the episode was first released, for example ‘“1981-12-15”`. Depending on the precision, it might be shown as `“1981”` or `“1981-12”`.

Returns:

  • (String)


96
# File 'lib/spotted/models/simplified_episode_object.rb', line 96

required :release_date, String

#release_date_precisionSymbol, Spotted::Models::SimplifiedEpisodeObject::ReleaseDatePrecision

The precision with which ‘release_date` value is known.



102
# File 'lib/spotted/models/simplified_episode_object.rb', line 102

required :release_date_precision, enum: -> { Spotted::SimplifiedEpisodeObject::ReleaseDatePrecision }

#restrictionsSpotted::Models::EpisodeRestrictionObject?

Included in the response when a content restriction is applied.



141
# File 'lib/spotted/models/simplified_episode_object.rb', line 141

optional :restrictions, -> { Spotted::EpisodeRestrictionObject }

#resume_pointSpotted::Models::ResumePointObject?

The user’s most recent position in the episode. Set if the supplied access token is a user token and has the scope ‘user-read-playback-position’.



148
# File 'lib/spotted/models/simplified_episode_object.rb', line 148

optional :resume_point, -> { Spotted::ResumePointObject }

#typeSymbol, :episode

The object type.

Returns:

  • (Symbol, :episode)


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

required :type, const: :episode

#uriString

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

Returns:

  • (String)


115
# File 'lib/spotted/models/simplified_episode_object.rb', line 115

required :uri, String