mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-06 15:29:30 +00:00
21 lines
422 B
Swift
21 lines
422 B
Swift
import Foundation
|
|
|
|
public enum Notifications: Endpoint {
|
|
case notifications(maxId: String?)
|
|
|
|
public func path() -> String {
|
|
switch self {
|
|
case .notifications:
|
|
return "notifications"
|
|
}
|
|
}
|
|
|
|
public func queryItems() -> [URLQueryItem]? {
|
|
switch self {
|
|
case .notifications(let maxId):
|
|
guard let maxId else { return nil }
|
|
return [.init(name: "max_id", value: maxId)]
|
|
}
|
|
}
|
|
}
|