// Generated by Create API
// https://github.com/CreateAPI/CreateAPI

import Foundation
import Get
import URLQueryEncoder

extension Paths {
    public static var myradio: Myradio {
        Myradio(path: "/api/myradio")
    }

    public struct Myradio {
        /// Path: `/api/myradio`
        public let path: String

        /// Get Radio Stations
        public func get(stationType: StationType? = nil) -> Request<GenAPI.RadioStationResponse> {
            Request(path: path, method: "GET", query: makeGetQuery(stationType), id: "studio_api_radio_api_get_radio_stations")
        }

        private func makeGetQuery(_ stationType: StationType?) -> [(String, String?)] {
            let encoder = URLQueryEncoder()
            encoder.encode(stationType, forKey: "station_type")
            return encoder.items
        }

        public struct StationType: RawRepresentable, Codable, Equatable {
            public let rawValue: String

            public init(rawValue: String) {
                self.rawValue = rawValue
            }

            public static let platform = Self(rawValue: "platform")
            public static let user = Self(rawValue: "user")
            public static let liked = Self(rawValue: "liked")
            public static let all = Self(rawValue: "all")
        }
    }
}
