class Bearer
Ruby bindings for Bearer
Constants
- VERSION
Public Class Methods
integration(integration_id, http_client_settings: {})
click to toggle source
@see {Bearer#integration} @param (see integration
) @return [Bearer::Integration]
# File lib/bearer.rb, line 43 def self.integration(integration_id, http_client_settings: {}) new.integration(integration_id, http_client_settings: http_client_settings) end
logger()
click to toggle source
@see {Logger} @return [Logger]
# File lib/bearer.rb, line 49 def self.logger @logger ||= Logger.new(STDOUT, level: Bearer::Configuration.log_level) end
new( secret_key = Bearer::Configuration.secret_key, auth_host: Bearer::Configuration.auth_host, host: Bearer::Configuration.host )
click to toggle source
Create an instance of the Bearer
client @param secret_key [String] developer secret Key from app.bearer.sh/settings. @param auth_host [String] used internally @param host [String] used internally
# File lib/bearer.rb, line 15 def initialize( secret_key = Bearer::Configuration.secret_key, auth_host: Bearer::Configuration.auth_host, host: Bearer::Configuration.host ) @secret_key = secret_key @auth_host = auth_host @host = host end
Public Instance Methods
integration(integration_id, http_client_settings: {})
click to toggle source
Return an integration client
@param http_client_settings [Hash<String,String>] sent as keyword arguments to Net::HTTP.start method @param integration_id [String] bearer api id @return [Bearer::Integration]
# File lib/bearer.rb, line 30 def integration(integration_id, http_client_settings: {}) Integration.new( integration_id: integration_id, auth_host: @auth_host, host: @host, secret_key: @secret_key, http_client_settings: http_client_settings ) end