Class: Spotted::Resources::Audiobooks
- Inherits:
-
Object
- Object
- Spotted::Resources::Audiobooks
- Defined in:
- lib/spotted/resources/audiobooks.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Audiobooks
constructor
private
A new instance of Audiobooks.
-
#list(ids: , market: nil, request_options: {}) ⇒ Spotted::Models::AudiobookListResponse
Some parameter documentations has been truncated, see Models::AudiobookListParams for more details.
-
#list_chapters(id, limit: nil, market: nil, offset: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::SimplifiedChapterObject>
Some parameter documentations has been truncated, see Models::AudiobookListChaptersParams for more details.
-
#retrieve(id, market: nil, request_options: {}) ⇒ Spotted::Models::AudiobookRetrieveResponse
Some parameter documentations has been truncated, see Models::AudiobookRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Audiobooks
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 Audiobooks.
100 101 102 |
# File 'lib/spotted/resources/audiobooks.rb', line 100 def initialize(client:) @client = client end |
Instance Method Details
#list(ids: , market: nil, request_options: {}) ⇒ Spotted::Models::AudiobookListResponse
Some parameter documentations has been truncated, see Models::AudiobookListParams for more details.
Get Spotify catalog information for several audiobooks identified by their Spotify IDs. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/spotted/resources/audiobooks.rb', line 52 def list(params) parsed, = Spotted::AudiobookListParams.dump_request(params) @client.request( method: :get, path: "audiobooks", query: parsed, model: Spotted::Models::AudiobookListResponse, options: ) end |
#list_chapters(id, limit: nil, market: nil, offset: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::SimplifiedChapterObject>
Some parameter documentations has been truncated, see Models::AudiobookListChaptersParams for more details.
Get Spotify catalog information about an audiobookâs chapters. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/spotted/resources/audiobooks.rb', line 85 def list_chapters(id, params = {}) parsed, = Spotted::AudiobookListChaptersParams.dump_request(params) @client.request( method: :get, path: ["audiobooks/%1$s/chapters", id], query: parsed, page: Spotted::Internal::CursorURLPage, model: Spotted::SimplifiedChapterObject, options: ) end |
#retrieve(id, market: nil, request_options: {}) ⇒ Spotted::Models::AudiobookRetrieveResponse
Some parameter documentations has been truncated, see Models::AudiobookRetrieveParams for more details.
Get Spotify catalog information for a single audiobook. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/spotted/resources/audiobooks.rb', line 23 def retrieve(id, params = {}) parsed, = Spotted::AudiobookRetrieveParams.dump_request(params) @client.request( method: :get, path: ["audiobooks/%1$s", id], query: parsed, model: Spotted::Models::AudiobookRetrieveResponse, options: ) end |