mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-02 13:29:41 +00:00
26 lines
538 B
Swift
26 lines
538 B
Swift
import Foundation
|
|
import Models
|
|
|
|
public enum Apps: Endpoint {
|
|
case registerApp
|
|
|
|
public func path() -> String {
|
|
switch self {
|
|
case .registerApp:
|
|
"apps"
|
|
}
|
|
}
|
|
|
|
public func queryItems() -> [URLQueryItem]? {
|
|
switch self {
|
|
case .registerApp:
|
|
return [
|
|
.init(name: "client_name", value: AppInfo.clientName),
|
|
.init(name: "redirect_uris", value: AppInfo.scheme),
|
|
.init(name: "scopes", value: AppInfo.scopes),
|
|
.init(name: "website", value: AppInfo.weblink),
|
|
]
|
|
}
|
|
}
|
|
}
|