Class: PolyglotCli::Resource::Base
- Inherits:
-
JsonApiClient::Resource
- Object
- JsonApiClient::Resource
- PolyglotCli::Resource::Base
show all
- Extended by:
- Helper::Depaginate
- Defined in:
- lib/polyglot_cli/resources/base.rb
Constant Summary
Helper::Depaginate::PER_PAGE
Class Method Summary
collapse
depaginate_query
Class Method Details
.depaginate(opts = {}) ⇒ Object
25
26
27
|
# File 'lib/polyglot_cli/resources/base.rb', line 25
def self.depaginate(opts = {})
depaginate_query(where(opts))
end
|
.token(token) ⇒ Object
20
21
22
23
|
# File 'lib/polyglot_cli/resources/base.rb', line 20
def self.token(token)
self.connection_options = { headers: { 'X-Auth-Token' => token } }
self
end
|
.with_subdomain(subdomain) ⇒ Object
15
16
17
18
|
# File 'lib/polyglot_cli/resources/base.rb', line 15
def self.with_subdomain(subdomain)
self.site = site.sub(/http(s)?\:\/\//, "http\\1://#{subdomain}.")
self
end
|