Class: Spotted::Resources::Chapters
- Inherits:
-
Object
- Object
- Spotted::Resources::Chapters
- Defined in:
- lib/spotted/resources/chapters.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Chapters
constructor
private
A new instance of Chapters.
-
#list(ids: , market: nil, request_options: {}) ⇒ Spotted::Models::ChapterListResponse
Some parameter documentations has been truncated, see Models::ChapterListParams for more details.
-
#retrieve(id, market: nil, request_options: {}) ⇒ Spotted::Models::ChapterRetrieveResponse
Some parameter documentations has been truncated, see Models::ChapterRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Chapters
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Chapters.
67 68 69 |
# File 'lib/spotted/resources/chapters.rb', line 67 def initialize(client:) @client = client end |
Instance Method Details
#list(ids: , market: nil, request_options: {}) ⇒ Spotted::Models::ChapterListResponse
Some parameter documentations has been truncated, see Models::ChapterListParams for more details.
Get Spotify catalog information for several audiobook chapters identified by their Spotify IDs. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/spotted/resources/chapters.rb', line 53 def list(params) parsed, = Spotted::ChapterListParams.dump_request(params) @client.request( method: :get, path: "chapters", query: parsed, model: Spotted::Models::ChapterListResponse, options: ) end |
#retrieve(id, market: nil, request_options: {}) ⇒ Spotted::Models::ChapterRetrieveResponse
Some parameter documentations has been truncated, see Models::ChapterRetrieveParams for more details.
Get Spotify catalog information for a single audiobook chapter. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/spotted/resources/chapters.rb', line 24 def retrieve(id, params = {}) parsed, = Spotted::ChapterRetrieveParams.dump_request(params) @client.request( method: :get, path: ["chapters/%1$s", id], query: parsed, model: Spotted::Models::ChapterRetrieveResponse, options: ) end |