class Desk::API

@private

Public Class Methods

new(options={}) click to toggle source

Creates a new API

# File lib/desk/api.rb, line 12
def initialize(options={})
  options = Desk.options.merge(options)

  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Public Instance Methods

api_path() click to toggle source
# File lib/desk/api.rb, line 24
def api_path
  "/api/#{self.version}/"
end
endpoint() click to toggle source
# File lib/desk/api.rb, line 20
def endpoint
  "https://#{self.subdomain}.#{self.domain}"+api_path
end