spotted 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/spotted/client.rb +4 -0
  5. data/lib/spotted/internal/transport/base_client.rb +7 -1
  6. data/lib/spotted/models/audiobook_base.rb +182 -0
  7. data/lib/spotted/models/audiobook_list_response.rb +2 -174
  8. data/lib/spotted/models/audiobook_retrieve_response.rb +2 -174
  9. data/lib/spotted/models/chapter_list_response.rb +3 -183
  10. data/lib/spotted/models/chapter_retrieve_response.rb +3 -183
  11. data/lib/spotted/models/episode_object.rb +3 -166
  12. data/lib/spotted/models/me/audiobook_list_response.rb +2 -174
  13. data/lib/spotted/models/me/show_list_response.rb +3 -166
  14. data/lib/spotted/models/search_retrieve_response.rb +6 -345
  15. data/lib/spotted/models/show_base.rb +165 -0
  16. data/lib/spotted/models/show_list_response.rb +3 -163
  17. data/lib/spotted/models/show_retrieve_response.rb +2 -157
  18. data/lib/spotted/models/unwrap_webhook_event.rb +8 -0
  19. data/lib/spotted/models/webhook_unwrap_params.rb +14 -0
  20. data/lib/spotted/models.rb +9 -0
  21. data/lib/spotted/resources/webhooks.rb +22 -0
  22. data/lib/spotted/version.rb +1 -1
  23. data/lib/spotted.rb +5 -0
  24. data/rbi/spotted/client.rbi +3 -0
  25. data/rbi/spotted/internal/transport/base_client.rbi +5 -0
  26. data/rbi/spotted/internal/type/base_model.rbi +8 -4
  27. data/rbi/spotted/models/audiobook_base.rbi +219 -0
  28. data/rbi/spotted/models/audiobook_list_response.rbi +4 -212
  29. data/rbi/spotted/models/audiobook_retrieve_response.rbi +4 -209
  30. data/rbi/spotted/models/chapter_list_response.rbi +4 -249
  31. data/rbi/spotted/models/chapter_retrieve_response.rbi +4 -245
  32. data/rbi/spotted/models/episode_object.rbi +4 -199
  33. data/rbi/spotted/models/me/audiobook_list_response.rbi +4 -212
  34. data/rbi/spotted/models/me/show_list_response.rbi +6 -227
  35. data/rbi/spotted/models/search_retrieve_response.rbi +6 -473
  36. data/rbi/spotted/models/show_base.rbi +194 -0
  37. data/rbi/spotted/models/show_list_response.rbi +5 -216
  38. data/rbi/spotted/models/show_retrieve_response.rbi +4 -182
  39. data/rbi/spotted/models/unwrap_webhook_event.rbi +7 -0
  40. data/rbi/spotted/models/webhook_unwrap_params.rbi +27 -0
  41. data/rbi/spotted/models.rbi +12 -0
  42. data/rbi/spotted/resources/webhooks.rbi +19 -0
  43. data/sig/spotted/client.rbs +2 -0
  44. data/sig/spotted/internal/transport/base_client.rbs +2 -0
  45. data/sig/spotted/models/audiobook_base.rbs +122 -0
  46. data/sig/spotted/models/audiobook_list_response.rbs +8 -111
  47. data/sig/spotted/models/audiobook_retrieve_response.rbs +8 -113
  48. data/sig/spotted/models/chapter_list_response.rbs +4 -123
  49. data/sig/spotted/models/chapter_retrieve_response.rbs +4 -123
  50. data/sig/spotted/models/episode_object.rbs +4 -111
  51. data/sig/spotted/models/me/audiobook_list_response.rbs +8 -111
  52. data/sig/spotted/models/me/show_list_response.rbs +5 -121
  53. data/sig/spotted/models/search_retrieve_response.rbs +8 -234
  54. data/sig/spotted/models/show_base.rbs +110 -0
  55. data/sig/spotted/models/show_list_response.rbs +4 -116
  56. data/sig/spotted/models/show_retrieve_response.rbs +8 -101
  57. data/sig/spotted/models/unwrap_webhook_event.rbs +5 -0
  58. data/sig/spotted/models/webhook_unwrap_params.rbs +15 -0
  59. data/sig/spotted/models.rbs +8 -0
  60. data/sig/spotted/resources/webhooks.rbs +9 -0
  61. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67ece5e6ee4843b9441e3846cbbaf8e60ef18d5e02b554df581393cebdbccf97
4
- data.tar.gz: f392bfcd4da1fbf4bcf8dc54ced78c85538177d817fd784ef717774f9e7d5245
3
+ metadata.gz: ce3e4a67c02e0a7307440bd85d8f3c618311738750ed8b68cfe8c315574e1260
4
+ data.tar.gz: 36f98cdb895bdff0c933f59cc76ac1079b9cd83456ef03c605c7454594fcdc9f
5
5
  SHA512:
6
- metadata.gz: 4d55e8a6eb42dbcc2f0adcbc5eb80c3c4046fd396bf33fa5a919f7d7c16f242ee1e8037acaa3d20f6dc7b4dfe66cab143f2acc6addf70edf160566c6bd612d5d
7
- data.tar.gz: c6cf2a63e8298aec44d8eefa75d064b86578d890341d69e479a0ebef3f9dad15f92a4d18304c5a0bf26f13e3c2e03a3e92eb475db7236a0c8f378544f0ceff62
6
+ metadata.gz: 1bbb428c95e6f329c9d65dc57947b9690d69a0e09f9f8b9ec5a78181a0656d6170a31fa9ad1dc3a8ee2b7920ea68a59c53f706c059602ff58c7d053e3e306c96
7
+ data.tar.gz: f8f97640a05e5d8a20c506c951606b73357c0759eccf6197e0608954b29fd82e870886a793f6eb8a38b53b8f54ad2ba582785985b633bf04aca4125683451ca6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 (2025-11-04)
4
+
5
+ Full Changelog: [v0.2.0...v0.3.0](https://github.com/cjavdev/spotted/compare/v0.2.0...v0.3.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([74dd654](https://github.com/cjavdev/spotted/commit/74dd654b38aae172e84db3392e0b8dbfe5842ae8))
10
+
11
+
12
+ ### Chores
13
+
14
+ * bump dependency version and update sorbet types ([b5dbafb](https://github.com/cjavdev/spotted/commit/b5dbafb956916c8e1488a2861d5877533b015e0b))
15
+
16
+ ## 0.2.0 (2025-10-24)
17
+
18
+ Full Changelog: [v0.1.0...v0.2.0](https://github.com/cjavdev/spotted/compare/v0.1.0...v0.2.0)
19
+
20
+ ### Features
21
+
22
+ * **api:** manual updates ([1dd209e](https://github.com/cjavdev/spotted/commit/1dd209e8c3d1f609d7d3cee090e0663a3c790a02))
23
+
3
24
  ## 0.1.0 (2025-10-24)
4
25
 
5
26
  Full Changelog: [v0.0.1...v0.1.0](https://github.com/cjavdev/spotted/compare/v0.0.1...v0.1.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "spotted", "~> 0.1.0"
20
+ gem "spotted", "~> 0.3.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -66,6 +66,9 @@ module Spotted
66
66
  # @return [Spotted::Resources::Recommendations]
67
67
  attr_reader :recommendations
68
68
 
69
+ # @return [Spotted::Resources::Webhooks]
70
+ attr_reader :webhooks
71
+
69
72
  # @return [Spotted::Resources::Markets]
70
73
  attr_reader :markets
71
74
 
@@ -163,6 +166,7 @@ module Spotted
163
166
  @audio_features = Spotted::Resources::AudioFeatures.new(client: self)
164
167
  @audio_analysis = Spotted::Resources::AudioAnalysis.new(client: self)
165
168
  @recommendations = Spotted::Resources::Recommendations.new(client: self)
169
+ @webhooks = Spotted::Resources::Webhooks.new(client: self)
166
170
  @markets = Spotted::Resources::Markets.new(client: self)
167
171
  end
168
172
  end
@@ -201,7 +201,8 @@ module Spotted
201
201
  self.class::PLATFORM_HEADERS,
202
202
  {
203
203
  "accept" => "application/json",
204
- "content-type" => "application/json"
204
+ "content-type" => "application/json",
205
+ "user-agent" => user_agent
205
206
  },
206
207
  headers
207
208
  )
@@ -219,6 +220,11 @@ module Spotted
219
220
  # @return [Hash{String=>String}]
220
221
  private def auth_headers = {}
221
222
 
223
+ # @api private
224
+ #
225
+ # @return [String]
226
+ private def user_agent = "#{self.class.name}/Ruby #{Spotted::VERSION}"
227
+
222
228
  # @api private
223
229
  #
224
230
  # @return [String]
@@ -0,0 +1,182 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spotted
4
+ module Models
5
+ class AudiobookBase < Spotted::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
8
+ # audiobook.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute authors
14
+ # The author(s) for the audiobook.
15
+ #
16
+ # @return [Array<Spotted::Models::AuthorObject>]
17
+ required :authors, -> { Spotted::Internal::Type::ArrayOf[Spotted::AuthorObject] }
18
+
19
+ # @!attribute available_markets
20
+ # A list of the countries in which the audiobook can be played, identified by
21
+ # their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
22
+ # code.
23
+ #
24
+ # @return [Array<String>]
25
+ required :available_markets, Spotted::Internal::Type::ArrayOf[String]
26
+
27
+ # @!attribute copyrights
28
+ # The copyright statements of the audiobook.
29
+ #
30
+ # @return [Array<Spotted::Models::CopyrightObject>]
31
+ required :copyrights, -> { Spotted::Internal::Type::ArrayOf[Spotted::CopyrightObject] }
32
+
33
+ # @!attribute description
34
+ # A description of the audiobook. HTML tags are stripped away from this field, use
35
+ # `html_description` field in case HTML tags are needed.
36
+ #
37
+ # @return [String]
38
+ required :description, String
39
+
40
+ # @!attribute explicit
41
+ # Whether or not the audiobook has explicit content (true = yes it does; false =
42
+ # no it does not OR unknown).
43
+ #
44
+ # @return [Boolean]
45
+ required :explicit, Spotted::Internal::Type::Boolean
46
+
47
+ # @!attribute external_urls
48
+ # External URLs for this audiobook.
49
+ #
50
+ # @return [Spotted::Models::ExternalURLObject]
51
+ required :external_urls, -> { Spotted::ExternalURLObject }
52
+
53
+ # @!attribute href
54
+ # A link to the Web API endpoint providing full details of the audiobook.
55
+ #
56
+ # @return [String]
57
+ required :href, String
58
+
59
+ # @!attribute html_description
60
+ # A description of the audiobook. This field may contain HTML tags.
61
+ #
62
+ # @return [String]
63
+ required :html_description, String
64
+
65
+ # @!attribute images
66
+ # The cover art for the audiobook in various sizes, widest first.
67
+ #
68
+ # @return [Array<Spotted::Models::ImageObject>]
69
+ required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] }
70
+
71
+ # @!attribute languages
72
+ # A list of the languages used in the audiobook, identified by their
73
+ # [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code.
74
+ #
75
+ # @return [Array<String>]
76
+ required :languages, Spotted::Internal::Type::ArrayOf[String]
77
+
78
+ # @!attribute media_type
79
+ # The media type of the audiobook.
80
+ #
81
+ # @return [String]
82
+ required :media_type, String
83
+
84
+ # @!attribute name
85
+ # The name of the audiobook.
86
+ #
87
+ # @return [String]
88
+ required :name, String
89
+
90
+ # @!attribute narrators
91
+ # The narrator(s) for the audiobook.
92
+ #
93
+ # @return [Array<Spotted::Models::NarratorObject>]
94
+ required :narrators, -> { Spotted::Internal::Type::ArrayOf[Spotted::NarratorObject] }
95
+
96
+ # @!attribute publisher
97
+ # The publisher of the audiobook.
98
+ #
99
+ # @return [String]
100
+ required :publisher, String
101
+
102
+ # @!attribute total_chapters
103
+ # The number of chapters in this audiobook.
104
+ #
105
+ # @return [Integer]
106
+ required :total_chapters, Integer
107
+
108
+ # @!attribute type
109
+ # The object type.
110
+ #
111
+ # @return [Symbol, Spotted::Models::AudiobookBase::Type]
112
+ required :type, enum: -> { Spotted::AudiobookBase::Type }
113
+
114
+ # @!attribute uri
115
+ # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
116
+ # audiobook.
117
+ #
118
+ # @return [String]
119
+ required :uri, String
120
+
121
+ # @!attribute edition
122
+ # The edition of the audiobook.
123
+ #
124
+ # @return [String, nil]
125
+ optional :edition, String
126
+
127
+ # @!method initialize(id:, authors:, available_markets:, copyrights:, description:, explicit:, external_urls:, href:, html_description:, images:, languages:, media_type:, name:, narrators:, publisher:, total_chapters:, type:, uri:, edition: nil)
128
+ # Some parameter documentations has been truncated, see
129
+ # {Spotted::Models::AudiobookBase} for more details.
130
+ #
131
+ # @param id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the audio
132
+ #
133
+ # @param authors [Array<Spotted::Models::AuthorObject>] The author(s) for the audiobook.
134
+ #
135
+ # @param available_markets [Array<String>] A list of the countries in which the audiobook can be played, identified by thei
136
+ #
137
+ # @param copyrights [Array<Spotted::Models::CopyrightObject>] The copyright statements of the audiobook.
138
+ #
139
+ # @param description [String] A description of the audiobook. HTML tags are stripped away from this field, use
140
+ #
141
+ # @param explicit [Boolean] Whether or not the audiobook has explicit content (true = yes it does; false = n
142
+ #
143
+ # @param external_urls [Spotted::Models::ExternalURLObject] External URLs for this audiobook.
144
+ #
145
+ # @param href [String] A link to the Web API endpoint providing full details of the audiobook.
146
+ #
147
+ # @param html_description [String] A description of the audiobook. This field may contain HTML tags.
148
+ #
149
+ # @param images [Array<Spotted::Models::ImageObject>] The cover art for the audiobook in various sizes, widest first.
150
+ #
151
+ # @param languages [Array<String>] A list of the languages used in the audiobook, identified by their [ISO 639](htt
152
+ #
153
+ # @param media_type [String] The media type of the audiobook.
154
+ #
155
+ # @param name [String] The name of the audiobook.
156
+ #
157
+ # @param narrators [Array<Spotted::Models::NarratorObject>] The narrator(s) for the audiobook.
158
+ #
159
+ # @param publisher [String] The publisher of the audiobook.
160
+ #
161
+ # @param total_chapters [Integer] The number of chapters in this audiobook.
162
+ #
163
+ # @param type [Symbol, Spotted::Models::AudiobookBase::Type] The object type.
164
+ #
165
+ # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the audi
166
+ #
167
+ # @param edition [String] The edition of the audiobook.
168
+
169
+ # The object type.
170
+ #
171
+ # @see Spotted::Models::AudiobookBase#type
172
+ module Type
173
+ extend Spotted::Internal::Type::Enum
174
+
175
+ AUDIOBOOK = :audiobook
176
+
177
+ # @!method self.values
178
+ # @return [Array<Symbol>]
179
+ end
180
+ end
181
+ end
182
+ end
@@ -13,179 +13,19 @@ module Spotted
13
13
  # @!method initialize(audiobooks:)
14
14
  # @param audiobooks [Array<Spotted::Models::AudiobookListResponse::Audiobook>]
15
15
 
16
- class Audiobook < Spotted::Internal::Type::BaseModel
17
- # @!attribute id
18
- # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
19
- # audiobook.
20
- #
21
- # @return [String]
22
- required :id, String
23
-
24
- # @!attribute authors
25
- # The author(s) for the audiobook.
26
- #
27
- # @return [Array<Spotted::Models::AuthorObject>]
28
- required :authors, -> { Spotted::Internal::Type::ArrayOf[Spotted::AuthorObject] }
29
-
30
- # @!attribute available_markets
31
- # A list of the countries in which the audiobook can be played, identified by
32
- # their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
33
- # code.
34
- #
35
- # @return [Array<String>]
36
- required :available_markets, Spotted::Internal::Type::ArrayOf[String]
37
-
16
+ class Audiobook < Spotted::Models::AudiobookBase
38
17
  # @!attribute chapters
39
18
  # The chapters of the audiobook.
40
19
  #
41
20
  # @return [Spotted::Models::AudiobookListResponse::Audiobook::Chapters]
42
21
  required :chapters, -> { Spotted::Models::AudiobookListResponse::Audiobook::Chapters }
43
22
 
44
- # @!attribute copyrights
45
- # The copyright statements of the audiobook.
46
- #
47
- # @return [Array<Spotted::Models::CopyrightObject>]
48
- required :copyrights, -> { Spotted::Internal::Type::ArrayOf[Spotted::CopyrightObject] }
49
-
50
- # @!attribute description
51
- # A description of the audiobook. HTML tags are stripped away from this field, use
52
- # `html_description` field in case HTML tags are needed.
53
- #
54
- # @return [String]
55
- required :description, String
56
-
57
- # @!attribute explicit
58
- # Whether or not the audiobook has explicit content (true = yes it does; false =
59
- # no it does not OR unknown).
60
- #
61
- # @return [Boolean]
62
- required :explicit, Spotted::Internal::Type::Boolean
63
-
64
- # @!attribute external_urls
65
- # External URLs for this audiobook.
66
- #
67
- # @return [Spotted::Models::ExternalURLObject]
68
- required :external_urls, -> { Spotted::ExternalURLObject }
69
-
70
- # @!attribute href
71
- # A link to the Web API endpoint providing full details of the audiobook.
72
- #
73
- # @return [String]
74
- required :href, String
75
-
76
- # @!attribute html_description
77
- # A description of the audiobook. This field may contain HTML tags.
78
- #
79
- # @return [String]
80
- required :html_description, String
81
-
82
- # @!attribute images
83
- # The cover art for the audiobook in various sizes, widest first.
84
- #
85
- # @return [Array<Spotted::Models::ImageObject>]
86
- required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] }
87
-
88
- # @!attribute languages
89
- # A list of the languages used in the audiobook, identified by their
90
- # [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code.
91
- #
92
- # @return [Array<String>]
93
- required :languages, Spotted::Internal::Type::ArrayOf[String]
94
-
95
- # @!attribute media_type
96
- # The media type of the audiobook.
97
- #
98
- # @return [String]
99
- required :media_type, String
100
-
101
- # @!attribute name
102
- # The name of the audiobook.
103
- #
104
- # @return [String]
105
- required :name, String
106
-
107
- # @!attribute narrators
108
- # The narrator(s) for the audiobook.
109
- #
110
- # @return [Array<Spotted::Models::NarratorObject>]
111
- required :narrators, -> { Spotted::Internal::Type::ArrayOf[Spotted::NarratorObject] }
112
-
113
- # @!attribute publisher
114
- # The publisher of the audiobook.
115
- #
116
- # @return [String]
117
- required :publisher, String
118
-
119
- # @!attribute total_chapters
120
- # The number of chapters in this audiobook.
121
- #
122
- # @return [Integer]
123
- required :total_chapters, Integer
124
-
125
- # @!attribute type
126
- # The object type.
127
- #
128
- # @return [Symbol, Spotted::Models::AudiobookListResponse::Audiobook::Type]
129
- required :type, enum: -> { Spotted::Models::AudiobookListResponse::Audiobook::Type }
130
-
131
- # @!attribute uri
132
- # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
133
- # audiobook.
134
- #
135
- # @return [String]
136
- required :uri, String
137
-
138
- # @!attribute edition
139
- # The edition of the audiobook.
140
- #
141
- # @return [String, nil]
142
- optional :edition, String
143
-
144
- # @!method initialize(id:, authors:, available_markets:, chapters:, copyrights:, description:, explicit:, external_urls:, href:, html_description:, images:, languages:, media_type:, name:, narrators:, publisher:, total_chapters:, type:, uri:, edition: nil)
23
+ # @!method initialize(chapters:)
145
24
  # Some parameter documentations has been truncated, see
146
25
  # {Spotted::Models::AudiobookListResponse::Audiobook} for more details.
147
26
  #
148
- # @param id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the audio
149
- #
150
- # @param authors [Array<Spotted::Models::AuthorObject>] The author(s) for the audiobook.
151
- #
152
- # @param available_markets [Array<String>] A list of the countries in which the audiobook can be played, identified by thei
153
- #
154
27
  # @param chapters [Spotted::Models::AudiobookListResponse::Audiobook::Chapters] The chapters of the audiobook.
155
- #
156
- # @param copyrights [Array<Spotted::Models::CopyrightObject>] The copyright statements of the audiobook.
157
- #
158
- # @param description [String] A description of the audiobook. HTML tags are stripped away from this field, use
159
- #
160
- # @param explicit [Boolean] Whether or not the audiobook has explicit content (true = yes it does; false = n
161
- #
162
- # @param external_urls [Spotted::Models::ExternalURLObject] External URLs for this audiobook.
163
- #
164
- # @param href [String] A link to the Web API endpoint providing full details of the audiobook.
165
- #
166
- # @param html_description [String] A description of the audiobook. This field may contain HTML tags.
167
- #
168
- # @param images [Array<Spotted::Models::ImageObject>] The cover art for the audiobook in various sizes, widest first.
169
- #
170
- # @param languages [Array<String>] A list of the languages used in the audiobook, identified by their [ISO 639](htt
171
- #
172
- # @param media_type [String] The media type of the audiobook.
173
- #
174
- # @param name [String] The name of the audiobook.
175
- #
176
- # @param narrators [Array<Spotted::Models::NarratorObject>] The narrator(s) for the audiobook.
177
- #
178
- # @param publisher [String] The publisher of the audiobook.
179
- #
180
- # @param total_chapters [Integer] The number of chapters in this audiobook.
181
- #
182
- # @param type [Symbol, Spotted::Models::AudiobookListResponse::Audiobook::Type] The object type.
183
- #
184
- # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the audi
185
- #
186
- # @param edition [String] The edition of the audiobook.
187
28
 
188
- # @see Spotted::Models::AudiobookListResponse::Audiobook#chapters
189
29
  class Chapters < Spotted::Internal::Type::BaseModel
190
30
  # @!attribute href
191
31
  # A link to the Web API endpoint returning the full result of the request
@@ -248,18 +88,6 @@ module Spotted
248
88
  #
249
89
  # @param total [Integer] The total number of items available to return.
250
90
  end
251
-
252
- # The object type.
253
- #
254
- # @see Spotted::Models::AudiobookListResponse::Audiobook#type
255
- module Type
256
- extend Spotted::Internal::Type::Enum
257
-
258
- AUDIOBOOK = :audiobook
259
-
260
- # @!method self.values
261
- # @return [Array<Symbol>]
262
- end
263
91
  end
264
92
  end
265
93
  end
@@ -3,179 +3,19 @@
3
3
  module Spotted
4
4
  module Models
5
5
  # @see Spotted::Resources::Audiobooks#retrieve
6
- class AudiobookRetrieveResponse < Spotted::Internal::Type::BaseModel
7
- # @!attribute id
8
- # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
9
- # audiobook.
10
- #
11
- # @return [String]
12
- required :id, String
13
-
14
- # @!attribute authors
15
- # The author(s) for the audiobook.
16
- #
17
- # @return [Array<Spotted::Models::AuthorObject>]
18
- required :authors, -> { Spotted::Internal::Type::ArrayOf[Spotted::AuthorObject] }
19
-
20
- # @!attribute available_markets
21
- # A list of the countries in which the audiobook can be played, identified by
22
- # their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
23
- # code.
24
- #
25
- # @return [Array<String>]
26
- required :available_markets, Spotted::Internal::Type::ArrayOf[String]
27
-
6
+ class AudiobookRetrieveResponse < Spotted::Models::AudiobookBase
28
7
  # @!attribute chapters
29
8
  # The chapters of the audiobook.
30
9
  #
31
10
  # @return [Spotted::Models::AudiobookRetrieveResponse::Chapters]
32
11
  required :chapters, -> { Spotted::Models::AudiobookRetrieveResponse::Chapters }
33
12
 
34
- # @!attribute copyrights
35
- # The copyright statements of the audiobook.
36
- #
37
- # @return [Array<Spotted::Models::CopyrightObject>]
38
- required :copyrights, -> { Spotted::Internal::Type::ArrayOf[Spotted::CopyrightObject] }
39
-
40
- # @!attribute description
41
- # A description of the audiobook. HTML tags are stripped away from this field, use
42
- # `html_description` field in case HTML tags are needed.
43
- #
44
- # @return [String]
45
- required :description, String
46
-
47
- # @!attribute explicit
48
- # Whether or not the audiobook has explicit content (true = yes it does; false =
49
- # no it does not OR unknown).
50
- #
51
- # @return [Boolean]
52
- required :explicit, Spotted::Internal::Type::Boolean
53
-
54
- # @!attribute external_urls
55
- # External URLs for this audiobook.
56
- #
57
- # @return [Spotted::Models::ExternalURLObject]
58
- required :external_urls, -> { Spotted::ExternalURLObject }
59
-
60
- # @!attribute href
61
- # A link to the Web API endpoint providing full details of the audiobook.
62
- #
63
- # @return [String]
64
- required :href, String
65
-
66
- # @!attribute html_description
67
- # A description of the audiobook. This field may contain HTML tags.
68
- #
69
- # @return [String]
70
- required :html_description, String
71
-
72
- # @!attribute images
73
- # The cover art for the audiobook in various sizes, widest first.
74
- #
75
- # @return [Array<Spotted::Models::ImageObject>]
76
- required :images, -> { Spotted::Internal::Type::ArrayOf[Spotted::ImageObject] }
77
-
78
- # @!attribute languages
79
- # A list of the languages used in the audiobook, identified by their
80
- # [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code.
81
- #
82
- # @return [Array<String>]
83
- required :languages, Spotted::Internal::Type::ArrayOf[String]
84
-
85
- # @!attribute media_type
86
- # The media type of the audiobook.
87
- #
88
- # @return [String]
89
- required :media_type, String
90
-
91
- # @!attribute name
92
- # The name of the audiobook.
93
- #
94
- # @return [String]
95
- required :name, String
96
-
97
- # @!attribute narrators
98
- # The narrator(s) for the audiobook.
99
- #
100
- # @return [Array<Spotted::Models::NarratorObject>]
101
- required :narrators, -> { Spotted::Internal::Type::ArrayOf[Spotted::NarratorObject] }
102
-
103
- # @!attribute publisher
104
- # The publisher of the audiobook.
105
- #
106
- # @return [String]
107
- required :publisher, String
108
-
109
- # @!attribute total_chapters
110
- # The number of chapters in this audiobook.
111
- #
112
- # @return [Integer]
113
- required :total_chapters, Integer
114
-
115
- # @!attribute type
116
- # The object type.
117
- #
118
- # @return [Symbol, Spotted::Models::AudiobookRetrieveResponse::Type]
119
- required :type, enum: -> { Spotted::Models::AudiobookRetrieveResponse::Type }
120
-
121
- # @!attribute uri
122
- # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
123
- # audiobook.
124
- #
125
- # @return [String]
126
- required :uri, String
127
-
128
- # @!attribute edition
129
- # The edition of the audiobook.
130
- #
131
- # @return [String, nil]
132
- optional :edition, String
133
-
134
- # @!method initialize(id:, authors:, available_markets:, chapters:, copyrights:, description:, explicit:, external_urls:, href:, html_description:, images:, languages:, media_type:, name:, narrators:, publisher:, total_chapters:, type:, uri:, edition: nil)
13
+ # @!method initialize(chapters:)
135
14
  # Some parameter documentations has been truncated, see
136
15
  # {Spotted::Models::AudiobookRetrieveResponse} for more details.
137
16
  #
138
- # @param id [String] The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the audio
139
- #
140
- # @param authors [Array<Spotted::Models::AuthorObject>] The author(s) for the audiobook.
141
- #
142
- # @param available_markets [Array<String>] A list of the countries in which the audiobook can be played, identified by thei
143
- #
144
17
  # @param chapters [Spotted::Models::AudiobookRetrieveResponse::Chapters] The chapters of the audiobook.
145
- #
146
- # @param copyrights [Array<Spotted::Models::CopyrightObject>] The copyright statements of the audiobook.
147
- #
148
- # @param description [String] A description of the audiobook. HTML tags are stripped away from this field, use
149
- #
150
- # @param explicit [Boolean] Whether or not the audiobook has explicit content (true = yes it does; false = n
151
- #
152
- # @param external_urls [Spotted::Models::ExternalURLObject] External URLs for this audiobook.
153
- #
154
- # @param href [String] A link to the Web API endpoint providing full details of the audiobook.
155
- #
156
- # @param html_description [String] A description of the audiobook. This field may contain HTML tags.
157
- #
158
- # @param images [Array<Spotted::Models::ImageObject>] The cover art for the audiobook in various sizes, widest first.
159
- #
160
- # @param languages [Array<String>] A list of the languages used in the audiobook, identified by their [ISO 639](htt
161
- #
162
- # @param media_type [String] The media type of the audiobook.
163
- #
164
- # @param name [String] The name of the audiobook.
165
- #
166
- # @param narrators [Array<Spotted::Models::NarratorObject>] The narrator(s) for the audiobook.
167
- #
168
- # @param publisher [String] The publisher of the audiobook.
169
- #
170
- # @param total_chapters [Integer] The number of chapters in this audiobook.
171
- #
172
- # @param type [Symbol, Spotted::Models::AudiobookRetrieveResponse::Type] The object type.
173
- #
174
- # @param uri [String] The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the audi
175
- #
176
- # @param edition [String] The edition of the audiobook.
177
18
 
178
- # @see Spotted::Models::AudiobookRetrieveResponse#chapters
179
19
  class Chapters < Spotted::Internal::Type::BaseModel
180
20
  # @!attribute href
181
21
  # A link to the Web API endpoint returning the full result of the request
@@ -238,18 +78,6 @@ module Spotted
238
78
  #
239
79
  # @param total [Integer] The total number of items available to return.
240
80
  end
241
-
242
- # The object type.
243
- #
244
- # @see Spotted::Models::AudiobookRetrieveResponse#type
245
- module Type
246
- extend Spotted::Internal::Type::Enum
247
-
248
- AUDIOBOOK = :audiobook
249
-
250
- # @!method self.values
251
- # @return [Array<Symbol>]
252
- end
253
81
  end
254
82
  end
255
83
  end