spotted 0.1.0 → 0.2.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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/spotted/models/audiobook_base.rb +182 -0
  5. data/lib/spotted/models/audiobook_list_response.rb +2 -174
  6. data/lib/spotted/models/audiobook_retrieve_response.rb +2 -174
  7. data/lib/spotted/models/chapter_list_response.rb +3 -183
  8. data/lib/spotted/models/chapter_retrieve_response.rb +3 -183
  9. data/lib/spotted/models/episode_object.rb +3 -166
  10. data/lib/spotted/models/me/audiobook_list_response.rb +2 -174
  11. data/lib/spotted/models/me/show_list_response.rb +3 -166
  12. data/lib/spotted/models/search_retrieve_response.rb +6 -345
  13. data/lib/spotted/models/show_base.rb +165 -0
  14. data/lib/spotted/models/show_list_response.rb +3 -163
  15. data/lib/spotted/models/show_retrieve_response.rb +2 -157
  16. data/lib/spotted/models.rb +4 -0
  17. data/lib/spotted/version.rb +1 -1
  18. data/lib/spotted.rb +2 -0
  19. data/rbi/spotted/models/audiobook_base.rbi +219 -0
  20. data/rbi/spotted/models/audiobook_list_response.rbi +4 -212
  21. data/rbi/spotted/models/audiobook_retrieve_response.rbi +4 -209
  22. data/rbi/spotted/models/chapter_list_response.rbi +4 -249
  23. data/rbi/spotted/models/chapter_retrieve_response.rbi +4 -245
  24. data/rbi/spotted/models/episode_object.rbi +4 -199
  25. data/rbi/spotted/models/me/audiobook_list_response.rbi +4 -212
  26. data/rbi/spotted/models/me/show_list_response.rbi +6 -227
  27. data/rbi/spotted/models/search_retrieve_response.rbi +6 -473
  28. data/rbi/spotted/models/show_base.rbi +194 -0
  29. data/rbi/spotted/models/show_list_response.rbi +5 -216
  30. data/rbi/spotted/models/show_retrieve_response.rbi +4 -182
  31. data/rbi/spotted/models.rbi +4 -0
  32. data/sig/spotted/models/audiobook_base.rbs +122 -0
  33. data/sig/spotted/models/audiobook_list_response.rbs +8 -111
  34. data/sig/spotted/models/audiobook_retrieve_response.rbs +8 -113
  35. data/sig/spotted/models/chapter_list_response.rbs +4 -123
  36. data/sig/spotted/models/chapter_retrieve_response.rbs +4 -123
  37. data/sig/spotted/models/episode_object.rbs +4 -111
  38. data/sig/spotted/models/me/audiobook_list_response.rbs +8 -111
  39. data/sig/spotted/models/me/show_list_response.rbs +5 -121
  40. data/sig/spotted/models/search_retrieve_response.rbs +8 -234
  41. data/sig/spotted/models/show_base.rbs +110 -0
  42. data/sig/spotted/models/show_list_response.rbs +4 -116
  43. data/sig/spotted/models/show_retrieve_response.rbs +8 -101
  44. data/sig/spotted/models.rbs +4 -0
  45. metadata +7 -1
@@ -24,19 +24,16 @@ module Spotted
24
24
  attr_writer :added_at
25
25
 
26
26
  # Information about the show.
27
- sig { returns(T.nilable(Spotted::Models::Me::ShowListResponse::Show)) }
27
+ sig { returns(T.nilable(Spotted::ShowBase)) }
28
28
  attr_reader :show
29
29
 
30
- sig do
31
- params(show: Spotted::Models::Me::ShowListResponse::Show::OrHash).void
32
- end
30
+ sig { params(show: Spotted::ShowBase::OrHash).void }
33
31
  attr_writer :show
34
32
 
35
33
  sig do
36
- params(
37
- added_at: Time,
38
- show: Spotted::Models::Me::ShowListResponse::Show::OrHash
39
- ).returns(T.attached_class)
34
+ params(added_at: Time, show: Spotted::ShowBase::OrHash).returns(
35
+ T.attached_class
36
+ )
40
37
  end
41
38
  def self.new(
42
39
  # The date and time the show was saved. Timestamps are returned in ISO 8601 format
@@ -50,227 +47,9 @@ module Spotted
50
47
  )
51
48
  end
52
49
 
53
- sig do
54
- override.returns(
55
- {
56
- added_at: Time,
57
- show: Spotted::Models::Me::ShowListResponse::Show
58
- }
59
- )
60
- end
50
+ sig { override.returns({ added_at: Time, show: Spotted::ShowBase }) }
61
51
  def to_hash
62
52
  end
63
-
64
- class Show < Spotted::Internal::Type::BaseModel
65
- OrHash =
66
- T.type_alias do
67
- T.any(
68
- Spotted::Models::Me::ShowListResponse::Show,
69
- Spotted::Internal::AnyHash
70
- )
71
- end
72
-
73
- # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the show.
74
- sig { returns(String) }
75
- attr_accessor :id
76
-
77
- # A list of the countries in which the show can be played, identified by their
78
- # [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
79
- sig { returns(T::Array[String]) }
80
- attr_accessor :available_markets
81
-
82
- # The copyright statements of the show.
83
- sig { returns(T::Array[Spotted::CopyrightObject]) }
84
- attr_accessor :copyrights
85
-
86
- # A description of the show. HTML tags are stripped away from this field, use
87
- # `html_description` field in case HTML tags are needed.
88
- sig { returns(String) }
89
- attr_accessor :description
90
-
91
- # Whether or not the show has explicit content (true = yes it does; false = no it
92
- # does not OR unknown).
93
- sig { returns(T::Boolean) }
94
- attr_accessor :explicit
95
-
96
- # External URLs for this show.
97
- sig { returns(Spotted::ExternalURLObject) }
98
- attr_reader :external_urls
99
-
100
- sig { params(external_urls: Spotted::ExternalURLObject::OrHash).void }
101
- attr_writer :external_urls
102
-
103
- # A link to the Web API endpoint providing full details of the show.
104
- sig { returns(String) }
105
- attr_accessor :href
106
-
107
- # A description of the show. This field may contain HTML tags.
108
- sig { returns(String) }
109
- attr_accessor :html_description
110
-
111
- # The cover art for the show in various sizes, widest first.
112
- sig { returns(T::Array[Spotted::ImageObject]) }
113
- attr_accessor :images
114
-
115
- # True if all of the shows episodes are hosted outside of Spotify's CDN. This
116
- # field might be `null` in some cases.
117
- sig { returns(T::Boolean) }
118
- attr_accessor :is_externally_hosted
119
-
120
- # A list of the languages used in the show, identified by their
121
- # [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code.
122
- sig { returns(T::Array[String]) }
123
- attr_accessor :languages
124
-
125
- # The media type of the show.
126
- sig { returns(String) }
127
- attr_accessor :media_type
128
-
129
- # The name of the episode.
130
- sig { returns(String) }
131
- attr_accessor :name
132
-
133
- # The publisher of the show.
134
- sig { returns(String) }
135
- attr_accessor :publisher
136
-
137
- # The total number of episodes in the show.
138
- sig { returns(Integer) }
139
- attr_accessor :total_episodes
140
-
141
- # The object type.
142
- sig do
143
- returns(
144
- Spotted::Models::Me::ShowListResponse::Show::Type::TaggedSymbol
145
- )
146
- end
147
- attr_accessor :type
148
-
149
- # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
150
- # show.
151
- sig { returns(String) }
152
- attr_accessor :uri
153
-
154
- # Information about the show.
155
- sig do
156
- params(
157
- id: String,
158
- available_markets: T::Array[String],
159
- copyrights: T::Array[Spotted::CopyrightObject::OrHash],
160
- description: String,
161
- explicit: T::Boolean,
162
- external_urls: Spotted::ExternalURLObject::OrHash,
163
- href: String,
164
- html_description: String,
165
- images: T::Array[Spotted::ImageObject::OrHash],
166
- is_externally_hosted: T::Boolean,
167
- languages: T::Array[String],
168
- media_type: String,
169
- name: String,
170
- publisher: String,
171
- total_episodes: Integer,
172
- type: Spotted::Models::Me::ShowListResponse::Show::Type::OrSymbol,
173
- uri: String
174
- ).returns(T.attached_class)
175
- end
176
- def self.new(
177
- # The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the show.
178
- id:,
179
- # A list of the countries in which the show can be played, identified by their
180
- # [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
181
- available_markets:,
182
- # The copyright statements of the show.
183
- copyrights:,
184
- # A description of the show. HTML tags are stripped away from this field, use
185
- # `html_description` field in case HTML tags are needed.
186
- description:,
187
- # Whether or not the show has explicit content (true = yes it does; false = no it
188
- # does not OR unknown).
189
- explicit:,
190
- # External URLs for this show.
191
- external_urls:,
192
- # A link to the Web API endpoint providing full details of the show.
193
- href:,
194
- # A description of the show. This field may contain HTML tags.
195
- html_description:,
196
- # The cover art for the show in various sizes, widest first.
197
- images:,
198
- # True if all of the shows episodes are hosted outside of Spotify's CDN. This
199
- # field might be `null` in some cases.
200
- is_externally_hosted:,
201
- # A list of the languages used in the show, identified by their
202
- # [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code.
203
- languages:,
204
- # The media type of the show.
205
- media_type:,
206
- # The name of the episode.
207
- name:,
208
- # The publisher of the show.
209
- publisher:,
210
- # The total number of episodes in the show.
211
- total_episodes:,
212
- # The object type.
213
- type:,
214
- # The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
215
- # show.
216
- uri:
217
- )
218
- end
219
-
220
- sig do
221
- override.returns(
222
- {
223
- id: String,
224
- available_markets: T::Array[String],
225
- copyrights: T::Array[Spotted::CopyrightObject],
226
- description: String,
227
- explicit: T::Boolean,
228
- external_urls: Spotted::ExternalURLObject,
229
- href: String,
230
- html_description: String,
231
- images: T::Array[Spotted::ImageObject],
232
- is_externally_hosted: T::Boolean,
233
- languages: T::Array[String],
234
- media_type: String,
235
- name: String,
236
- publisher: String,
237
- total_episodes: Integer,
238
- type:
239
- Spotted::Models::Me::ShowListResponse::Show::Type::TaggedSymbol,
240
- uri: String
241
- }
242
- )
243
- end
244
- def to_hash
245
- end
246
-
247
- # The object type.
248
- module Type
249
- extend Spotted::Internal::Type::Enum
250
-
251
- TaggedSymbol =
252
- T.type_alias do
253
- T.all(Symbol, Spotted::Models::Me::ShowListResponse::Show::Type)
254
- end
255
- OrSymbol = T.type_alias { T.any(Symbol, String) }
256
-
257
- SHOW =
258
- T.let(
259
- :show,
260
- Spotted::Models::Me::ShowListResponse::Show::Type::TaggedSymbol
261
- )
262
-
263
- sig do
264
- override.returns(
265
- T::Array[
266
- Spotted::Models::Me::ShowListResponse::Show::Type::TaggedSymbol
267
- ]
268
- )
269
- end
270
- def self.values
271
- end
272
- end
273
- end
274
53
  end
275
54
  end
276
55
  end