IceCubesApp/Packages/Network/Sources/Network/Endpoint/Tags.swift
Thomas Ricouard 8a3c971402 Swiftformat
2023-09-16 14:15:03 +02:00

26 lines
440 B
Swift

import Foundation
public enum Tags: Endpoint {
case tag(id: String)
case follow(id: String)
case unfollow(id: String)
public func path() -> String {
switch self {
case let .tag(id):
"tags/\(id)/"
case let .follow(id):
"tags/\(id)/follow"
case let .unfollow(id):
"tags/\(id)/unfollow"
}
}
public func queryItems() -> [URLQueryItem]? {
switch self {
default:
nil
}
}
}