module Tacokit::Authorization
Public Instance Methods
get_app_key()
click to toggle source
# File lib/tacokit/authorization.rb, line 3 def get_app_key # rubocop:disable Style/AccessorMethodName open_url web_url("app-key") end
Private Instance Methods
open_url(url)
click to toggle source
# File lib/tacokit/authorization.rb, line 30 def open_url(url) require "launchy" Launchy.open(url) rescue LoadError warn "Visit #{url}" warn "Please install the launchy gem to open the url automatically." end
web_connection()
click to toggle source
# File lib/tacokit/authorization.rb, line 42 def web_connection Faraday::Connection.new(web_endpoint) end
web_url(path, params = {})
click to toggle source
# File lib/tacokit/authorization.rb, line 38 def web_url(path, params = {}) web_connection.build_url(path, params).to_s end