Class: PolyglotIos::Resource::Base
- Inherits:
-
JsonApiClient::Resource
- Object
- JsonApiClient::Resource
- PolyglotIos::Resource::Base
show all
- Extended by:
- Helper::Depaginate
- Defined in:
- lib/ios_polyglot_cli/api/base.rb
Constant Summary
Helper::Depaginate::PER_PAGE
Class Method Summary
collapse
depaginate_query
Class Method Details
.api_url(url) ⇒ Object
6
7
8
9
|
# File 'lib/ios_polyglot_cli/api/base.rb', line 6
def self.api_url(url)
self.site = url
self
end
|
.depaginate(opts = {}) ⇒ Object
16
17
18
|
# File 'lib/ios_polyglot_cli/api/base.rb', line 16
def self.depaginate(opts = {})
depaginate_query(where(opts))
end
|
.token(token) ⇒ Object
11
12
13
14
|
# File 'lib/ios_polyglot_cli/api/base.rb', line 11
def self.token(token)
self.connection_options = { headers: { 'X-Auth-Token' => token } }
self
end
|