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



215
216
217
# File 'lib/osdn/cli.rb', line 215

def self.description
  "Test API request."
end

Instance Method Details

#helpObject



211
212
213
# File 'lib/osdn/cli.rb', line 211

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

#runObject



205
206
207
208
209
# File 'lib/osdn/cli.rb', line 205

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