Class: PolyglotIos::Resource::Base

Inherits:
JsonApiClient::Resource
  • Object
show all
Extended by:
Helper::Depaginate
Defined in:
lib/ios_polyglot_cli/api/base.rb

Direct Known Subclasses

Language, Project, Session, Translation, TranslationKey

Constant Summary

Constants included from Helper::Depaginate

Helper::Depaginate::PER_PAGE

Class Method Summary collapse

Methods included from Helper::Depaginate

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