Class: Chimps::Commands::Me

Inherits:
Chimps::Command show all
Includes:
Utils::HttpFormat
Defined in:
lib/chimps-cli/commands/me.rb

Constant Summary collapse

USAGE =
"usage: chimps me [OPTIONS]"
HELP =
<<EOF

Show a summary of your account.

Examples:

  $ chimps me
  $ chimps me --response_format=json
EOF

Instance Attribute Summary

Attributes inherited from Chimps::Command

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils::HttpFormat

#headers, included, #normalize_fmt

Methods inherited from Chimps::Command

#initialize, name, #name

Constructor Details

This class inherits a constructor from Chimps::Command

Class Method Details

.default_response_fmtObject



8
9
10
# File 'lib/chimps-cli/commands/me.rb', line 8

def self.default_response_fmt
  'yaml'
end

Instance Method Details

#execute!Object



23
24
25
# File 'lib/chimps-cli/commands/me.rb', line 23

def execute!
  Chimps::Request.new("/me" + ".#{response_fmt}", :sign => true).get.print
end