Class: Spotted::Models::ChapterBulkRetrieveResponse::Chapter
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Spotted::Models::ChapterBulkRetrieveResponse::Chapter
- Defined in:
- lib/spotted/models/chapter_bulk_retrieve_response.rb
Defined Under Namespace
Modules: ReleaseDatePrecision
Instance Attribute Summary collapse
- #audio_preview_url ⇒ String? deprecated Deprecated.
-
#audiobook ⇒ Spotted::Models::AudiobookBase
The audiobook for which the chapter belongs.
-
#available_markets ⇒ Array<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.
-
#chapter_number ⇒ Integer
The number of the chapter.
-
#description ⇒ String
A description of the chapter.
-
#duration_ms ⇒ Integer
The chapter length in milliseconds.
-
#explicit ⇒ Boolean
Whether or not the chapter has explicit content (true = yes it does; false = no it does not OR unknown).
-
#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.
-
#id ⇒ String
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the chapter.
-
#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.
-
#languages ⇒ Array<String>
A list of the languages used in the chapter, identified by their [ISO 639-1](en.wikipedia.org/wiki/ISO_639) code.
-
#name ⇒ String
The name of the chapter.
-
#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.
-
#release_date ⇒ String
The date the chapter was first released, for example ‘“1981-12-15”`.
-
#release_date_precision ⇒ Symbol, Spotted::Models::ChapterBulkRetrieveResponse::Chapter::ReleaseDatePrecision
The precision with which ‘release_date` value is known.
-
#restrictions ⇒ Spotted::Models::ChapterRestrictionObject?
Included in the response when a content restriction is applied.
-
#resume_point ⇒ Spotted::Models::ResumePointObject?
The user’s most recent position in the chapter.
-
#type ⇒ Symbol, :episode
The object type.
-
#uri ⇒ String
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the chapter.
Instance Method Summary collapse
-
#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
constructor
Some parameter documentations has been truncated, see Chapter for more details.
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::ChapterBulkRetrieveResponse::Chapter for more details.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 16 class Chapter < Spotted::Internal::Type::BaseModel # @!attribute id # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the # chapter. # # @return [String] required :id, String # @!attribute audio_preview_url # @deprecated # # A URL to a 30 second preview (MP3 format) of the chapter. `null` if not # available. # # @return [String, nil] required :audio_preview_url, String, nil?: true # @!attribute audiobook # The audiobook for which the chapter belongs. # # @return [Spotted::Models::AudiobookBase] required :audiobook, -> { Spotted::AudiobookBase } # @!attribute chapter_number # The number of the chapter # # @return [Integer] required :chapter_number, Integer # @!attribute description # A description of the chapter. HTML tags are stripped away from this field, use # `html_description` field in case HTML tags are needed. # # @return [String] required :description, String # @!attribute duration_ms # The chapter length in milliseconds. # # @return [Integer] required :duration_ms, Integer # @!attribute explicit # Whether or not the chapter has explicit content (true = yes it does; false = no # it does not OR unknown). # # @return [Boolean] required :explicit, Spotted::Internal::Type::Boolean # @!attribute external_urls # External URLs for this chapter. # # @return [Spotted::Models::ExternalURLObject] required :external_urls, -> { Spotted::ExternalURLObject } # @!attribute href # A link to the Web API endpoint providing full details of the chapter. # # @return [String] required :href, String # @!attribute html_description # A description of the chapter. This field may contain HTML tags. # # @return [String] required :html_description, String # @!attribute images # The cover art for the chapter in various sizes, widest first. # # @return [Array<Spotted::Models::ImageObject>] required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] } # @!attribute is_playable # True if the chapter is playable in the given market. Otherwise false. # # @return [Boolean] required :is_playable, Spotted::Internal::Type::Boolean # @!attribute languages # A list of the languages used in the chapter, identified by their # [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639) code. # # @return [Array<String>] required :languages, Spotted::Internal::Type::ArrayOf[String] # @!attribute name # The name of the chapter. # # @return [String] required :name, String # @!attribute release_date # 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"`. # # @return [String] required :release_date, String # @!attribute release_date_precision # The precision with which `release_date` value is known. # # @return [Symbol, Spotted::Models::ChapterBulkRetrieveResponse::Chapter::ReleaseDatePrecision] required :release_date_precision, enum: -> { Spotted::Models::ChapterBulkRetrieveResponse::Chapter::ReleaseDatePrecision } # @!attribute type # The object type. # # @return [Symbol, :episode] required :type, const: :episode # @!attribute uri # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the # chapter. # # @return [String] required :uri, String # @!attribute available_markets # A list of the countries in which the chapter can be played, identified by their # [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. # # @return [Array<String>, nil] optional :available_markets, Spotted::Internal::Type::ArrayOf[String] # @!attribute published # 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) # # @return [Boolean, nil] optional :published, Spotted::Internal::Type::Boolean # @!attribute restrictions # Included in the response when a content restriction is applied. # # @return [Spotted::Models::ChapterRestrictionObject, nil] optional :restrictions, -> { Spotted::ChapterRestrictionObject } # @!attribute resume_point # 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'. # # @return [Spotted::Models::ResumePointObject, nil] optional :resume_point, -> { Spotted::ResumePointObject } # @!method 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) # Some parameter documentations has been truncated, see # {Spotted::Models::ChapterBulkRetrieveResponse::Chapter} for more details. # # @param id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the chapt # # @param audio_preview_url [String, nil] A URL to a 30 second preview (MP3 format) of the chapter. `null` if not availabl # # @param audiobook [Spotted::Models::AudiobookBase] The audiobook for which the chapter belongs. # # @param chapter_number [Integer] The number of the chapter # # @param description [String] A description of the chapter. HTML tags are stripped away from this field, use ` # # @param duration_ms [Integer] The chapter length in milliseconds. # # @param explicit [Boolean] Whether or not the chapter has explicit content (true = yes it does; false = no # # @param external_urls [Spotted::Models::ExternalURLObject] External URLs for this chapter. # # @param href [String] A link to the Web API endpoint providing full details of the chapter. # # @param html_description [String] A description of the chapter. This field may contain HTML tags. # # @param images [Array<Spotted::Models::ImageObject>] The cover art for the chapter in various sizes, widest first. # # @param is_playable [Boolean] True if the chapter is playable in the given market. Otherwise false. # # @param languages [Array<String>] A list of the languages used in the chapter, identified by their [ISO 639-1](htt # # @param name [String] The name of the chapter. # # @param release_date [String] The date the chapter was first released, for example `"1981-12-15"`. Depending o # # @param release_date_precision [Symbol, Spotted::Models::ChapterBulkRetrieveResponse::Chapter::ReleaseDatePrecision] The precision with which `release_date` value is known. # # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the chap # # @param available_markets [Array<String>] A list of the countries in which the chapter can be played, identified by their # # @param published [Boolean] The playlist's public/private status (if it should be added to the user's profil # # @param restrictions [Spotted::Models::ChapterRestrictionObject] Included in the response when a content restriction is applied. # # @param resume_point [Spotted::Models::ResumePointObject] The user's most recent position in the chapter. Set if the supplied access token # # @param type [Symbol, :episode] The object type. # The precision with which `release_date` value is known. # # @see Spotted::Models::ChapterBulkRetrieveResponse::Chapter#release_date_precision module ReleaseDatePrecision extend Spotted::Internal::Type::Enum YEAR = :year MONTH = :month DAY = :day # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#audio_preview_url ⇒ String?
A URL to a 30 second preview (MP3 format) of the chapter. ‘null` if not available.
31 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 31 required :audio_preview_url, String, nil?: true |
#audiobook ⇒ Spotted::Models::AudiobookBase
The audiobook for which the chapter belongs.
37 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 37 required :audiobook, -> { Spotted::AudiobookBase } |
#available_markets ⇒ Array<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.
140 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 140 optional :available_markets, Spotted::Internal::Type::ArrayOf[String] |
#chapter_number ⇒ Integer
The number of the chapter
43 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 43 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.
50 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 50 required :description, String |
#duration_ms ⇒ Integer
The chapter length in milliseconds.
56 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 56 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).
63 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 63 required :explicit, Spotted::Internal::Type::Boolean |
#external_urls ⇒ Spotted::Models::ExternalURLObject
External URLs for this chapter.
69 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 69 required :external_urls, -> { Spotted::ExternalURLObject } |
#href ⇒ String
A link to the Web API endpoint providing full details of the chapter.
75 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 75 required :href, String |
#html_description ⇒ String
A description of the chapter. This field may contain HTML tags.
81 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 81 required :html_description, String |
#id ⇒ String
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the chapter.
22 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 22 required :id, String |
#images ⇒ Array<Spotted::Models::ImageObject>
The cover art for the chapter in various sizes, widest first.
87 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 87 required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] } |
#is_playable ⇒ Boolean
True if the chapter is playable in the given market. Otherwise false.
93 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 93 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](en.wikipedia.org/wiki/ISO_639) code.
100 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 100 required :languages, Spotted::Internal::Type::ArrayOf[String] |
#name ⇒ String
The name of the chapter.
106 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 106 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](/documentation/web-api/concepts/playlists)
150 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 150 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”`.
113 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 113 required :release_date, String |
#release_date_precision ⇒ Symbol, Spotted::Models::ChapterBulkRetrieveResponse::Chapter::ReleaseDatePrecision
The precision with which ‘release_date` value is known.
119 120 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 119 required :release_date_precision, enum: -> { Spotted::Models::ChapterBulkRetrieveResponse::Chapter::ReleaseDatePrecision } |
#restrictions ⇒ Spotted::Models::ChapterRestrictionObject?
Included in the response when a content restriction is applied.
156 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 156 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’.
163 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 163 optional :resume_point, -> { Spotted::ResumePointObject } |
#type ⇒ Symbol, :episode
The object type.
126 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 126 required :type, const: :episode |
#uri ⇒ String
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the chapter.
133 |
# File 'lib/spotted/models/chapter_bulk_retrieve_response.rb', line 133 required :uri, String |