mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-10 01:09:29 +00:00
9b3b3692ee
* Support for follow requests (#321) * Run SwiftFormat Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
23 lines
437 B
Swift
23 lines
437 B
Swift
import Foundation
|
|
|
|
public enum FollowRequests: Endpoint {
|
|
case list
|
|
case accept(id: String)
|
|
case reject(id: String)
|
|
|
|
public func path() -> String {
|
|
switch self {
|
|
case .list:
|
|
return "follow_requests"
|
|
case let .accept(id):
|
|
return "follow_requests/\(id)/authorize"
|
|
case let .reject(id):
|
|
return "follow_requests/\(id)/reject"
|
|
}
|
|
}
|
|
|
|
public func queryItems() -> [URLQueryItem]? {
|
|
nil
|
|
}
|
|
}
|