module Forward::API
Constants
- DEFAULT_API_HOST
- VERSION
Public Class Methods
base_path()
click to toggle source
# File lib/forward/api.rb, line 17 def self.base_path @base_path ||= "/api/#{VERSION}" end
host()
click to toggle source
Returns either an api host set in the environment or a set default.
Returns a String containing the api host.
# File lib/forward/api.rb, line 13 def self.host @host ||= ENV['FORWARD_API_HOST'] || DEFAULT_API_HOST end
token()
click to toggle source
# File lib/forward/api.rb, line 25 def self.token defined?(@api_token) ? @api_token : nil end
token=(token)
click to toggle source
# File lib/forward/api.rb, line 21 def self.token=(token) @api_token = token end