Class: PolyglotFlutter::Resource::Base

Inherits:
JsonApiClient::Resource
  • Object
show all
Extended by:
Helper::Depaginate
Defined in:
lib/flutter_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

.depaginate(opts = {}) ⇒ Object



13
14
15
# File 'lib/flutter_polyglot_cli/api/base.rb', line 13

def self.depaginate(opts = {})
  depaginate_query(where(opts))
end

.token(token) ⇒ Object



8
9
10
11
# File 'lib/flutter_polyglot_cli/api/base.rb', line 8

def self.token(token)
  self.connection_options = { headers: { 'X-Auth-Token' => token } }
  self
end