Sha256: 94d1b3707a6ee05b2c5927186e50988dbc95f76e3c99cc13361dd57bd7d831cd

Contents?: true

Size: 650 Bytes

Versions: 6

Compression:

Stored size: 650 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding:utf-8 -*-

require 'freee'

module Freee
  class CLI < Thor
    include Thor::Actions

    desc "token", "Get access token of application for the freee."
    def token 
      client_id = ask("Client ID\n")
      secret_key = ask("Secret Key\n")
      redirect_uri = ask("Redirect URI\n")
      authorization_code = ask("Authorization code\n")

      puts 'Token: ' + Freee::Util.create_token(
        client_id: client_id,
        secret_key: secret_key,
        redirect_uri: redirect_uri,
        authorization_code: authorization_code
      )
    end
  end
end

Freee::CLI.start(ARGV)

#/* vim: set syntax=ruby */

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
freee-0.3.0 bin/freee
freee-0.2.0 bin/freee
freee-0.1.0 bin/freee
freee-0.0.4 bin/freee
freee-0.0.3 bin/freee
freee-0.0.2 bin/freee