mirror of
https://github.com/jellyfin/jellyfin-sdk-swift.git
synced 2024-11-23 14:20:08 +00:00
21 lines
698 B
Swift
21 lines
698 B
Swift
|
// 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
|
||
|
}
|
||
|
}
|