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

import Foundation
import Get
import URLQueryEncoder

extension Paths.Songify.Beta {
    public var getVideos: GetVideos {
        GetVideos(path: path + "/get-videos")
    }

    public struct GetVideos {
        /// Path: `/api/songify/beta/get-videos`
        public let path: String

        /// Get Songify Videos
        public func get(order: Order, cursor: String? = nil) -> Request<Void> {
            Request(path: path, method: "GET", query: makeGetQuery(order, cursor), id: "studio_api_songify_api_get_songify_videos")
        }

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

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

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

            public static let newest = Self(rawValue: "newest")
            public static let oldest = Self(rawValue: "oldest")
        }
    }
}
