Class: IdonethisCli::Client::Team
- Inherits:
-
Object
- Object
- IdonethisCli::Client::Team
- Defined in:
- lib/idonethis_cli/client/team.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token) ⇒ Team
constructor
A new instance of Team.
- #list ⇒ Object
Constructor Details
#initialize(token) ⇒ Team
Returns a new instance of Team.
6 7 8 |
# File 'lib/idonethis_cli/client/team.rb', line 6 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
4 5 6 |
# File 'lib/idonethis_cli/client/team.rb', line 4 def token @token end |
Instance Method Details
#list ⇒ Object
10 11 12 13 |
# File 'lib/idonethis_cli/client/team.rb', line 10 def list response = token.get(API_PATH + '/teams') teams = JSON.parse(response.body) end |