Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
Classification patch
Browse files Browse the repository at this point in the history
  • Loading branch information
tiferrei committed Mar 1, 2018
1 parent eb74c3b commit 6f3e2c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "nerdishbynature/RequestKit" "1e587aa550de5d3903e7ef6e9364f9f8f797a150"
github "nerdishbynature/RequestKit" "3f1fc824325bf974976bcb4bea2ddaf7bd94d7b6"
7 changes: 6 additions & 1 deletion UCLKit/RoomBookings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ public enum Classification: String, Codable {
case Classroom = "CR"
case PublicCluster = "PC1"
case SocialSpace = "SS"
case TheatreHall = "TH"
case UndocumentedCFE = "CFE" // FIXME: Undocumented option CFE (UCLAPI #326)
case UndocumentedMR = "MR" // FIXME: Undocumented option MR (UCLAPI #326)
case UndocumentedER = "ER" // FIXME: Undocumented option ER (UCLAPI #326)
case UndocumentedCF = "CF" // FIXME: Undocumented option CF (UCLAPI #326)
case Unknown = ""
}

Expand Down Expand Up @@ -259,7 +264,7 @@ enum RoomBookingsRouter: Router {
var params: [String: Any] {
switch self {
case .readRooms(_, let roomID, let roomName, let siteID, let siteName, let classification, let capacity):
return ["roomid": roomID, "roomname": roomName, "siteid": siteID, "sitename": siteName, "classification": classification, "capacity": capacity]
return ["roomid": roomID, "roomname": roomName, "siteid": siteID, "sitename": siteName, "classification": classification.rawValue, "capacity": capacity]
case .readBookings(_, let pageToken, let roomName, let roomID, let startDateTime, let endDateTime, let date, let siteID, let description, let contact, let resultsPerPage):
return ["page_token": pageToken, "roomname": roomName, "roomid": roomID, "start_datetime": startDateTime, "end_datetime": endDateTime, "date": date, "siteid": siteID, "description": description, "contact": contact, "results_per_page": resultsPerPage]
case .readEquipment(_, let roomID, let siteID):
Expand Down

0 comments on commit 6f3e2c6

Please sign in to comment.