Class: OSDN::CLI::Command::Ping

Inherits:
Base
  • Object
show all
Defined in:
lib/osdn/cli.rb

Instance Attribute Summary

Attributes inherited from Base

#credential, #format, #logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#credential_path, #initialize, #load_credential, #load_variables, #set_client_token, #set_credential, #update_token, #update_variables, #write_credential, #write_variables

Constructor Details

This class inherits a constructor from OSDN::CLI::Command::Base

Class Method Details

.descriptionObject



208
209
210
# File 'lib/osdn/cli.rb', line 208

def self.description
  "Test API request."
end

Instance Method Details

#helpObject



204
205
206
# File 'lib/osdn/cli.rb', line 204

def help
  puts "#{$0} ping"
end

#runObject



198
199
200
201
202
# File 'lib/osdn/cli.rb', line 198

def run
  update_token
  api = OSDNClient::DefaultApi.new
  pp api.ping
end