Class: Spark::Team
Instance Attribute Summary collapse
-
#created ⇒ Object
Returns the value of attribute created.
-
#creatorId ⇒ Object
Returns the value of attribute creatorId.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Team
constructor
A new instance of Team.
Methods inherited from Base
#[], #delete, #refresh, #update
Constructor Details
#initialize(data) ⇒ Team
4 5 6 7 8 |
# File 'lib/team.rb', line 4 def initialize(data) @api_endpoint = 'teams' @update_fields = [:name] super end |
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created.
3 4 5 |
# File 'lib/team.rb', line 3 def created @created end |
#creatorId ⇒ Object
Returns the value of attribute creatorId.
3 4 5 |
# File 'lib/team.rb', line 3 def creatorId @creatorId end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/team.rb', line 3 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/team.rb', line 3 def name @name end |
Class Method Details
.Get(id) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/team.rb', line 10 def Get(id) res = Spark::rest('GET',"/teams/#{id}") if res.ok team = Spark::Team.new(JSON.parse(res.body)) return team end return nil end |