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

import Foundation
import Get
import URLQueryEncoder

extension Paths.V2.External {
    public var clipsV2: ClipsV2 {
        ClipsV2(path: path + "/clips-v2")
    }

    public struct ClipsV2 {
        /// Path: `/api/v2/external/clips-v2`
        public let path: String

        /// Get Clips External Auth
        ///
        /// Retrieve clips by IDs using external authentication.
        public func get(page: Int? = nil, ids: String? = nil) -> Request<[GenAPI.ExternalClipSchema]> {
            Request(path: path, method: "GET", query: makeGetQuery(page, ids), id: "studio_api_bots_external_api_get_clips_external_auth")
        }

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