mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-05-13 18:12:43 +00:00
26 lines
545 B
Swift
26 lines
545 B
Swift
import Foundation
|
|
import Models
|
|
|
|
public enum Apps: Endpoint {
|
|
case registerApp
|
|
|
|
public func path() -> String {
|
|
switch self {
|
|
case .registerApp:
|
|
return "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),
|
|
]
|
|
}
|
|
}
|
|
}
|