Module: Tacokit::Authorization

Included in:
Client
Defined in:
lib/tacokit/authorization.rb

Instance Method Summary collapse

Instance Method Details

#authorize(params = {}) ⇒ Object

Get a token for making authorized requests to the Trello API

Parameters:

  • contents (String, #read)

    the contents to reverse

  • options (Hash)

    Repository information to update

See Also:



18
19
20
# File 'lib/tacokit/authorization.rb', line 18

def authorize(params = {})
  open_url authorize_url(params)
end

#authorize_url(params = {}) ⇒ Object



22
23
24
25
26
27
# File 'lib/tacokit/authorization.rb', line 22

def authorize_url(params = {})
  params[:key] ||= app_key
  params[:name] ||= "Tacokit"
  params[:response_type] ||= "token"
  web_url "authorize", params
end

#get_app_keyObject

rubocop:disable Style/AccessorMethodName



3
4
5
# File 'lib/tacokit/authorization.rb', line 3

def get_app_key # rubocop:disable Style/AccessorMethodName
  open_url web_url("appKey/generate")
end