Sha256: 0d53ef948ac157d69aecfbc6e22c15750f2ffd4cc549e827800530a7258b9bf6
Contents?: true
Size: 818 Bytes
Versions: 26
Compression:
Stored size: 818 Bytes
Contents
require "app_manager/client/connection" require "app_manager/client/banners" require "app_manager/client/plans" module AppManager class Client include HTTParty include AppManager::Client::Connection include AppManager::Client::Banners include AppManager::Client::Plans # debug_output $stderr if Rails.env.development? format :json def initialize(access_token = nil, json_req = false) access_token ||= ENV["APP_MANAGER_ACCESS_TOKEN"] hostport = ENV['APP_MANAGER_API_URL'] || 'https://app-manager.hulkapps.com' self.class.base_uri "#{hostport}/api" header = {'token' => "#{access_token}"} header.merge!('Content-Type' => 'application/json') if json_req self.class.default_options.merge!(headers: header) end def is_json end end end
Version data entries
26 entries across 26 versions & 1 rubygems