IceCubesApp/Packages/Network/Sources/Network/Endpoint/Tags.swift
Thomas Ricouard 7f6419ebae Swiftformat
2023-01-17 11:36:01 +01:00

26 lines
468 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):
return "tags/\(id)/"
case let .follow(id):
return "tags/\(id)/follow"
case let .unfollow(id):
return "tags/\(id)/unfollow"
}
}
public func queryItems() -> [URLQueryItem]? {
switch self {
default:
return nil
}
}
}