class Place::StaffAPI
- Place::StaffAPI
- PlaceOS::Driver
- Reference
- Object
Defined in:
place/staff_api.crClass Method Summary
Instance Method Summary
- #approve(booking_id : String | Int64)
- #booking_check_in(booking_id : String | Int64, state : Bool = true, utm_source : String | Nil = nil)
- #booking_delete(booking_id : String | Int64, utm_source : String | Nil = nil)
- #booking_state(booking_id : String | Int64, state : String)
- #chat_members(session_id : String) : Array(String)
-
#create_booking(booking_type : String, asset_id : String, user_id : String, user_email : String, user_name : String, zones : Array(String), booking_start : Int64 | Nil = nil, booking_end : Int64 | Nil = nil, checked_in : Bool = false, approved : Bool | Nil = nil, title : String | Nil = nil, description : String | Nil = nil, time_zone : String | Nil = nil, extension_data : JSON::Any | Nil = nil, utm_source : String | Nil = nil, limit_override : Int64 | Nil = nil, event_id : String | Nil = nil, ical_uid : String | Nil = nil, attendees : Array(PlaceCalendar::Event::Attendee) | Nil = nil)
=================================== BOOKINGS ACTIONS ===================================
- #create_event(event : PlaceCalendar::Event)
- #create_user(body_json : String)
- #delete_event(system_id : String, event_id : String)
- #delete_user(id : String, force_removal : Bool = false) : Nil
- #get_booking(booking_id : String | Int64)
-
#get_event(event_id : String, system_id : String | Nil = nil, calendar : String | Nil = nil)
gets an event from either the
system_id
orcalendar
if only one is provided if both are provided, it gets the event fromcalendar
and the metadata fromsystem_id
NOTE:: the use ofcalendar
will typically not work from a driver unless the X-API-Key has read access to it. - #get_survey_invites(survey_id : Int64 | Nil = nil, sent : Bool | Nil = nil)
- #get_system(id : String, complete : Bool = false)
-
#guest_details(guest_id : String)
=================================== Guest details ===================================
- #kick_user(user_id : String, session_id : String, reason : String)
- #lookup_authority_id(retry : Int32 = 0)
- #merge_metadata(id : String, key : String, payload : JSON::Any, description : String = "")
-
#metadata(id : String, key : String | Nil = nil)
=================================== ZONE METADATA ===================================
- #metadata_children(id : String, key : String | Nil = nil)
- #on_update
- #patch_event_metadata(system_id : String, event_id : String, metadata : JSON::Any, ical_uid : String | Nil = nil, setup_time : Int64 | Nil = nil, breakdown_time : Int64 | Nil = nil, setup_event_id : String | Nil = nil, breakdown_event_id : String | Nil = nil)
- #push_event_status
-
#query_bookings(type : String | Nil = nil, period_start : Int64 | Nil = nil, period_end : Int64 | Nil = nil, zones : Array(String) = [] of String, user : String | Nil = nil, email : String | Nil = nil, state : String | Nil = nil, event_id : String | Nil = nil, ical_uid : String | Nil = nil, created_before : Int64 | Nil = nil, created_after : Int64 | Nil = nil, approved : Bool | Nil = nil, rejected : Bool | Nil = nil, checked_in : Bool | Nil = nil, include_checked_out : Bool | Nil = nil, extension_data : JSON::Any | Nil = nil)
=================================== BOOKINGS QUERY ===================================
-
#query_events(period_start : Int64, period_end : Int64, zones : Array(String) | Nil = nil, systems : Array(String) | Nil = nil, capacity : Int32 | Nil = nil, features : String | Nil = nil, bookable : Bool | Nil = nil, include_cancelled : Bool | Nil = nil)
=================================== CALENDAR EVENT ACTIONS (via staff api) ===================================
- #query_guests(period_start : Int64, period_end : Int64, zones : Array(String))
-
#query_metadata(period_start : Int64 | Nil = nil, period_end : Int64 | Nil = nil, field_name : String | Nil = nil, value : String | Nil = nil, system_id : String | Nil = nil, event_ref : Array(String) | Nil = nil)
Search for metadata that exists on events to obtain the event information.
- #query_users(q : String | Nil = nil, limit : Int32 = 20, offset : Int32 = 0, authority_id : String | Nil = nil, include_deleted : Bool = false)
- #reject(booking_id : String | Int64, utm_source : String | Nil = nil)
- #replace_event_metadata(system_id : String, event_id : String, metadata : JSON::Any, ical_uid : String | Nil = nil, setup_time : Int64 | Nil = nil, breakdown_time : Int64 | Nil = nil, setup_event_id : String | Nil = nil, breakdown_event_id : String | Nil = nil)
- #resource_token
- #revive_user(id : String) : Nil
- #signal(channel : String, payload : JSON::Any | Nil = nil)
-
#staff_details(email : String)
Staff details returns the information from AD
- #system_settings(id : String, key : String)
- #systems(q : String | Nil = nil, zone_id : String | Nil = nil, capacity : Int32 | Nil = nil, bookable : Bool | Nil = nil, features : String | Nil = nil, limit : Int32 = 1000, offset : Int32 = 0)
- #systems_in_building(zone_id : String, ids_only : Bool = true)
- #transfer_user(user_id : String, session_id : String, payload : JSON::Any)
- #update_booking(booking_id : String | Int64, booking_start : Int64 | Nil = nil, booking_end : Int64 | Nil = nil, asset_id : String | Nil = nil, title : String | Nil = nil, description : String | Nil = nil, timezone : String | Nil = nil, extension_data : JSON::Any | Nil = nil, approved : Bool | Nil = nil, checked_in : Bool | Nil = nil, limit_override : Int64 | Nil = nil)
-
#update_event(system_id : String, event : PlaceCalendar::Event)
NOTE : https://docs.google.com/document/d/1OaZljpjLVueFitmFWx8xy8BT8rA2lITyPsIvSYyNNW8/edit# The service account making this request needs delegated access and hence you can only edit events associated with a resource calendar
- #update_guest(id : String, body_json : String) : Nil
- #update_survey_invite(token : String, email : String | Nil = nil, sent : Bool | Nil = nil)
- #update_user(id : String, body_json : String) : Nil
-
#user(id : String)
=================================== User details ===================================
-
#user_resource_token
NOTE : this function requires "users" scope to be specified explicity for access
- #write_metadata(id : String, key : String, payload : JSON::Any, description : String = "")
-
#zone(zone_id : String)
=================================== ZONE INFORMATION ===================================
- #zones(q : String | Nil = nil, limit : Int32 = 1000, offset : Int32 = 0, parent : String | Nil = nil, tags : Array(String) | String | Nil = nil)
Class Method Detail
Instance Method Detail
gets an event from either the system_id
or calendar
if only one is provided
if both are provided, it gets the event from calendar
and the metadata from system_id
NOTE : the use of calendar
will typically not work from a driver unless the X-API-Key
has read access to it. From a driver perspective you should probably use a
dedicated Calendar driver with application access and the query_metadata function
below if metadata is required: query_metadata(system_id: "sys", event_ref: ["id", "uuid"])
Search for metadata that exists on events to obtain the event information.
For response details see EventMetadata__Assigner
in the OpenAPI docs
https://editor.swagger.io/?url=https://raw.githubusercontent.com/PlaceOS/staff-api/master/OPENAPI_DOC.yml
NOTE : https://docs.google.com/document/d/1OaZljpjLVueFitmFWx8xy8BT8rA2lITyPsIvSYyNNW8/edit# The service account making this request needs delegated access and hence you can only edit events associated with a resource calendar
NOTE : this function requires "users" scope to be specified explicity for access