-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Auto reload schedule in today view * Move order of setup remote config up * Readd deleted getSchedule code during merge * Add reload interval values to remote config * Reformat code * Fixed bug of schedule failing to update itself * Clean up warnings * fixed #93 * Fixed #92; Period 8 incorrectly show on holidays
- Loading branch information
Showing
18 changed files
with
196 additions
and
107 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,12 @@ extension Endpoint { | |
request.httpBody = requestBody.percentEncoded() | ||
} | ||
} | ||
let userAgent = AppVersionStatus.appDisplayName | ||
+ "/" | ||
+ AppVersionStatus.currentVersion! | ||
+ " " | ||
+ "Developer email/[email protected]" | ||
request.setValue(userAgent, forHTTPHeaderField: "User-Agent") | ||
request.setValue("br;q=1.0, gzip;q=0.9, deflate;q=0.8", forHTTPHeaderField: "Accept-Encoding") | ||
if isApplicationJson { | ||
request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type") | ||
|
@@ -62,6 +68,9 @@ extension Endpoint { | |
static let AERIES_API_LOGIN_PATH = "/parent/LoginParent.aspx" | ||
static let AERIES_API_ALT_GRADES_PATH = "/Parent/Widgets/ClassSummary/GetClassSummary" | ||
|
||
static let APPSERV_API_HOST = "appserv.u360mobile.com" | ||
static let APPSERV_API_SCHEDULE_PATH = "/354/calendarfeed.php" | ||
|
||
static func studentLogin(email: String, | ||
password: String, | ||
debugMode: Bool = false) -> Endpoint { | ||
|
@@ -148,5 +157,20 @@ extension Endpoint { | |
value: formatter.serverTimeFormat(date))], | ||
httpMethod: "GET") | ||
} | ||
|
||
static func getSchedule(date: Date) -> Endpoint { | ||
let formatter = DateFormatter() | ||
return Endpoint(host: APPSERV_API_HOST, | ||
path: APPSERV_API_SCHEDULE_PATH, | ||
queryItems: [.init(name: "i", value: "santamargaritahs"), | ||
.init(name: "pageSize", value: "25"), | ||
.init(name: "pageNumber", value: "1"), | ||
.init(name: "dateStart", value: formatter.yearMonthDayFormat(date)), | ||
.init(name: "categoryId", value: "0"), | ||
.init(name: "tz", value: "America%2FLos_Angeles"), | ||
.init(name: "mid", value: "1422"), | ||
.init(name: "smid", value: "46492")], | ||
httpMethod: "GET") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.