Skip to content

Commit 69fd420

Browse files
committed
fixes, add being able to manage non-brew installation
1 parent 7377d28 commit 69fd420

14 files changed

Lines changed: 3087 additions & 2859 deletions

APIClient.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,26 @@ class APIClient {
339339
let apiCall = ["push_settings": pushSettings]
340340
makeAPICall(apiCall, completion: completion)
341341
}
342+
343+
// MARK: - Authorization Operations
344+
345+
func checkAuthStatus(completion: @escaping (Result<[String: Any], APIError>) -> Void) {
346+
let apiCall: [String: Any] = ["authorize": [String: Any]()]
347+
makeAPICall(apiCall, completion: completion)
348+
}
349+
350+
func createAccount(
351+
username: String, password: String,
352+
completion: @escaping (Result<[String: Any], APIError>) -> Void
353+
) {
354+
let apiCall: [String: Any] = [
355+
"authorize": [
356+
"new_username": username,
357+
"new_password": password,
358+
]
359+
]
360+
makeAPICall(apiCall, completion: completion)
361+
}
342362
}
343363

344364
// MARK: - Error Types

0 commit comments

Comments
 (0)