Class: Spotted::Models::ChapterListResponse::Chapter
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Spotted::Models::ChapterListResponse::Chapter
- Defined in:
- lib/spotted/models/chapter_list_response.rb
Defined Under Namespace
Modules: ReleaseDatePrecision, Type
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.
-
#release_date ⇒ String
The date the chapter was first released, for example ‘“1981-12-15”`.
-
#release_date_precision ⇒ Symbol, Spotted::Models::ChapterListResponse::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, Spotted::Models::ChapterListResponse::Chapter::Type
The object type.
-
#uri ⇒ String
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the chapter.
Class Method Summary collapse
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: , type: , uri: , available_markets: nil, restrictions: nil, resume_point: nil) ⇒ 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: , type: , uri: , available_markets: nil, restrictions: nil, resume_point: nil) ⇒ Object
Some parameter documentations has been truncated, see Spotted::Models::ChapterListResponse::Chapter for more details.
15 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 |
# File 'lib/spotted/models/chapter_list_response.rb', line 15 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::ChapterListResponse::Chapter::ReleaseDatePrecision] required :release_date_precision, enum: -> { Spotted::Models::ChapterListResponse::Chapter::ReleaseDatePrecision } # @!attribute type # The object type. # # @return [Symbol, Spotted::Models::ChapterListResponse::Chapter::Type] required :type, enum: -> { Spotted::Models::ChapterListResponse::Chapter::Type } # @!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 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:, type:, uri:, available_markets: nil, restrictions: nil, resume_point: nil) # Some parameter documentations has been truncated, see # {Spotted::Models::ChapterListResponse::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::ChapterListResponse::Chapter::ReleaseDatePrecision] The precision with which `release_date` value is known. # # @param type [Symbol, Spotted::Models::ChapterListResponse::Chapter::Type] The object type. # # @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 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 # The precision with which `release_date` value is known. # # @see Spotted::Models::ChapterListResponse::Chapter#release_date_precision module ReleaseDatePrecision extend Spotted::Internal::Type::Enum YEAR = :year MONTH = :month DAY = :day # @!method self.values # @return [Array<Symbol>] end # The object type. # # @see Spotted::Models::ChapterListResponse::Chapter#type module Type extend Spotted::Internal::Type::Enum EPISODE = :episode # @!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.
30 |
# File 'lib/spotted/models/chapter_list_response.rb', line 30 required :audio_preview_url, String, nil?: true |
#audiobook ⇒ Spotted::Models::AudiobookBase
The audiobook for which the chapter belongs.
36 |
# File 'lib/spotted/models/chapter_list_response.rb', line 36 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.
139 |
# File 'lib/spotted/models/chapter_list_response.rb', line 139 optional :available_markets, Spotted::Internal::Type::ArrayOf[String] |
#chapter_number ⇒ Integer
The number of the chapter
42 |
# File 'lib/spotted/models/chapter_list_response.rb', line 42 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.
49 |
# File 'lib/spotted/models/chapter_list_response.rb', line 49 required :description, String |
#duration_ms ⇒ Integer
The chapter length in milliseconds.
55 |
# File 'lib/spotted/models/chapter_list_response.rb', line 55 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).
62 |
# File 'lib/spotted/models/chapter_list_response.rb', line 62 required :explicit, Spotted::Internal::Type::Boolean |
#external_urls ⇒ Spotted::Models::ExternalURLObject
External URLs for this chapter.
68 |
# File 'lib/spotted/models/chapter_list_response.rb', line 68 required :external_urls, -> { Spotted::ExternalURLObject } |
#href ⇒ String
A link to the Web API endpoint providing full details of the chapter.
74 |
# File 'lib/spotted/models/chapter_list_response.rb', line 74 required :href, String |
#html_description ⇒ String
A description of the chapter. This field may contain HTML tags.
80 |
# File 'lib/spotted/models/chapter_list_response.rb', line 80 required :html_description, String |
#id ⇒ String
The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the chapter.
21 |
# File 'lib/spotted/models/chapter_list_response.rb', line 21 required :id, String |
#images ⇒ Array<Spotted::Models::ImageObject>
The cover art for the chapter in various sizes, widest first.
86 |
# File 'lib/spotted/models/chapter_list_response.rb', line 86 required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] } |
#is_playable ⇒ Boolean
True if the chapter is playable in the given market. Otherwise false.
92 |
# File 'lib/spotted/models/chapter_list_response.rb', line 92 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.
99 |
# File 'lib/spotted/models/chapter_list_response.rb', line 99 required :languages, Spotted::Internal::Type::ArrayOf[String] |
#name ⇒ String
The name of the chapter.
105 |
# File 'lib/spotted/models/chapter_list_response.rb', line 105 required :name, String |
#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”`.
112 |
# File 'lib/spotted/models/chapter_list_response.rb', line 112 required :release_date, String |
#release_date_precision ⇒ Symbol, Spotted::Models::ChapterListResponse::Chapter::ReleaseDatePrecision
The precision with which ‘release_date` value is known.
118 119 |
# File 'lib/spotted/models/chapter_list_response.rb', line 118 required :release_date_precision, enum: -> { Spotted::Models::ChapterListResponse::Chapter::ReleaseDatePrecision } |
#restrictions ⇒ Spotted::Models::ChapterRestrictionObject?
Included in the response when a content restriction is applied.
145 |
# File 'lib/spotted/models/chapter_list_response.rb', line 145 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’.
152 |
# File 'lib/spotted/models/chapter_list_response.rb', line 152 optional :resume_point, -> { Spotted::ResumePointObject } |
#type ⇒ Symbol, Spotted::Models::ChapterListResponse::Chapter::Type
The object type.
125 |
# File 'lib/spotted/models/chapter_list_response.rb', line 125 required :type, enum: -> { Spotted::Models::ChapterListResponse::Chapter::Type } |
#uri ⇒ String
The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the chapter.
132 |
# File 'lib/spotted/models/chapter_list_response.rb', line 132 required :uri, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/spotted/models/chapter_list_response.rb', line 210
|