Class: Spotted::Models::ChapterRetrieveResponse

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

Overview

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

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

Parameters:

  • id (String)

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

  • audio_preview_url (String, nil)

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

  • audiobook (Spotted::Models::AudiobookBase)

    The audiobook for which the chapter belongs.

  • chapter_number (Integer)

    The number of the chapter

  • description (String)

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

  • duration_ms (Integer)

    The chapter length in milliseconds.

  • explicit (Boolean)

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

  • external_urls (Spotted::Models::ExternalURLObject)

    External URLs for this chapter.

  • href (String)

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

  • html_description (String)

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

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

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

  • is_playable (Boolean)

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

  • languages (Array<String>)

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

  • name (String)

    The name of the chapter.

  • release_date (String)

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

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

    The precision with which ‘release_date` value is known.

  • uri (String)

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

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

    A list of the countries in which the chapter can be played, identified by their

  • published (Boolean) (defaults to: nil)

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

  • restrictions (Spotted::Models::ChapterRestrictionObject) (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 chapter. Set if the supplied access token

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

    The object type.



# File 'lib/spotted/models/chapter_retrieve_response.rb', line 155

Instance Attribute Details

#audio_preview_urlString?

Deprecated.

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

Returns:

  • (String, nil)


21
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 21

required :audio_preview_url, String, nil?: true

#audiobookSpotted::Models::AudiobookBase

The audiobook for which the chapter belongs.



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

required :audiobook, -> { Spotted::AudiobookBase }

#available_marketsArray<String>?

A list of the countries in which the chapter 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)


130
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 130

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

#chapter_numberInteger

The number of the chapter

Returns:

  • (Integer)


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

required :chapter_number, Integer

#descriptionString

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

Returns:

  • (String)


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

required :description, String

#duration_msInteger

The chapter length in milliseconds.

Returns:

  • (Integer)


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

required :duration_ms, Integer

#explicitBoolean

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

Returns:

  • (Boolean)


53
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 53

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

#external_urlsSpotted::Models::ExternalURLObject

External URLs for this chapter.



59
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 59

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

#hrefString

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

Returns:

  • (String)


65
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 65

required :href, String

#html_descriptionString

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

Returns:

  • (String)


71
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 71

required :html_description, String

#idString

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

Returns:

  • (String)


12
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 12

required :id, String

#imagesArray<Spotted::Models::ImageObject>

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

Returns:



77
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 77

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

#is_playableBoolean

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

Returns:

  • (Boolean)


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

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

#languagesArray<String>

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

Returns:

  • (Array<String>)


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

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

#nameString

The name of the chapter.

Returns:

  • (String)


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

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)


140
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 140

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

#release_dateString

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

Returns:

  • (String)


103
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 103

required :release_date, String

#release_date_precisionSymbol, Spotted::Models::ChapterRetrieveResponse::ReleaseDatePrecision

The precision with which ‘release_date` value is known.



109
110
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 109

required :release_date_precision,
enum: -> { Spotted::Models::ChapterRetrieveResponse::ReleaseDatePrecision }

#restrictionsSpotted::Models::ChapterRestrictionObject?

Included in the response when a content restriction is applied.



146
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 146

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

#resume_pointSpotted::Models::ResumePointObject?

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



153
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 153

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

#typeSymbol, :episode

The object type.

Returns:

  • (Symbol, :episode)


116
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 116

required :type, const: :episode

#uriString

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

Returns:

  • (String)


123
# File 'lib/spotted/models/chapter_retrieve_response.rb', line 123

required :uri, String