class Appilf::Client

Public Class Methods

new(opts={}) click to toggle source
# File lib/appilf/client.rb, line 18
def initialize(opts={})
  opts.each_pair do |key, val|
    instance_variable_set(:"@#{key}", val)
  end
  authenticate if opts && !opts[:access_token]
  self.user = retrieve_user
  self
end

Public Instance Methods

authenticated_api_delete(path, payload, headers = {}) click to toggle source
# File lib/appilf/client.rb, line 35
def authenticated_api_delete(path, payload, headers = {})
  api_delete(path, payload, headers.merge(authentication_headers))
end
authenticated_api_get(path, headers = {}) click to toggle source
# File lib/appilf/client.rb, line 27
def authenticated_api_get(path, headers = {})
  api_get(path, headers.merge(authentication_headers))
end
authenticated_api_post(path, payload, headers = {}) click to toggle source
# File lib/appilf/client.rb, line 31
def authenticated_api_post(path, payload, headers = {})
  api_post(path, payload, headers.merge(authentication_headers))
end