Sha256: 4a083789f0c4af896d755151434e033b5473d471ba855c03c917d413655aa283

Contents?: true

Size: 696 Bytes

Versions: 14

Compression:

Stored size: 696 Bytes

Contents

module Lionel
  class TrelloAuthentication
    include Configurable

    config_accessor :trello_key, :trello_token

    def data
      {
        trello_key: trello_key,
        trello_token: trello_token
      }
    end

    def configure
      Trello.configure do |c|
        c.developer_public_key  = trello_key
        c.member_token          = trello_token
      end
    end

    def trello_key_url
      "https://trello.com/1/appKey/generate"
    end

    def trello_token_url(key = trello_key)
      "https://trello.com/1/authorize?key=#{key}&name=#{app_name}&response_type=token&scope=read,write,account&expiration=never"
    end

    def app_name
      "LionelRichie"
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
lionel_richie-0.3.1 lib/lionel/trello_authentication.rb
lionel_richie-0.3.0 lib/lionel/trello_authentication.rb
lionel_richie-0.2.4 lib/lionel/trello_authentication.rb
lionel_richie-0.2.3.1 lib/lionel/trello_authentication.rb
lionel_richie-0.2.3 lib/lionel/trello_authentication.rb
lionel_richie-0.2.1 lib/lionel/trello_authentication.rb
lionel_richie-0.2.0 lib/lionel/trello_authentication.rb
lionel_richie-0.1.5.1 lib/lionel/trello_authentication.rb
lionel_richie-0.1.5 lib/lionel/trello_authentication.rb
lionel_richie-0.1.4 lib/lionel/trello_authentication.rb
lionel_richie-0.1.3 lib/lionel/trello_authentication.rb
lionel_richie-0.1.2 lib/lionel/trello_authentication.rb
lionel_richie-0.1.1 lib/lionel/trello_authentication.rb
lionel_richie-0.1.0 lib/lionel/trello_authentication.rb