jellyfin-sdk-swift/Sources/Paths/GetUsersAPI.swift

21 lines
698 B
Swift
Raw Normal View History

2022-08-08 20:21:06 +00:00
// Generated by Create API
// https://github.com/CreateAPI/CreateAPI
import Foundation
import Get
import URLQueryEncoder
extension Paths {
/// Gets a list of users.
static public func getUsers(isHidden: Bool? = nil, isDisabled: Bool? = nil) -> Request<[JellyfinAPI.UserDto]> {
Request(method: "GET", url: "/Users", query: makeGetUsersQuery(isHidden, isDisabled), id: "GetUsers")
}
private static func makeGetUsersQuery(_ isHidden: Bool?, _ isDisabled: Bool?) -> [(String, String?)] {
let encoder = URLQueryEncoder()
encoder.encode(isHidden, forKey: "isHidden")
encoder.encode(isDisabled, forKey: "isDisabled")
return encoder.items
}
}