Module: OneApiSdk::Client::Chapters
- Included in:
- OneApiSdk::Client
- Defined in:
- lib/one_api_sdk/chapters.rb
Instance Method Summary collapse
-
#chapter(id, query_params = "") ⇒ Hash
Request one specific book chapter.
-
#chapters(query_params = "") ⇒ Array<Hash>
List all book chapters.
Instance Method Details
#chapter(id, query_params = "") ⇒ Hash
Request one specific book chapter
22 23 24 25 |
# File 'lib/one_api_sdk/chapters.rb', line 22 def chapter(id,query_params="") response = call_with_token("#{Constants::CHAPTER_BASE_PATH}/#{id}#{query_params}") JSON.parse(response.body) end |
#chapters(query_params = "") ⇒ Array<Hash>
List all book chapters
13 14 15 16 |
# File 'lib/one_api_sdk/chapters.rb', line 13 def chapters(query_params="") response = call_with_token("#{Constants::CHAPTER_BASE_PATH}#{query_params}") JSON.parse(response.body) end |