IceCubesApp/Packages/Network/Sources/Network/Endpoint/Notifications.swift
2022-12-19 12:28:55 +01:00

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)]
}
}
}