mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-26 22:07:12 +00:00
Removed whitespace
This commit is contained in:
1 parent
3dc871a0fb
commit
00509c120b
2 files changed
+16
-19
No files matched your search
@@ -246,14 +246,12 @@ class CheckInController : NSObject {
|
||||
private func eventName() -> String! { return stringFromEvent(forKey: EventKeys.Name) }
|
||||
private func eventStartDate() -> Double! { return doubleFromEvent(forKey: EventKeys.StartDate) }
|
||||
private func eventEndDate() -> Double! { return doubleFromEvent(forKey: EventKeys.EndDate) }
|
||||
|
||||
private func doubleFromEvent(forKey key: String) -> Double { return doubleFromDictionary(eventDictionary, forKey: key) }
|
||||
private func stringFromEvent(forKey key: String) -> String { return stringFromDictionary(eventDictionary, forKey: key) }
|
||||
|
||||
// MARK: - Leaderboard
|
||||
|
||||
private func leaderboardName() -> String! { return stringFromLeaderboard(forKey: LeaderboardKeys.Name) }
|
||||
|
||||
private func stringFromLeaderboard(forKey key: String) -> String { return stringFromDictionary(leaderboardDictionary, forKey: key) }
|
||||
|
||||
// MARK: - Competitor
|
||||
@@ -264,7 +262,6 @@ class CheckInController : NSObject {
|
||||
private func competitorName() -> String! { return stringFromCompetitor(forKey: CompetitorKeys.Name) }
|
||||
private func competitorNationality() -> String! { return stringFromCompetitor(forKey: CompetitorKeys.Nationality) }
|
||||
private func competitorSailID() -> String! { return stringFromCompetitor(forKey: CompetitorKeys.SailID) }
|
||||
|
||||
private func stringFromCompetitor(forKey key: String) -> String { return stringFromDictionary(competitorDictionary, forKey: key) }
|
||||
|
||||
// MARK: - Helper
|
||||
|
||||
@@ -132,6 +132,22 @@ class RequestManager: NSObject {
|
||||
manager.POST(urlString, parameters: body, success: success, failure: failure)
|
||||
}
|
||||
|
||||
func postCheckOut(leaderboardName: String!,
|
||||
competitorId: String!,
|
||||
success:(AFHTTPRequestOperation!, AnyObject!) -> Void,
|
||||
failure: (AFHTTPRequestOperation!, AnyObject!) -> Void)
|
||||
{
|
||||
// Setup body
|
||||
var body = [String: AnyObject]()
|
||||
body[BodyKeys.CompetitorID] = competitorId
|
||||
body[BodyKeys.DeviceUUID] = Preferences.uuid
|
||||
body[BodyKeys.ToMillis] = millisSince1970()
|
||||
|
||||
// Post body
|
||||
let urlString = "\(basePathString)/leaderboards/\(leaderboardName.stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet())!)/device_mappings/end"
|
||||
manager.POST(urlString, parameters: body, success: success, failure: failure)
|
||||
}
|
||||
|
||||
func postGPSFixes(gpsFixes: [GPSFix]!,
|
||||
success: (AFHTTPRequestOperation!, AnyObject!) -> Void,
|
||||
failure: (AFHTTPRequestOperation!, AnyObject!) -> Void)
|
||||
@@ -155,22 +171,6 @@ class RequestManager: NSObject {
|
||||
manager.POST(urlString, parameters: body, success: success, failure: failure)
|
||||
}
|
||||
|
||||
func postCheckOut(leaderboardName: String!,
|
||||
competitorId: String!,
|
||||
success:(AFHTTPRequestOperation!, AnyObject!) -> Void,
|
||||
failure: (AFHTTPRequestOperation!, AnyObject!) -> Void)
|
||||
{
|
||||
// Setup body
|
||||
var body = [String: AnyObject]()
|
||||
body[BodyKeys.CompetitorID] = competitorId
|
||||
body[BodyKeys.DeviceUUID] = Preferences.uuid
|
||||
body[BodyKeys.ToMillis] = millisSince1970()
|
||||
|
||||
// Post body
|
||||
let urlString = "\(basePathString)/leaderboards/\(leaderboardName.stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet())!)/device_mappings/end"
|
||||
manager.POST(urlString, parameters: body, success: success, failure: failure)
|
||||
}
|
||||
|
||||
func postTeamImageData(imageData: NSData!,
|
||||
competitorId: String!,
|
||||
success: (AnyObject!) -> Void,
|
||||
|
||||
Reference in new issue
Block a user