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

Instance Attribute Details

#audio_preview_url ⇒ String?

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

#audiobook ⇒ Spotted::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_markets ⇒ Array<String>?

Deprecated.

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

Returns:

  • (Array<String>, nil)


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

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

#chapter_number ⇒ Integer

The number of the chapter

Returns:

  • (Integer)


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

required :chapter_number, Integer

#description ⇒ String

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_ms ⇒ Integer

The chapter length in milliseconds.

Returns:

  • (Integer)


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

required :duration_ms, Integer

#explicit ⇒ Boolean

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_urls ⇒ Spotted::Models::ExternalURLObject

External URLs for this chapter.



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

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

#href ⇒ String

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_description ⇒ String

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

#id ⇒ String

The Spotify ID for the chapter.

Returns:

  • (String)


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

required :id, String

#images ⇒ Array<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_playable ⇒ Boolean

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

#languages ⇒ Array<String>

A list of the languages used in the chapter, identified by their ISO 639-1 code.

Returns:

  • (Array<String>)


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

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

#name ⇒ String

The name of the chapter.

Returns:

  • (String)


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

required :name, String

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


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

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

#release_date ⇒ String

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_precision ⇒ Symbol, 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 }

#restrictions ⇒ Spotted::Models::ChapterRestrictionObject?

Included in the response when a content restriction is applied.



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

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

#resume_point ⇒ Spotted::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'.



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

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

#type ⇒ Symbol, :episode

The object type.

Returns:

  • (Symbol, :episode)


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

required :type, const: :episode

#uri ⇒ String

The Spotify URI for the chapter.

Returns:

  • (String)


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

required :uri, String