mirror of
https://github.com/LukeHagar/plexswift.git
synced 2025-12-06 04:20:52 +00:00
39 lines
1.2 KiB
Swift
39 lines
1.2 KiB
Swift
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
import Foundation
|
|
|
|
/// Describes common parameters which can be used when making API requests.
|
|
///
|
|
/// > Note: These parameters may be overridden by individual API operations
|
|
public struct GlobalParameters {
|
|
public let xPlexClientIdentifier: String?
|
|
|
|
/// Creates an object with the given parameters
|
|
///
|
|
/// - Parameter xPlexClientIdentifier: The unique identifier for the client application
|
|
/// This is used to track the client application and its usage
|
|
/// (UUID, serial number, or other number unique per device)
|
|
///
|
|
///
|
|
public init(
|
|
xPlexClientIdentifier: String? = nil
|
|
) {
|
|
self.xPlexClientIdentifier = xPlexClientIdentifier
|
|
}
|
|
}
|
|
|
|
extension GlobalParameters: ParameterDefaults {
|
|
public func defaultSerializedPathParameter(for key: String) throws -> String? {
|
|
switch key {
|
|
default: return nil
|
|
}
|
|
}
|
|
|
|
public func defaultQueryParameter(for key: String) -> AnyValue? {
|
|
switch key {
|
|
case "X-Plex-Client-Identifier": return xPlexClientIdentifier.map { AnyValue($0) }
|
|
default: return nil
|
|
}
|
|
}
|
|
}
|