class UCLAPI::Client::Roombookings
Public Class Methods
new(client)
click to toggle source
# File lib/uclapi/client/roombookings.rb, line 2 def initialize client @client = client end
Public Instance Methods
bookings(params = {})
click to toggle source
# File lib/uclapi/client/roombookings.rb, line 13 def bookings(params = {}) result = @client.get('/roombookings/bookings', params) result['bookings'].map do |booking| booking[:client] = @client booking[:page_token] = result['page_token'] UCLAPI::Booking.new(booking) end end
equipment(params = {})
click to toggle source
# File lib/uclapi/client/roombookings.rb, line 22 def equipment(params = {}) @client.get('/roombookings/equipment', params)['equipment'].map do |equipment| equipment[:client] = @client UCLAPI::Equipment.new(equipment) end end
rooms(params = {})
click to toggle source
# File lib/uclapi/client/roombookings.rb, line 6 def rooms(params = {}) @client.get('/roombookings/rooms', params)['rooms'].map do |room| room[:client] = @client UCLAPI::Room.new(room) end end