Class: CiscoSpark::Room
Instance Attribute Summary collapse
-
#created ⇒ Object
Returns the value of attribute created.
-
#creatorId ⇒ Object
Returns the value of attribute creatorId.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#id ⇒ Object
Returns the value of attribute id.
-
#isLocked ⇒ Object
Returns the value of attribute isLocked.
-
#lastActivity ⇒ Object
Returns the value of attribute lastActivity.
-
#sipAddress ⇒ Object
Returns the value of attribute sipAddress.
-
#teamId ⇒ Object
Returns the value of attribute teamId.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Room
constructor
A new instance of Room.
Methods inherited from Base
#[], #delete, #refresh, #update
Constructor Details
#initialize(data) ⇒ Room
Returns a new instance of Room.
4 5 6 7 8 |
# File 'lib/room.rb', line 4 def initialize(data) @api_endpoint = 'rooms' @update_fields = [:title] super end |
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created.
3 4 5 |
# File 'lib/room.rb', line 3 def created @created end |
#creatorId ⇒ Object
Returns the value of attribute creatorId.
3 4 5 |
# File 'lib/room.rb', line 3 def creatorId @creatorId end |
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/room.rb', line 3 def errors @errors end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/room.rb', line 3 def id @id end |
#isLocked ⇒ Object
Returns the value of attribute isLocked.
3 4 5 |
# File 'lib/room.rb', line 3 def isLocked @isLocked end |
#lastActivity ⇒ Object
Returns the value of attribute lastActivity.
3 4 5 |
# File 'lib/room.rb', line 3 def lastActivity @lastActivity end |
#sipAddress ⇒ Object
Returns the value of attribute sipAddress.
3 4 5 |
# File 'lib/room.rb', line 3 def sipAddress @sipAddress end |
#teamId ⇒ Object
Returns the value of attribute teamId.
3 4 5 |
# File 'lib/room.rb', line 3 def teamId @teamId end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/room.rb', line 3 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/room.rb', line 3 def type @type end |
Class Method Details
.create(title, payload = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/room.rb', line 20 def create(title, payload = {}) payload[:title] = title res = CiscoSpark.rest('POST', '/rooms', payload: payload) if res.ok room = CiscoSpark::Room.new(JSON.parse(res.body)) return room end nil end |
.get(id) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/room.rb', line 11 def get(id) res = CiscoSpark.rest('GET', "/rooms/#{id}") if res.ok room = CiscoSpark::Room.new(JSON.parse(res.body)) return room end nil end |