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, Type

Instance Attribute Summary collapse

Class Method 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: , type: , uri: , available_markets: nil, restrictions: nil, resume_point: nil) ⇒ Object

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

Parameters:

  • id (String) (defaults to: )

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

  • audio_preview_url (String, nil) (defaults to: )

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

  • audiobook (Spotted::Models::AudiobookBase) (defaults to: )

    The audiobook for which the chapter belongs.

  • chapter_number (Integer) (defaults to: )

    The number of the chapter

  • description (String) (defaults to: )

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

  • duration_ms (Integer) (defaults to: )

    The chapter length in milliseconds.

  • explicit (Boolean) (defaults to: )

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

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

    External URLs for this chapter.

  • href (String) (defaults to: )

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

  • html_description (String) (defaults to: )

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

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

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

  • is_playable (Boolean) (defaults to: )

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

  • languages (Array<String>) (defaults to: )

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

  • name (String) (defaults to: )

    The name of the chapter.

  • release_date (String) (defaults to: )

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

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

    The precision with which ‘release_date` value is known.

  • type (Symbol, Spotted::Models::ChapterRetrieveResponse::Type) (defaults to: )

    The object type.

  • uri (String) (defaults to: )

    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

  • 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



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

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

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



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

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



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

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

#typeSymbol, Spotted::Models::ChapterRetrieveResponse::Type

The object type.



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

required :type, enum: -> { Spotted::Models::ChapterRetrieveResponse::Type }

#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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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