Sha256: 4ba173a1ca6d656259898d828b29613c074fdfd3c43b6f5ffa17874ced197792

Contents?: true

Size: 559 Bytes

Versions: 19

Compression:

Stored size: 559 Bytes

Contents

module Vpsb
  module Resources
    class ReadDoApiAccess < BaseResource
      include AskSupport

      res :read_do_api_access

      def call(core)
        if core.data[:do_client_id].nil? && core.data[:do_client_id].nil?
          ask { puts 'Visit https://cloud.digitalocean.com/api_access and generate API access key' }
        end
        core.data[:do_client_id] = ask_loop { puts 'Paste your client id: ' }
        core.data[:do_api_key]   = ask_loop { puts 'Paste your api key: ' }
      end

      def valid?
        true
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
vpsb-1.1.8 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.7 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.6 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.5 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.4 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.3 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.2 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.1 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.1.0 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.9 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.8 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.7 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.6 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.5 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.4 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.3 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.2 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.1 lib/vpsb/resources/read_do_api_access.rb
vpsb-1.0.0 lib/vpsb/resources/read_do_api_access.rb