Class: Precious::API::V2::Chapters
- Inherits:
-
Base
- Object
- Base
- Precious::API::V2::Chapters
show all
- Defined in:
- lib/precious/chapters.rb
Constant Summary
Constants inherited
from Base
Base::API_ENDPOINT
Instance Attribute Summary
Attributes inherited from Base
#api_key
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#get_chapter(id:) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/precious/chapters.rb', line 19
def get_chapter(id:)
params = {
_id: id
}
request(
http_method: :get,
endpoint: "chapter",
params: params
)
end
|
#get_chapters(limit: 0, page: 0, offset: 0) ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'lib/precious/chapters.rb', line 8
def get_chapters(limit: 0, page: 0, offset: 0)
params = set_params(limit: limit, page: page, offset: offset)
request(
http_method: :get,
endpoint: "chapter",
params: params
)
end
|