class PolyglotCli::Resource::Base

Public Class Methods

depaginate(opts = {}) click to toggle source
# File lib/polyglot_cli/resources/base.rb, line 25
def self.depaginate(opts = {})
  depaginate_query(where(opts))
end
token(token) click to toggle source
# 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) click to toggle source
# 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