diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..2bb1ac26 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[alias] +get-member = "run -p iracing-data-api-client --example get_member --" diff --git a/.gitignore b/.gitignore index 9e4a7085..17e60948 100644 --- a/.gitignore +++ b/.gitignore @@ -136,3 +136,18 @@ packages/cli/bin/*.json # SEA build directories build/ + +# Generated by Cargo +# will have compiled files and executables +/debug +/target + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +# Generated by cargo mutants +# Contains mutation testing data +**/mutants.out*/ diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..c4d2f725 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1956 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cc" +version = "1.2.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "clap" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.0", + "serde", + "serde_core", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iracing-data-api-client" +version = "0.0.1" +dependencies = [ + "clap", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "tokio", + "url", +] + +[[package]] +name = "iri-string" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +dependencies = [ + "cfg-if", + "futures-util", + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.185" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mio" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "openssl" +version = "0.10.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "openssl-sys" +version = "0.9.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "native-tls", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.52.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +dependencies = [ + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "yoke" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..e73babf8 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,17 @@ +[workspace] +members = ["crates/iracing-data-api-client"] +resolver = "2" + +[workspace.lints.rust] +rust_2018_idioms = "warn" +unused_qualifications = "warn" + +[workspace.lints.clippy] +all = "warn" +dbg_macro = "warn" +todo = "warn" + +# The profile that 'dist' will build with +[profile.dist] +inherits = "release" +lto = "thin" diff --git a/README.md b/README.md index ac766178..8a906a7b 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ A monorepo of TypeScript packages for working with the iRacing `/data` API and t - [@iracing-data/sync-car-assets-cli](apps/sync-car-assets-cli/README.md) – Download car assets via CLI. - [@iracing-data/sync-track-assets-cli](apps/sync-track-assets-cli/README.md) – Download track assets via CLI. +## Rust +- [iracing-data-api-client](crates/iracing-data-api-client/README.md) – Generated Rust client for the iRacing `/data` API. Use `cargo get-member --access-token "$IRACING_ACCESS_TOKEN" --customer-ids 378767 --include-licenses` to run the member lookup example. + ## Development This repo uses [pnpm](https://pnpm.io/) for dependency management: diff --git a/crates/iracing-data-api-client/.openapi-generator-ignore b/crates/iracing-data-api-client/.openapi-generator-ignore new file mode 100644 index 00000000..22830f0e --- /dev/null +++ b/crates/iracing-data-api-client/.openapi-generator-ignore @@ -0,0 +1,3 @@ +Cargo.toml +.gitignore +.travis.yml diff --git a/crates/iracing-data-api-client/.openapi-generator/FILES b/crates/iracing-data-api-client/.openapi-generator/FILES new file mode 100644 index 00000000..94c1b08a --- /dev/null +++ b/crates/iracing-data-api-client/.openapi-generator/FILES @@ -0,0 +1,56 @@ +README.md +docs/AuthApi.md +docs/CarApi.md +docs/CarclassApi.md +docs/ConstantsApi.md +docs/DocApi.md +docs/DriverStatsApi.md +docs/ErrorResponse.md +docs/HostedApi.md +docs/IracingApiResponse.md +docs/IracingCategory.md +docs/IracingDivision.md +docs/IracingEventType.md +docs/IracingServiceMethodDocs.md +docs/IracingServiceMethodParametersDocs.md +docs/LeagueApi.md +docs/LookupApi.md +docs/MemberApi.md +docs/PostAuthRequest.md +docs/ResultsApi.md +docs/SeasonApi.md +docs/SeriesApi.md +docs/StatsApi.md +docs/TeamApi.md +docs/TimeAttackApi.md +docs/TrackApi.md +git_push.sh +src/apis/auth_api.rs +src/apis/car_api.rs +src/apis/carclass_api.rs +src/apis/configuration.rs +src/apis/constants_api.rs +src/apis/doc_api.rs +src/apis/driver_stats_api.rs +src/apis/hosted_api.rs +src/apis/league_api.rs +src/apis/lookup_api.rs +src/apis/member_api.rs +src/apis/mod.rs +src/apis/results_api.rs +src/apis/season_api.rs +src/apis/series_api.rs +src/apis/stats_api.rs +src/apis/team_api.rs +src/apis/time_attack_api.rs +src/apis/track_api.rs +src/lib.rs +src/models/error_response.rs +src/models/iracing_api_response.rs +src/models/iracing_category.rs +src/models/iracing_division.rs +src/models/iracing_event_type.rs +src/models/iracing_service_method_docs.rs +src/models/iracing_service_method_parameters_docs.rs +src/models/mod.rs +src/models/post_auth_request.rs diff --git a/crates/iracing-data-api-client/.openapi-generator/VERSION b/crates/iracing-data-api-client/.openapi-generator/VERSION new file mode 100644 index 00000000..6328c542 --- /dev/null +++ b/crates/iracing-data-api-client/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.17.0 diff --git a/crates/iracing-data-api-client/Cargo.toml b/crates/iracing-data-api-client/Cargo.toml new file mode 100644 index 00000000..3e76de80 --- /dev/null +++ b/crates/iracing-data-api-client/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "iracing-data-api-client" +version = "0.0.1" +authors = ["OpenAPI Generator team and contributors"] +description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" +# Override this license by providing a License Object in the OpenAPI. +license = "Unlicense" +edition = "2021" +repository = "https://github.com/racedirector/iracing-data-api" + +[dependencies] +serde = { version = "^1.0", features = ["derive"] } +serde_json = "^1.0" +serde_repr = "^0.1" +url = "^2.5" +reqwest = { version = "^0.12", default-features = false, features = ["json"] } + +[dev-dependencies] +clap = { version = "^4.5", features = ["derive"] } +tokio = { version = "^1.37", features = ["macros", "rt-multi-thread"] } + +[features] +default = [] +native-tls = ["reqwest/native-tls"] +rustls-tls = ["reqwest/rustls-tls"] + +[lints] +workspace = true + +[package.metadata.dist] +dist = true diff --git a/crates/iracing-data-api-client/README.md b/crates/iracing-data-api-client/README.md new file mode 100644 index 00000000..a1610be5 --- /dev/null +++ b/crates/iracing-data-api-client/README.md @@ -0,0 +1,203 @@ +# Rust API client for iracing-data-api-client + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + +## Overview + +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 0.0.1 +- Package version: 0.0.1 +- Generator version: 7.17.0 +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` + +## Installation + +Put the package under your project folder in a directory named `iracing-data-api-client` and add the following to `Cargo.toml` under `[dependencies]`: + +``` +iracing-data-api-client = { path = "./iracing-data-api-client" } +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://members-ng.iracing.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthApi* | [**post_auth**](docs/AuthApi.md#post_auth) | **POST** /auth | +*CarApi* | [**get_car**](docs/CarApi.md#get_car) | **GET** /data/car/get | +*CarApi* | [**get_car_assets**](docs/CarApi.md#get_car_assets) | **GET** /data/car/assets | +*CarclassApi* | [**get_car_class**](docs/CarclassApi.md#get_car_class) | **GET** /data/carclass/get | Gets car classes. +*ConstantsApi* | [**get_constants_categories**](docs/ConstantsApi.md#get_constants_categories) | **GET** /data/constants/categories | +*ConstantsApi* | [**get_constants_divisions**](docs/ConstantsApi.md#get_constants_divisions) | **GET** /data/constants/divisions | +*ConstantsApi* | [**get_constants_event_types**](docs/ConstantsApi.md#get_constants_event_types) | **GET** /data/constants/event_types | +*DocApi* | [**get_car_assets_docs**](docs/DocApi.md#get_car_assets_docs) | **GET** /data/doc/car/assets | +*DocApi* | [**get_car_class_docs**](docs/DocApi.md#get_car_class_docs) | **GET** /data/doc/carclass | +*DocApi* | [**get_car_class_get_docs**](docs/DocApi.md#get_car_class_get_docs) | **GET** /data/doc/carclass/get | +*DocApi* | [**get_car_docs**](docs/DocApi.md#get_car_docs) | **GET** /data/doc/car | +*DocApi* | [**get_car_get_docs**](docs/DocApi.md#get_car_get_docs) | **GET** /data/doc/car/get | +*DocApi* | [**get_constants_categories_docs**](docs/DocApi.md#get_constants_categories_docs) | **GET** /data/doc/constants/categories | +*DocApi* | [**get_constants_divisions_docs**](docs/DocApi.md#get_constants_divisions_docs) | **GET** /data/doc/constants/divisions | +*DocApi* | [**get_constants_docs**](docs/DocApi.md#get_constants_docs) | **GET** /data/doc/constants | +*DocApi* | [**get_constants_event_types_docs**](docs/DocApi.md#get_constants_event_types_docs) | **GET** /data/doc/constants/event_types | +*DocApi* | [**get_docs**](docs/DocApi.md#get_docs) | **GET** /data/doc | +*DocApi* | [**get_driver_stats_by_category_category_docs**](docs/DocApi.md#get_driver_stats_by_category_category_docs) | **GET** /data/doc/driver_stats_by_category/{category} | +*DocApi* | [**get_driver_stats_by_category_docs**](docs/DocApi.md#get_driver_stats_by_category_docs) | **GET** /data/doc/driver_stats_by_category | +*DocApi* | [**get_hosted_combined_sessions_docs**](docs/DocApi.md#get_hosted_combined_sessions_docs) | **GET** /data/doc/hosted/combined_sessions | +*DocApi* | [**get_hosted_docs**](docs/DocApi.md#get_hosted_docs) | **GET** /data/doc/hosted | +*DocApi* | [**get_hosted_sessions_docs**](docs/DocApi.md#get_hosted_sessions_docs) | **GET** /data/doc/hosted/sessions | +*DocApi* | [**get_league_customer_league_sessions_docs**](docs/DocApi.md#get_league_customer_league_sessions_docs) | **GET** /data/doc/league/cust_league_sessions | +*DocApi* | [**get_league_directory_docs**](docs/DocApi.md#get_league_directory_docs) | **GET** /data/doc/league/directory | +*DocApi* | [**get_league_docs**](docs/DocApi.md#get_league_docs) | **GET** /data/doc/league | +*DocApi* | [**get_league_get_docs**](docs/DocApi.md#get_league_get_docs) | **GET** /data/doc/league/get | +*DocApi* | [**get_league_get_points_systems_docs**](docs/DocApi.md#get_league_get_points_systems_docs) | **GET** /data/doc/league/get_points_systems | +*DocApi* | [**get_league_membership_docs**](docs/DocApi.md#get_league_membership_docs) | **GET** /data/doc/league/membership | +*DocApi* | [**get_league_roster_docs**](docs/DocApi.md#get_league_roster_docs) | **GET** /data/doc/league/roster | +*DocApi* | [**get_league_season_sessions_docs**](docs/DocApi.md#get_league_season_sessions_docs) | **GET** /data/doc/league/season_sessions | +*DocApi* | [**get_league_season_standings_docs**](docs/DocApi.md#get_league_season_standings_docs) | **GET** /data/doc/league/season_standings | +*DocApi* | [**get_league_seasons_docs**](docs/DocApi.md#get_league_seasons_docs) | **GET** /data/doc/league/seasons | +*DocApi* | [**get_lookup_countries_docs**](docs/DocApi.md#get_lookup_countries_docs) | **GET** /data/doc/lookup/countries | +*DocApi* | [**get_lookup_docs**](docs/DocApi.md#get_lookup_docs) | **GET** /data/doc/lookup | +*DocApi* | [**get_lookup_drivers_docs**](docs/DocApi.md#get_lookup_drivers_docs) | **GET** /data/doc/lookup/drivers | +*DocApi* | [**get_lookup_flairs_docs**](docs/DocApi.md#get_lookup_flairs_docs) | **GET** /data/doc/lookup/flairs | +*DocApi* | [**get_lookup_get_docs**](docs/DocApi.md#get_lookup_get_docs) | **GET** /data/doc/lookup/get | +*DocApi* | [**get_lookup_licenses_docs**](docs/DocApi.md#get_lookup_licenses_docs) | **GET** /data/doc/lookup/licenses | +*DocApi* | [**get_member_award_instances_docs**](docs/DocApi.md#get_member_award_instances_docs) | **GET** /data/doc/member/award_instances | +*DocApi* | [**get_member_awards_docs**](docs/DocApi.md#get_member_awards_docs) | **GET** /data/doc/member/awards | +*DocApi* | [**get_member_chart_data_docs**](docs/DocApi.md#get_member_chart_data_docs) | **GET** /data/doc/member/chart_data | +*DocApi* | [**get_member_docs**](docs/DocApi.md#get_member_docs) | **GET** /data/doc/member | +*DocApi* | [**get_member_get_docs**](docs/DocApi.md#get_member_get_docs) | **GET** /data/doc/member/get | +*DocApi* | [**get_member_info_docs**](docs/DocApi.md#get_member_info_docs) | **GET** /data/doc/member/info | +*DocApi* | [**get_member_participation_credits_docs**](docs/DocApi.md#get_member_participation_credits_docs) | **GET** /data/doc/member/participation_credits | +*DocApi* | [**get_member_profile_docs**](docs/DocApi.md#get_member_profile_docs) | **GET** /data/doc/member/profile | +*DocApi* | [**get_results_docs**](docs/DocApi.md#get_results_docs) | **GET** /data/doc/results | +*DocApi* | [**get_results_event_log_docs**](docs/DocApi.md#get_results_event_log_docs) | **GET** /data/doc/results/event_log | +*DocApi* | [**get_results_get_docs**](docs/DocApi.md#get_results_get_docs) | **GET** /data/doc/results/get | +*DocApi* | [**get_results_lap_chart_data_docs**](docs/DocApi.md#get_results_lap_chart_data_docs) | **GET** /data/doc/results/lap_chart_data | +*DocApi* | [**get_results_lap_data_docs**](docs/DocApi.md#get_results_lap_data_docs) | **GET** /data/doc/results/lap_data | +*DocApi* | [**get_results_search_hosted_docs**](docs/DocApi.md#get_results_search_hosted_docs) | **GET** /data/doc/results/search_hosted | +*DocApi* | [**get_results_search_series_docs**](docs/DocApi.md#get_results_search_series_docs) | **GET** /data/doc/results/search_series | +*DocApi* | [**get_results_season_results_docs**](docs/DocApi.md#get_results_season_results_docs) | **GET** /data/doc/results/season_results | +*DocApi* | [**get_season_docs**](docs/DocApi.md#get_season_docs) | **GET** /data/doc/season | +*DocApi* | [**get_season_list_docs**](docs/DocApi.md#get_season_list_docs) | **GET** /data/doc/season/list | +*DocApi* | [**get_season_race_guide_docs**](docs/DocApi.md#get_season_race_guide_docs) | **GET** /data/doc/season/race_guide | +*DocApi* | [**get_season_spectator_subsession_ids_detail_docs**](docs/DocApi.md#get_season_spectator_subsession_ids_detail_docs) | **GET** /data/doc/season/spectator_subsessionids_detail | +*DocApi* | [**get_season_spectator_subsession_ids_docs**](docs/DocApi.md#get_season_spectator_subsession_ids_docs) | **GET** /data/doc/season/spectator_subsessionids | +*DocApi* | [**get_series_assets_docs**](docs/DocApi.md#get_series_assets_docs) | **GET** /data/doc/series/assets | +*DocApi* | [**get_series_docs**](docs/DocApi.md#get_series_docs) | **GET** /data/doc/series | +*DocApi* | [**get_series_get_docs**](docs/DocApi.md#get_series_get_docs) | **GET** /data/doc/series/get | +*DocApi* | [**get_series_past_seasons_docs**](docs/DocApi.md#get_series_past_seasons_docs) | **GET** /data/doc/series/past_seasons | +*DocApi* | [**get_series_season_list_docs**](docs/DocApi.md#get_series_season_list_docs) | **GET** /data/doc/series/season_list | +*DocApi* | [**get_series_season_schedule_docs**](docs/DocApi.md#get_series_season_schedule_docs) | **GET** /data/doc/series/season_schedule | +*DocApi* | [**get_series_seasons_docs**](docs/DocApi.md#get_series_seasons_docs) | **GET** /data/doc/series/seasons | +*DocApi* | [**get_series_stats_series_docs**](docs/DocApi.md#get_series_stats_series_docs) | **GET** /data/doc/series/stats_series | +*DocApi* | [**get_stats_docs**](docs/DocApi.md#get_stats_docs) | **GET** /data/doc/stats | +*DocApi* | [**get_stats_member_bests_docs**](docs/DocApi.md#get_stats_member_bests_docs) | **GET** /data/doc/stats/member_bests | +*DocApi* | [**get_stats_member_career_docs**](docs/DocApi.md#get_stats_member_career_docs) | **GET** /data/doc/stats/member_career | +*DocApi* | [**get_stats_member_division_docs**](docs/DocApi.md#get_stats_member_division_docs) | **GET** /data/doc/stats/member_division | +*DocApi* | [**get_stats_member_recap_docs**](docs/DocApi.md#get_stats_member_recap_docs) | **GET** /data/doc/stats/member_recap | +*DocApi* | [**get_stats_member_recent_races_docs**](docs/DocApi.md#get_stats_member_recent_races_docs) | **GET** /data/doc/stats/member_recent_races | +*DocApi* | [**get_stats_member_summary_docs**](docs/DocApi.md#get_stats_member_summary_docs) | **GET** /data/doc/stats/member_summary | +*DocApi* | [**get_stats_member_yearly_docs**](docs/DocApi.md#get_stats_member_yearly_docs) | **GET** /data/doc/stats/member_yearly | +*DocApi* | [**get_stats_season_driver_standings_docs**](docs/DocApi.md#get_stats_season_driver_standings_docs) | **GET** /data/doc/stats/season_driver_standings | +*DocApi* | [**get_stats_season_qualify_results_docs**](docs/DocApi.md#get_stats_season_qualify_results_docs) | **GET** /data/doc/stats/season_qualify_results | +*DocApi* | [**get_stats_season_supersession_standings_docs**](docs/DocApi.md#get_stats_season_supersession_standings_docs) | **GET** /data/doc/stats/season_supersession_standings | +*DocApi* | [**get_stats_season_team_standings_docs**](docs/DocApi.md#get_stats_season_team_standings_docs) | **GET** /data/doc/stats/season_team_standings | +*DocApi* | [**get_stats_season_tt_results_docs**](docs/DocApi.md#get_stats_season_tt_results_docs) | **GET** /data/doc/stats/season_tt_results | +*DocApi* | [**get_stats_season_tt_standings_docs**](docs/DocApi.md#get_stats_season_tt_standings_docs) | **GET** /data/doc/stats/season_tt_standings | +*DocApi* | [**get_stats_world_records_docs**](docs/DocApi.md#get_stats_world_records_docs) | **GET** /data/doc/stats/world_records | +*DocApi* | [**get_team_docs**](docs/DocApi.md#get_team_docs) | **GET** /data/doc/team | +*DocApi* | [**get_team_get_docs**](docs/DocApi.md#get_team_get_docs) | **GET** /data/doc/team/get | +*DocApi* | [**get_team_membership_docs**](docs/DocApi.md#get_team_membership_docs) | **GET** /data/doc/team/membership | +*DocApi* | [**get_time_attack_docs**](docs/DocApi.md#get_time_attack_docs) | **GET** /data/doc/time_attack | +*DocApi* | [**get_time_attack_member_season_results_docs**](docs/DocApi.md#get_time_attack_member_season_results_docs) | **GET** /data/doc/time_attack/member_season_results | +*DocApi* | [**get_track_assets_docs**](docs/DocApi.md#get_track_assets_docs) | **GET** /data/doc/track/assets | +*DocApi* | [**get_track_docs**](docs/DocApi.md#get_track_docs) | **GET** /data/doc/track | +*DocApi* | [**get_track_get_docs**](docs/DocApi.md#get_track_get_docs) | **GET** /data/doc/track/get | +*DriverStatsApi* | [**get_driver_stats_by_category**](docs/DriverStatsApi.md#get_driver_stats_by_category) | **GET** /data/driver_stats_by_category/{category} | +*HostedApi* | [**get_hosted_combined_sessions**](docs/HostedApi.md#get_hosted_combined_sessions) | **GET** /data/hosted/combined_sessions | +*HostedApi* | [**get_hosted_sessions**](docs/HostedApi.md#get_hosted_sessions) | **GET** /data/hosted/sessions | +*LeagueApi* | [**get_league**](docs/LeagueApi.md#get_league) | **GET** /data/league/get | +*LeagueApi* | [**get_league_customer_league_sessions**](docs/LeagueApi.md#get_league_customer_league_sessions) | **GET** /data/league/cust_league_sessions | +*LeagueApi* | [**get_league_directory**](docs/LeagueApi.md#get_league_directory) | **GET** /data/league/directory | +*LeagueApi* | [**get_league_membership**](docs/LeagueApi.md#get_league_membership) | **GET** /data/league/membership | +*LeagueApi* | [**get_league_points_systems**](docs/LeagueApi.md#get_league_points_systems) | **GET** /data/league/get_points_systems | +*LeagueApi* | [**get_league_roster**](docs/LeagueApi.md#get_league_roster) | **GET** /data/league/roster | +*LeagueApi* | [**get_league_season_sessions**](docs/LeagueApi.md#get_league_season_sessions) | **GET** /data/league/season_sessions | +*LeagueApi* | [**get_league_season_standings**](docs/LeagueApi.md#get_league_season_standings) | **GET** /data/league/season_standings | +*LeagueApi* | [**get_league_seasons**](docs/LeagueApi.md#get_league_seasons) | **GET** /data/league/seasons | +*LookupApi* | [**get_lookup**](docs/LookupApi.md#get_lookup) | **GET** /data/lookup/get | +*LookupApi* | [**get_lookup_countries**](docs/LookupApi.md#get_lookup_countries) | **GET** /data/lookup/countries | +*LookupApi* | [**get_lookup_drivers**](docs/LookupApi.md#get_lookup_drivers) | **GET** /data/lookup/drivers | +*LookupApi* | [**get_lookup_flairs**](docs/LookupApi.md#get_lookup_flairs) | **GET** /data/lookup/flairs | +*LookupApi* | [**get_lookup_licenses**](docs/LookupApi.md#get_lookup_licenses) | **GET** /data/lookup/licenses | +*MemberApi* | [**get_member**](docs/MemberApi.md#get_member) | **GET** /data/member/get | +*MemberApi* | [**get_member_award_instances**](docs/MemberApi.md#get_member_award_instances) | **GET** /data/member/award_instances | +*MemberApi* | [**get_member_awards**](docs/MemberApi.md#get_member_awards) | **GET** /data/member/awards | +*MemberApi* | [**get_member_chart_data**](docs/MemberApi.md#get_member_chart_data) | **GET** /data/member/chart_data | +*MemberApi* | [**get_member_info**](docs/MemberApi.md#get_member_info) | **GET** /data/member/info | +*MemberApi* | [**get_member_participation_credits**](docs/MemberApi.md#get_member_participation_credits) | **GET** /data/member/participation_credits | +*MemberApi* | [**get_member_profile**](docs/MemberApi.md#get_member_profile) | **GET** /data/member/profile | Gets a requested user's profile. +*ResultsApi* | [**get_results**](docs/ResultsApi.md#get_results) | **GET** /data/results/get | +*ResultsApi* | [**get_results_event_log**](docs/ResultsApi.md#get_results_event_log) | **GET** /data/results/event_log | +*ResultsApi* | [**get_results_lap_chart_data**](docs/ResultsApi.md#get_results_lap_chart_data) | **GET** /data/results/lap_chart_data | +*ResultsApi* | [**get_results_lap_data**](docs/ResultsApi.md#get_results_lap_data) | **GET** /data/results/lap_data | +*ResultsApi* | [**get_results_search_hosted**](docs/ResultsApi.md#get_results_search_hosted) | **GET** /data/results/search_hosted | +*ResultsApi* | [**get_results_search_series**](docs/ResultsApi.md#get_results_search_series) | **GET** /data/results/search_series | +*ResultsApi* | [**get_results_season_results**](docs/ResultsApi.md#get_results_season_results) | **GET** /data/results/season_results | +*SeasonApi* | [**get_season_list**](docs/SeasonApi.md#get_season_list) | **GET** /data/season/list | +*SeasonApi* | [**get_season_race_guide**](docs/SeasonApi.md#get_season_race_guide) | **GET** /data/season/race_guide | +*SeasonApi* | [**get_season_spectator_subsession_ids**](docs/SeasonApi.md#get_season_spectator_subsession_ids) | **GET** /data/season/spectator_subsessionids | +*SeasonApi* | [**get_season_spectator_subsession_ids_detail**](docs/SeasonApi.md#get_season_spectator_subsession_ids_detail) | **GET** /data/season/spectator_subsessionids_detail | +*SeriesApi* | [**get_series**](docs/SeriesApi.md#get_series) | **GET** /data/series/get | +*SeriesApi* | [**get_series_assets**](docs/SeriesApi.md#get_series_assets) | **GET** /data/series/assets | +*SeriesApi* | [**get_series_past_seasons**](docs/SeriesApi.md#get_series_past_seasons) | **GET** /data/series/past_seasons | +*SeriesApi* | [**get_series_season_list**](docs/SeriesApi.md#get_series_season_list) | **GET** /data/series/season_list | +*SeriesApi* | [**get_series_season_schedule**](docs/SeriesApi.md#get_series_season_schedule) | **GET** /data/series/season_schedule | +*SeriesApi* | [**get_series_seasons**](docs/SeriesApi.md#get_series_seasons) | **GET** /data/series/seasons | +*SeriesApi* | [**get_series_stats_series**](docs/SeriesApi.md#get_series_stats_series) | **GET** /data/series/stats_series | +*StatsApi* | [**get_stats_member_bests**](docs/StatsApi.md#get_stats_member_bests) | **GET** /data/stats/member_bests | +*StatsApi* | [**get_stats_member_career**](docs/StatsApi.md#get_stats_member_career) | **GET** /data/stats/member_career | +*StatsApi* | [**get_stats_member_division**](docs/StatsApi.md#get_stats_member_division) | **GET** /data/stats/member_division | +*StatsApi* | [**get_stats_member_recap**](docs/StatsApi.md#get_stats_member_recap) | **GET** /data/stats/member_recap | +*StatsApi* | [**get_stats_member_recent_races**](docs/StatsApi.md#get_stats_member_recent_races) | **GET** /data/stats/member_recent_races | +*StatsApi* | [**get_stats_member_summary**](docs/StatsApi.md#get_stats_member_summary) | **GET** /data/stats/member_summary | +*StatsApi* | [**get_stats_member_yearly**](docs/StatsApi.md#get_stats_member_yearly) | **GET** /data/stats/member_yearly | +*StatsApi* | [**get_stats_season_driver_standings**](docs/StatsApi.md#get_stats_season_driver_standings) | **GET** /data/stats/season_driver_standings | +*StatsApi* | [**get_stats_season_qualify_results**](docs/StatsApi.md#get_stats_season_qualify_results) | **GET** /data/stats/season_qualify_results | +*StatsApi* | [**get_stats_season_supersession_standings**](docs/StatsApi.md#get_stats_season_supersession_standings) | **GET** /data/stats/season_supersession_standings | +*StatsApi* | [**get_stats_season_team_standings**](docs/StatsApi.md#get_stats_season_team_standings) | **GET** /data/stats/season_team_standings | +*StatsApi* | [**get_stats_season_time_trial_results**](docs/StatsApi.md#get_stats_season_time_trial_results) | **GET** /data/stats/season_time_trial_results | +*StatsApi* | [**get_stats_season_time_trial_standings**](docs/StatsApi.md#get_stats_season_time_trial_standings) | **GET** /data/stats/season_time_trial_standings | +*StatsApi* | [**get_stats_world_records**](docs/StatsApi.md#get_stats_world_records) | **GET** /data/stats/world_records | +*TeamApi* | [**get_team**](docs/TeamApi.md#get_team) | **GET** /data/team/get | +*TeamApi* | [**get_team_membership**](docs/TeamApi.md#get_team_membership) | **GET** /data/team/membership | +*TimeAttackApi* | [**get_time_attack_member_season_results**](docs/TimeAttackApi.md#get_time_attack_member_season_results) | **GET** /data/time_attack/member_season_results | +*TrackApi* | [**get_track**](docs/TrackApi.md#get_track) | **GET** /data/track/get | +*TrackApi* | [**get_track_assets**](docs/TrackApi.md#get_track_assets) | **GET** /data/track/assets | + + +## Documentation For Models + + - [ErrorResponse](docs/ErrorResponse.md) + - [IracingApiResponse](docs/IracingApiResponse.md) + - [IracingCategory](docs/IracingCategory.md) + - [IracingDivision](docs/IracingDivision.md) + - [IracingEventType](docs/IracingEventType.md) + - [IracingServiceMethodDocs](docs/IracingServiceMethodDocs.md) + - [IracingServiceMethodParametersDocs](docs/IracingServiceMethodParametersDocs.md) + - [PostAuthRequest](docs/PostAuthRequest.md) + + +To get access to the crate's generated documentation, use: + +``` +cargo doc --open +``` + +## Author + + + diff --git a/crates/iracing-data-api-client/docs/AuthApi.md b/crates/iracing-data-api-client/docs/AuthApi.md new file mode 100644 index 00000000..8905c550 --- /dev/null +++ b/crates/iracing-data-api-client/docs/AuthApi.md @@ -0,0 +1,37 @@ +# \AuthApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**post_auth**](AuthApi.md#post_auth) | **POST** /auth | + + + +## post_auth + +> post_auth(post_auth_request) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**post_auth_request** | Option<[**PostAuthRequest**](PostAuthRequest.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/CarApi.md b/crates/iracing-data-api-client/docs/CarApi.md new file mode 100644 index 00000000..835aced1 --- /dev/null +++ b/crates/iracing-data-api-client/docs/CarApi.md @@ -0,0 +1,62 @@ +# \CarApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_car**](CarApi.md#get_car) | **GET** /data/car/get | +[**get_car_assets**](CarApi.md#get_car_assets) | **GET** /data/car/assets | + + + +## get_car + +> models::IracingApiResponse get_car() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_car_assets + +> models::IracingApiResponse get_car_assets() + + +image paths are relative to https://images-static.iracing.com/ + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/CarclassApi.md b/crates/iracing-data-api-client/docs/CarclassApi.md new file mode 100644 index 00000000..163df44a --- /dev/null +++ b/crates/iracing-data-api-client/docs/CarclassApi.md @@ -0,0 +1,34 @@ +# \CarclassApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_car_class**](CarclassApi.md#get_car_class) | **GET** /data/carclass/get | Gets car classes. + + + +## get_car_class + +> models::IracingApiResponse get_car_class() +Gets car classes. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/ConstantsApi.md b/crates/iracing-data-api-client/docs/ConstantsApi.md new file mode 100644 index 00000000..a177d15d --- /dev/null +++ b/crates/iracing-data-api-client/docs/ConstantsApi.md @@ -0,0 +1,92 @@ +# \ConstantsApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_constants_categories**](ConstantsApi.md#get_constants_categories) | **GET** /data/constants/categories | +[**get_constants_divisions**](ConstantsApi.md#get_constants_divisions) | **GET** /data/constants/divisions | +[**get_constants_event_types**](ConstantsApi.md#get_constants_event_types) | **GET** /data/constants/event_types | + + + +## get_constants_categories + +> models::IracingApiResponse get_constants_categories() + + +Constant; returned directly as an array of objects + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_constants_divisions + +> models::IracingApiResponse get_constants_divisions() + + +Constant; returned directly as an array of objects + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_constants_event_types + +> models::IracingApiResponse get_constants_event_types() + + +Constant; returned directly as an array of objects + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/DocApi.md b/crates/iracing-data-api-client/docs/DocApi.md new file mode 100644 index 00000000..96916638 --- /dev/null +++ b/crates/iracing-data-api-client/docs/DocApi.md @@ -0,0 +1,2169 @@ +# \DocApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_car_assets_docs**](DocApi.md#get_car_assets_docs) | **GET** /data/doc/car/assets | +[**get_car_class_docs**](DocApi.md#get_car_class_docs) | **GET** /data/doc/carclass | +[**get_car_class_get_docs**](DocApi.md#get_car_class_get_docs) | **GET** /data/doc/carclass/get | +[**get_car_docs**](DocApi.md#get_car_docs) | **GET** /data/doc/car | +[**get_car_get_docs**](DocApi.md#get_car_get_docs) | **GET** /data/doc/car/get | +[**get_constants_categories_docs**](DocApi.md#get_constants_categories_docs) | **GET** /data/doc/constants/categories | +[**get_constants_divisions_docs**](DocApi.md#get_constants_divisions_docs) | **GET** /data/doc/constants/divisions | +[**get_constants_docs**](DocApi.md#get_constants_docs) | **GET** /data/doc/constants | +[**get_constants_event_types_docs**](DocApi.md#get_constants_event_types_docs) | **GET** /data/doc/constants/event_types | +[**get_docs**](DocApi.md#get_docs) | **GET** /data/doc | +[**get_driver_stats_by_category_category_docs**](DocApi.md#get_driver_stats_by_category_category_docs) | **GET** /data/doc/driver_stats_by_category/{category} | +[**get_driver_stats_by_category_docs**](DocApi.md#get_driver_stats_by_category_docs) | **GET** /data/doc/driver_stats_by_category | +[**get_hosted_combined_sessions_docs**](DocApi.md#get_hosted_combined_sessions_docs) | **GET** /data/doc/hosted/combined_sessions | +[**get_hosted_docs**](DocApi.md#get_hosted_docs) | **GET** /data/doc/hosted | +[**get_hosted_sessions_docs**](DocApi.md#get_hosted_sessions_docs) | **GET** /data/doc/hosted/sessions | +[**get_league_customer_league_sessions_docs**](DocApi.md#get_league_customer_league_sessions_docs) | **GET** /data/doc/league/cust_league_sessions | +[**get_league_directory_docs**](DocApi.md#get_league_directory_docs) | **GET** /data/doc/league/directory | +[**get_league_docs**](DocApi.md#get_league_docs) | **GET** /data/doc/league | +[**get_league_get_docs**](DocApi.md#get_league_get_docs) | **GET** /data/doc/league/get | +[**get_league_get_points_systems_docs**](DocApi.md#get_league_get_points_systems_docs) | **GET** /data/doc/league/get_points_systems | +[**get_league_membership_docs**](DocApi.md#get_league_membership_docs) | **GET** /data/doc/league/membership | +[**get_league_roster_docs**](DocApi.md#get_league_roster_docs) | **GET** /data/doc/league/roster | +[**get_league_season_sessions_docs**](DocApi.md#get_league_season_sessions_docs) | **GET** /data/doc/league/season_sessions | +[**get_league_season_standings_docs**](DocApi.md#get_league_season_standings_docs) | **GET** /data/doc/league/season_standings | +[**get_league_seasons_docs**](DocApi.md#get_league_seasons_docs) | **GET** /data/doc/league/seasons | +[**get_lookup_countries_docs**](DocApi.md#get_lookup_countries_docs) | **GET** /data/doc/lookup/countries | +[**get_lookup_docs**](DocApi.md#get_lookup_docs) | **GET** /data/doc/lookup | +[**get_lookup_drivers_docs**](DocApi.md#get_lookup_drivers_docs) | **GET** /data/doc/lookup/drivers | +[**get_lookup_flairs_docs**](DocApi.md#get_lookup_flairs_docs) | **GET** /data/doc/lookup/flairs | +[**get_lookup_get_docs**](DocApi.md#get_lookup_get_docs) | **GET** /data/doc/lookup/get | +[**get_lookup_licenses_docs**](DocApi.md#get_lookup_licenses_docs) | **GET** /data/doc/lookup/licenses | +[**get_member_award_instances_docs**](DocApi.md#get_member_award_instances_docs) | **GET** /data/doc/member/award_instances | +[**get_member_awards_docs**](DocApi.md#get_member_awards_docs) | **GET** /data/doc/member/awards | +[**get_member_chart_data_docs**](DocApi.md#get_member_chart_data_docs) | **GET** /data/doc/member/chart_data | +[**get_member_docs**](DocApi.md#get_member_docs) | **GET** /data/doc/member | +[**get_member_get_docs**](DocApi.md#get_member_get_docs) | **GET** /data/doc/member/get | +[**get_member_info_docs**](DocApi.md#get_member_info_docs) | **GET** /data/doc/member/info | +[**get_member_participation_credits_docs**](DocApi.md#get_member_participation_credits_docs) | **GET** /data/doc/member/participation_credits | +[**get_member_profile_docs**](DocApi.md#get_member_profile_docs) | **GET** /data/doc/member/profile | +[**get_results_docs**](DocApi.md#get_results_docs) | **GET** /data/doc/results | +[**get_results_event_log_docs**](DocApi.md#get_results_event_log_docs) | **GET** /data/doc/results/event_log | +[**get_results_get_docs**](DocApi.md#get_results_get_docs) | **GET** /data/doc/results/get | +[**get_results_lap_chart_data_docs**](DocApi.md#get_results_lap_chart_data_docs) | **GET** /data/doc/results/lap_chart_data | +[**get_results_lap_data_docs**](DocApi.md#get_results_lap_data_docs) | **GET** /data/doc/results/lap_data | +[**get_results_search_hosted_docs**](DocApi.md#get_results_search_hosted_docs) | **GET** /data/doc/results/search_hosted | +[**get_results_search_series_docs**](DocApi.md#get_results_search_series_docs) | **GET** /data/doc/results/search_series | +[**get_results_season_results_docs**](DocApi.md#get_results_season_results_docs) | **GET** /data/doc/results/season_results | +[**get_season_docs**](DocApi.md#get_season_docs) | **GET** /data/doc/season | +[**get_season_list_docs**](DocApi.md#get_season_list_docs) | **GET** /data/doc/season/list | +[**get_season_race_guide_docs**](DocApi.md#get_season_race_guide_docs) | **GET** /data/doc/season/race_guide | +[**get_season_spectator_subsession_ids_detail_docs**](DocApi.md#get_season_spectator_subsession_ids_detail_docs) | **GET** /data/doc/season/spectator_subsessionids_detail | +[**get_season_spectator_subsession_ids_docs**](DocApi.md#get_season_spectator_subsession_ids_docs) | **GET** /data/doc/season/spectator_subsessionids | +[**get_series_assets_docs**](DocApi.md#get_series_assets_docs) | **GET** /data/doc/series/assets | +[**get_series_docs**](DocApi.md#get_series_docs) | **GET** /data/doc/series | +[**get_series_get_docs**](DocApi.md#get_series_get_docs) | **GET** /data/doc/series/get | +[**get_series_past_seasons_docs**](DocApi.md#get_series_past_seasons_docs) | **GET** /data/doc/series/past_seasons | +[**get_series_season_list_docs**](DocApi.md#get_series_season_list_docs) | **GET** /data/doc/series/season_list | +[**get_series_season_schedule_docs**](DocApi.md#get_series_season_schedule_docs) | **GET** /data/doc/series/season_schedule | +[**get_series_seasons_docs**](DocApi.md#get_series_seasons_docs) | **GET** /data/doc/series/seasons | +[**get_series_stats_series_docs**](DocApi.md#get_series_stats_series_docs) | **GET** /data/doc/series/stats_series | +[**get_stats_docs**](DocApi.md#get_stats_docs) | **GET** /data/doc/stats | +[**get_stats_member_bests_docs**](DocApi.md#get_stats_member_bests_docs) | **GET** /data/doc/stats/member_bests | +[**get_stats_member_career_docs**](DocApi.md#get_stats_member_career_docs) | **GET** /data/doc/stats/member_career | +[**get_stats_member_division_docs**](DocApi.md#get_stats_member_division_docs) | **GET** /data/doc/stats/member_division | +[**get_stats_member_recap_docs**](DocApi.md#get_stats_member_recap_docs) | **GET** /data/doc/stats/member_recap | +[**get_stats_member_recent_races_docs**](DocApi.md#get_stats_member_recent_races_docs) | **GET** /data/doc/stats/member_recent_races | +[**get_stats_member_summary_docs**](DocApi.md#get_stats_member_summary_docs) | **GET** /data/doc/stats/member_summary | +[**get_stats_member_yearly_docs**](DocApi.md#get_stats_member_yearly_docs) | **GET** /data/doc/stats/member_yearly | +[**get_stats_season_driver_standings_docs**](DocApi.md#get_stats_season_driver_standings_docs) | **GET** /data/doc/stats/season_driver_standings | +[**get_stats_season_qualify_results_docs**](DocApi.md#get_stats_season_qualify_results_docs) | **GET** /data/doc/stats/season_qualify_results | +[**get_stats_season_supersession_standings_docs**](DocApi.md#get_stats_season_supersession_standings_docs) | **GET** /data/doc/stats/season_supersession_standings | +[**get_stats_season_team_standings_docs**](DocApi.md#get_stats_season_team_standings_docs) | **GET** /data/doc/stats/season_team_standings | +[**get_stats_season_tt_results_docs**](DocApi.md#get_stats_season_tt_results_docs) | **GET** /data/doc/stats/season_tt_results | +[**get_stats_season_tt_standings_docs**](DocApi.md#get_stats_season_tt_standings_docs) | **GET** /data/doc/stats/season_tt_standings | +[**get_stats_world_records_docs**](DocApi.md#get_stats_world_records_docs) | **GET** /data/doc/stats/world_records | +[**get_team_docs**](DocApi.md#get_team_docs) | **GET** /data/doc/team | +[**get_team_get_docs**](DocApi.md#get_team_get_docs) | **GET** /data/doc/team/get | +[**get_team_membership_docs**](DocApi.md#get_team_membership_docs) | **GET** /data/doc/team/membership | +[**get_time_attack_docs**](DocApi.md#get_time_attack_docs) | **GET** /data/doc/time_attack | +[**get_time_attack_member_season_results_docs**](DocApi.md#get_time_attack_member_season_results_docs) | **GET** /data/doc/time_attack/member_season_results | +[**get_track_assets_docs**](DocApi.md#get_track_assets_docs) | **GET** /data/doc/track/assets | +[**get_track_docs**](DocApi.md#get_track_docs) | **GET** /data/doc/track | +[**get_track_get_docs**](DocApi.md#get_track_get_docs) | **GET** /data/doc/track/get | + + + +## get_car_assets_docs + +> models::IracingServiceMethodDocs get_car_assets_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_car_class_docs + +> std::collections::HashMap get_car_class_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_car_class_get_docs + +> models::IracingServiceMethodDocs get_car_class_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_car_docs + +> std::collections::HashMap get_car_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_car_get_docs + +> models::IracingServiceMethodDocs get_car_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_constants_categories_docs + +> models::IracingServiceMethodDocs get_constants_categories_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_constants_divisions_docs + +> models::IracingServiceMethodDocs get_constants_divisions_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_constants_docs + +> std::collections::HashMap get_constants_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_constants_event_types_docs + +> models::IracingServiceMethodDocs get_constants_event_types_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_docs + +> std::collections::HashMap> get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap>**](std::collections::HashMap.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_driver_stats_by_category_category_docs + +> models::IracingServiceMethodDocs get_driver_stats_by_category_category_docs(category) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**category** | [**IracingCategory**](.md) | Racing category. | [required] | + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_driver_stats_by_category_docs + +> std::collections::HashMap get_driver_stats_by_category_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_hosted_combined_sessions_docs + +> models::IracingServiceMethodDocs get_hosted_combined_sessions_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_hosted_docs + +> std::collections::HashMap get_hosted_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_hosted_sessions_docs + +> models::IracingServiceMethodDocs get_hosted_sessions_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_customer_league_sessions_docs + +> models::IracingServiceMethodDocs get_league_customer_league_sessions_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_directory_docs + +> models::IracingServiceMethodDocs get_league_directory_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_docs + +> std::collections::HashMap get_league_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_get_docs + +> models::IracingServiceMethodDocs get_league_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_get_points_systems_docs + +> models::IracingServiceMethodDocs get_league_get_points_systems_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_membership_docs + +> models::IracingServiceMethodDocs get_league_membership_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_roster_docs + +> models::IracingServiceMethodDocs get_league_roster_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_season_sessions_docs + +> models::IracingServiceMethodDocs get_league_season_sessions_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_season_standings_docs + +> models::IracingServiceMethodDocs get_league_season_standings_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_seasons_docs + +> models::IracingServiceMethodDocs get_league_seasons_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_countries_docs + +> models::IracingServiceMethodDocs get_lookup_countries_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_docs + +> std::collections::HashMap get_lookup_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_drivers_docs + +> models::IracingServiceMethodDocs get_lookup_drivers_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_flairs_docs + +> models::IracingServiceMethodDocs get_lookup_flairs_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_get_docs + +> models::IracingServiceMethodDocs get_lookup_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_licenses_docs + +> models::IracingServiceMethodDocs get_lookup_licenses_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_award_instances_docs + +> models::IracingServiceMethodDocs get_member_award_instances_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_awards_docs + +> models::IracingServiceMethodDocs get_member_awards_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_chart_data_docs + +> models::IracingServiceMethodDocs get_member_chart_data_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_docs + +> std::collections::HashMap get_member_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_get_docs + +> models::IracingServiceMethodDocs get_member_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_info_docs + +> models::IracingServiceMethodDocs get_member_info_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_participation_credits_docs + +> models::IracingServiceMethodDocs get_member_participation_credits_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_profile_docs + +> models::IracingServiceMethodDocs get_member_profile_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_docs + +> std::collections::HashMap get_results_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_event_log_docs + +> models::IracingServiceMethodDocs get_results_event_log_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_get_docs + +> models::IracingServiceMethodDocs get_results_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_lap_chart_data_docs + +> models::IracingServiceMethodDocs get_results_lap_chart_data_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_lap_data_docs + +> models::IracingServiceMethodDocs get_results_lap_data_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_search_hosted_docs + +> models::IracingServiceMethodDocs get_results_search_hosted_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_search_series_docs + +> models::IracingServiceMethodDocs get_results_search_series_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_season_results_docs + +> models::IracingServiceMethodDocs get_results_season_results_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_docs + +> std::collections::HashMap get_season_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_list_docs + +> models::IracingServiceMethodDocs get_season_list_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_race_guide_docs + +> models::IracingServiceMethodDocs get_season_race_guide_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_spectator_subsession_ids_detail_docs + +> models::IracingServiceMethodDocs get_season_spectator_subsession_ids_detail_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_spectator_subsession_ids_docs + +> models::IracingServiceMethodDocs get_season_spectator_subsession_ids_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_assets_docs + +> models::IracingServiceMethodDocs get_series_assets_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_docs + +> std::collections::HashMap get_series_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_get_docs + +> models::IracingServiceMethodDocs get_series_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_past_seasons_docs + +> models::IracingServiceMethodDocs get_series_past_seasons_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_season_list_docs + +> models::IracingServiceMethodDocs get_series_season_list_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_season_schedule_docs + +> models::IracingServiceMethodDocs get_series_season_schedule_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_seasons_docs + +> models::IracingServiceMethodDocs get_series_seasons_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_stats_series_docs + +> models::IracingServiceMethodDocs get_series_stats_series_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_docs + +> std::collections::HashMap get_stats_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_bests_docs + +> models::IracingServiceMethodDocs get_stats_member_bests_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_career_docs + +> models::IracingServiceMethodDocs get_stats_member_career_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_division_docs + +> models::IracingServiceMethodDocs get_stats_member_division_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_recap_docs + +> models::IracingServiceMethodDocs get_stats_member_recap_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_recent_races_docs + +> models::IracingServiceMethodDocs get_stats_member_recent_races_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_summary_docs + +> models::IracingServiceMethodDocs get_stats_member_summary_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_yearly_docs + +> models::IracingServiceMethodDocs get_stats_member_yearly_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_driver_standings_docs + +> models::IracingServiceMethodDocs get_stats_season_driver_standings_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_qualify_results_docs + +> models::IracingServiceMethodDocs get_stats_season_qualify_results_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_supersession_standings_docs + +> models::IracingServiceMethodDocs get_stats_season_supersession_standings_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_team_standings_docs + +> models::IracingServiceMethodDocs get_stats_season_team_standings_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_tt_results_docs + +> models::IracingServiceMethodDocs get_stats_season_tt_results_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_tt_standings_docs + +> models::IracingServiceMethodDocs get_stats_season_tt_standings_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_world_records_docs + +> models::IracingServiceMethodDocs get_stats_world_records_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_team_docs + +> std::collections::HashMap get_team_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_team_get_docs + +> models::IracingServiceMethodDocs get_team_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_team_membership_docs + +> models::IracingServiceMethodDocs get_team_membership_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_time_attack_docs + +> std::collections::HashMap get_time_attack_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_time_attack_member_season_results_docs + +> models::IracingServiceMethodDocs get_time_attack_member_season_results_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_track_assets_docs + +> models::IracingServiceMethodDocs get_track_assets_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_track_docs + +> std::collections::HashMap get_track_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::collections::HashMap**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_track_get_docs + +> models::IracingServiceMethodDocs get_track_get_docs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingServiceMethodDocs**](iracingServiceMethodDocs.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/DriverStatsApi.md b/crates/iracing-data-api-client/docs/DriverStatsApi.md new file mode 100644 index 00000000..9a9696c3 --- /dev/null +++ b/crates/iracing-data-api-client/docs/DriverStatsApi.md @@ -0,0 +1,37 @@ +# \DriverStatsApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_driver_stats_by_category**](DriverStatsApi.md#get_driver_stats_by_category) | **GET** /data/driver_stats_by_category/{category} | + + + +## get_driver_stats_by_category + +> models::IracingApiResponse get_driver_stats_by_category(category) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**category** | [**IracingCategory**](.md) | Racing category. | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/ErrorResponse.md b/crates/iracing-data-api-client/docs/ErrorResponse.md new file mode 100644 index 00000000..6a7d8837 --- /dev/null +++ b/crates/iracing-data-api-client/docs/ErrorResponse.md @@ -0,0 +1,13 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **String** | | +**message** | Option<**String**> | | [optional] +**note** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/HostedApi.md b/crates/iracing-data-api-client/docs/HostedApi.md new file mode 100644 index 00000000..180dc8d8 --- /dev/null +++ b/crates/iracing-data-api-client/docs/HostedApi.md @@ -0,0 +1,67 @@ +# \HostedApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_hosted_combined_sessions**](HostedApi.md#get_hosted_combined_sessions) | **GET** /data/hosted/combined_sessions | +[**get_hosted_sessions**](HostedApi.md#get_hosted_sessions) | **GET** /data/hosted/sessions | + + + +## get_hosted_combined_sessions + +> models::IracingApiResponse get_hosted_combined_sessions(package_id) + + +Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**package_id** | Option<**f64**> | If set, return only sessions using this car or track package ID. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_hosted_sessions + +> models::IracingApiResponse get_hosted_sessions() + + +Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/IracingApiResponse.md b/crates/iracing-data-api-client/docs/IracingApiResponse.md new file mode 100644 index 00000000..8f6de2f5 --- /dev/null +++ b/crates/iracing-data-api-client/docs/IracingApiResponse.md @@ -0,0 +1,12 @@ +# IracingApiResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **String** | A link to the cached data | +**expires** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/IracingCategory.md b/crates/iracing-data-api-client/docs/IracingCategory.md new file mode 100644 index 00000000..13157e53 --- /dev/null +++ b/crates/iracing-data-api-client/docs/IracingCategory.md @@ -0,0 +1,17 @@ +# IracingCategory + +## Enum Variants + +| Name | Value | +|---- | -----| +| Oval | oval | +| Road | road | +| DirtRoad | dirt_road | +| DirtOval | dirt_oval | +| SportsCar | sports_car | +| FormulaCar | formula_car | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/IracingDivision.md b/crates/iracing-data-api-client/docs/IracingDivision.md new file mode 100644 index 00000000..2d8d2db9 --- /dev/null +++ b/crates/iracing-data-api-client/docs/IracingDivision.md @@ -0,0 +1,22 @@ +# IracingDivision + +## Enum Variants + +| Name | Value | +|---- | -----| +| Variant0 | 0 | +| Variant1 | 1 | +| Variant2 | 2 | +| Variant3 | 3 | +| Variant4 | 4 | +| Variant5 | 5 | +| Variant6 | 6 | +| Variant7 | 7 | +| Variant8 | 8 | +| Variant9 | 9 | +| Variant10 | 10 | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/IracingEventType.md b/crates/iracing-data-api-client/docs/IracingEventType.md new file mode 100644 index 00000000..0a05128d --- /dev/null +++ b/crates/iracing-data-api-client/docs/IracingEventType.md @@ -0,0 +1,15 @@ +# IracingEventType + +## Enum Variants + +| Name | Value | +|---- | -----| +| Variant2 | 2 | +| Variant3 | 3 | +| Variant4 | 4 | +| Variant5 | 5 | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/IracingServiceMethodDocs.md b/crates/iracing-data-api-client/docs/IracingServiceMethodDocs.md new file mode 100644 index 00000000..782bdac4 --- /dev/null +++ b/crates/iracing-data-api-client/docs/IracingServiceMethodDocs.md @@ -0,0 +1,13 @@ +# IracingServiceMethodDocs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **String** | | +**parameters** | [**std::collections::HashMap**](iracingServiceMethodParametersDocs.md) | | +**expiration_seconds** | Option<**f64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/IracingServiceMethodParametersDocs.md b/crates/iracing-data-api-client/docs/IracingServiceMethodParametersDocs.md new file mode 100644 index 00000000..194036ae --- /dev/null +++ b/crates/iracing-data-api-client/docs/IracingServiceMethodParametersDocs.md @@ -0,0 +1,13 @@ +# IracingServiceMethodParametersDocs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **String** | | +**note** | Option<**String**> | | [optional] +**required** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/LeagueApi.md b/crates/iracing-data-api-client/docs/LeagueApi.md new file mode 100644 index 00000000..19d268a4 --- /dev/null +++ b/crates/iracing-data-api-client/docs/LeagueApi.md @@ -0,0 +1,291 @@ +# \LeagueApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_league**](LeagueApi.md#get_league) | **GET** /data/league/get | +[**get_league_customer_league_sessions**](LeagueApi.md#get_league_customer_league_sessions) | **GET** /data/league/cust_league_sessions | +[**get_league_directory**](LeagueApi.md#get_league_directory) | **GET** /data/league/directory | +[**get_league_membership**](LeagueApi.md#get_league_membership) | **GET** /data/league/membership | +[**get_league_points_systems**](LeagueApi.md#get_league_points_systems) | **GET** /data/league/get_points_systems | +[**get_league_roster**](LeagueApi.md#get_league_roster) | **GET** /data/league/roster | +[**get_league_season_sessions**](LeagueApi.md#get_league_season_sessions) | **GET** /data/league/season_sessions | +[**get_league_season_standings**](LeagueApi.md#get_league_season_standings) | **GET** /data/league/season_standings | +[**get_league_seasons**](LeagueApi.md#get_league_seasons) | **GET** /data/league/seasons | + + + +## get_league + +> models::IracingApiResponse get_league(league_id, include_licenses) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**league_id** | **f64** | | [required] | +**include_licenses** | Option<**bool**> | For faster responses, only request when necessary. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_customer_league_sessions + +> models::IracingApiResponse get_league_customer_league_sessions(mine, package_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**mine** | Option<**bool**> | If true, return only sessions created by this user. | | +**package_id** | Option<**f64**> | If set, return only sessions using this car or track package ID. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_directory + +> models::IracingApiResponse get_league_directory(search, tag, restrict_to_member, restrict_to_recruiting, restrict_to_friends, restrict_to_watched, minimum_roster_count, maximum_roster_count, lowerbound, upperbound, sort, order) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**search** | Option<**String**> | Will search against league name, description, owner, and league ID. | | +**tag** | Option<**String**> | One or more tags, comma-separated. | | +**restrict_to_member** | Option<**bool**> | If true include only leagues for which customer is a member. | | +**restrict_to_recruiting** | Option<**bool**> | If true include only leagues which are recruiting. | | +**restrict_to_friends** | Option<**bool**> | If true include only leagues owned by a friend. | | +**restrict_to_watched** | Option<**bool**> | If true include only leagues owned by a watched member. | | +**minimum_roster_count** | Option<**f64**> | If set include leagues with at least this number of members. | | +**maximum_roster_count** | Option<**f64**> | If set include leagues with no more than this number of members. | | +**lowerbound** | Option<**f64**> | First row of results to return. Defaults to 1. | | +**upperbound** | Option<**f64**> | Last row of results to return. Defaults to lowerbound + 39. | | +**sort** | Option<**String**> | One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance. | | +**order** | Option<**String**> | One of asc or desc. Defaults to asc. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_membership + +> models::IracingApiResponse get_league_membership(cust_id, include_league) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. | | +**include_league** | Option<**bool**> | | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_points_systems + +> models::IracingApiResponse get_league_points_systems(league_id, season_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**league_id** | **f64** | | [required] | +**season_id** | Option<**f64**> | If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_roster + +> models::IracingApiResponse get_league_roster(league_id, include_licenses) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**league_id** | **f64** | | [required] | +**include_licenses** | Option<**bool**> | For faster responses, only request when necessary. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_season_sessions + +> models::IracingApiResponse get_league_season_sessions(league_id, season_id, results_only) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**league_id** | **f64** | | [required] | +**season_id** | **f64** | | [required] | +**results_only** | Option<**bool**> | If true include only sessions for which results are available. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_season_standings + +> models::IracingApiResponse get_league_season_standings(league_id, season_id, car_class_id, car_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**league_id** | **f64** | | [required] | +**season_id** | **f64** | | [required] | +**car_class_id** | Option<**f64**> | | | +**car_id** | Option<**f64**> | If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_league_seasons + +> models::IracingApiResponse get_league_seasons(league_id, retired) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**league_id** | **f64** | | [required] | +**retired** | Option<**bool**> | If true include seasons which are no longer active. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/LookupApi.md b/crates/iracing-data-api-client/docs/LookupApi.md new file mode 100644 index 00000000..37755b9c --- /dev/null +++ b/crates/iracing-data-api-client/docs/LookupApi.md @@ -0,0 +1,142 @@ +# \LookupApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_lookup**](LookupApi.md#get_lookup) | **GET** /data/lookup/get | +[**get_lookup_countries**](LookupApi.md#get_lookup_countries) | **GET** /data/lookup/countries | +[**get_lookup_drivers**](LookupApi.md#get_lookup_drivers) | **GET** /data/lookup/drivers | +[**get_lookup_flairs**](LookupApi.md#get_lookup_flairs) | **GET** /data/lookup/flairs | +[**get_lookup_licenses**](LookupApi.md#get_lookup_licenses) | **GET** /data/lookup/licenses | + + + +## get_lookup + +> models::IracingApiResponse get_lookup() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_countries + +> models::IracingApiResponse get_lookup_countries() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_drivers + +> models::IracingApiResponse get_lookup_drivers(search_term, league_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**search_term** | **String** | A cust_id or partial name for which to search. | [required] | +**league_id** | Option<**f64**> | Narrow the search to the roster of the given league. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_flairs + +> models::IracingApiResponse get_lookup_flairs() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_lookup_licenses + +> models::IracingApiResponse get_lookup_licenses() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/MemberApi.md b/crates/iracing-data-api-client/docs/MemberApi.md new file mode 100644 index 00000000..ae3e9cb0 --- /dev/null +++ b/crates/iracing-data-api-client/docs/MemberApi.md @@ -0,0 +1,209 @@ +# \MemberApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_member**](MemberApi.md#get_member) | **GET** /data/member/get | +[**get_member_award_instances**](MemberApi.md#get_member_award_instances) | **GET** /data/member/award_instances | +[**get_member_awards**](MemberApi.md#get_member_awards) | **GET** /data/member/awards | +[**get_member_chart_data**](MemberApi.md#get_member_chart_data) | **GET** /data/member/chart_data | +[**get_member_info**](MemberApi.md#get_member_info) | **GET** /data/member/info | +[**get_member_participation_credits**](MemberApi.md#get_member_participation_credits) | **GET** /data/member/participation_credits | +[**get_member_profile**](MemberApi.md#get_member_profile) | **GET** /data/member/profile | Gets a requested user's profile. + + + +## get_member + +> models::IracingApiResponse get_member(cust_ids, include_licenses) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_ids** | **String** | Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 | [required] | +**include_licenses** | Option<**bool**> | | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_award_instances + +> models::IracingApiResponse get_member_award_instances(award_id, cust_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**award_id** | **f64** | | [required] | +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_awards + +> models::IracingApiResponse get_member_awards(cust_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_chart_data + +> models::IracingApiResponse get_member_chart_data(category_id, chart_type, cust_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**category_id** | **f64** | 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road | [required] | +**chart_type** | **f64** | 1 - iRating; 2 - TT Rating; 3 - License/SR | [required] | +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_info + +> models::IracingApiResponse get_member_info() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_participation_credits + +> models::IracingApiResponse get_member_participation_credits() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_member_profile + +> models::IracingApiResponse get_member_profile(cust_id) +Gets a requested user's profile. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/PostAuthRequest.md b/crates/iracing-data-api-client/docs/PostAuthRequest.md new file mode 100644 index 00000000..df159f9a --- /dev/null +++ b/crates/iracing-data-api-client/docs/PostAuthRequest.md @@ -0,0 +1,12 @@ +# PostAuthRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/iracing-data-api-client/docs/ResultsApi.md b/crates/iracing-data-api-client/docs/ResultsApi.md new file mode 100644 index 00000000..7047b177 --- /dev/null +++ b/crates/iracing-data-api-client/docs/ResultsApi.md @@ -0,0 +1,243 @@ +# \ResultsApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_results**](ResultsApi.md#get_results) | **GET** /data/results/get | +[**get_results_event_log**](ResultsApi.md#get_results_event_log) | **GET** /data/results/event_log | +[**get_results_lap_chart_data**](ResultsApi.md#get_results_lap_chart_data) | **GET** /data/results/lap_chart_data | +[**get_results_lap_data**](ResultsApi.md#get_results_lap_data) | **GET** /data/results/lap_data | +[**get_results_search_hosted**](ResultsApi.md#get_results_search_hosted) | **GET** /data/results/search_hosted | +[**get_results_search_series**](ResultsApi.md#get_results_search_series) | **GET** /data/results/search_series | +[**get_results_season_results**](ResultsApi.md#get_results_season_results) | **GET** /data/results/season_results | + + + +## get_results + +> models::IracingApiResponse get_results(subsession_id, include_licenses) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subsession_id** | **f64** | | [required] | +**include_licenses** | Option<**bool**> | | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_event_log + +> models::IracingApiResponse get_results_event_log(subsession_id, simsession_number) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subsession_id** | **f64** | | [required] | +**simsession_number** | **f64** | The main event is 0; the preceding event is -1, and so on. | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_lap_chart_data + +> models::IracingApiResponse get_results_lap_chart_data(subsession_id, simsession_number) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subsession_id** | **f64** | | [required] | +**simsession_number** | **f64** | The main event is 0; the preceding event is -1, and so on. | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_lap_data + +> models::IracingApiResponse get_results_lap_data(subsession_id, simsession_number, cust_id, team_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subsession_id** | **f64** | | [required] | +**simsession_number** | **f64** | The main event is 0; the preceding event is -1, and so on. | [required] | +**cust_id** | Option<**f64**> | Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included. | | +**team_id** | Option<**f64**> | Required if the subsession was a team event. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_search_hosted + +> models::IracingApiResponse get_results_search_hosted(start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, host_cust_id, session_name, league_id, league_season_id, car_id, track_id, category_ids) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**start_range_begin** | Option<**String**> | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | | +**start_range_end** | Option<**String**> | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. | | +**finish_range_begin** | Option<**String**> | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | | +**finish_range_end** | Option<**String**> | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. | | +**cust_id** | Option<**f64**> | The participant's customer ID. Ignored if team_id is supplied. | | +**team_id** | Option<**f64**> | The team ID to search for. Takes priority over cust_id if both are supplied. | | +**host_cust_id** | Option<**f64**> | The host's customer ID. | | +**session_name** | Option<**String**> | Part or all of the session's name. | | +**league_id** | Option<**f64**> | Include only results for the league with this ID. | | +**league_season_id** | Option<**f64**> | Include only results for the league season with this ID. | | +**car_id** | Option<**f64**> | One of the cars used by the session. | | +**track_id** | Option<**f64**> | The ID of the track used by the session. | | +**category_ids** | Option<**String**> | Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_search_series + +> models::IracingApiResponse get_results_search_series(season_year, season_quarter, start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, series_id, race_week_num, official_only, event_types, category_ids) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_year** | Option<**f64**> | Required when using season_quarter. | | +**season_quarter** | Option<**f64**> | Required when using season_year. | | +**start_range_begin** | Option<**String**> | Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | | +**start_range_end** | Option<**String**> | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. | | +**finish_range_begin** | Option<**String**> | Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". | | +**finish_range_end** | Option<**String**> | ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. | | +**cust_id** | Option<**f64**> | Include only sessions in which this customer participated. Ignored if team_id is supplied. | | +**team_id** | Option<**f64**> | Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. | | +**series_id** | Option<**f64**> | Include only sessions for series with this ID. | | +**race_week_num** | Option<**f64**> | Include only sessions with this race week number. | | +**official_only** | Option<**bool**> | If true, include only sessions earning championship points. Defaults to all. | | +**event_types** | Option<**String**> | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | | +**category_ids** | Option<**String**> | License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_results_season_results + +> models::IracingApiResponse get_results_season_results(season_id, event_type, race_week_num) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**event_type** | Option<[**IracingEventType**](.md)> | Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race | | +**race_week_num** | Option<**f64**> | The first race week of a season is 0. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/SeasonApi.md b/crates/iracing-data-api-client/docs/SeasonApi.md new file mode 100644 index 00000000..b9f28b71 --- /dev/null +++ b/crates/iracing-data-api-client/docs/SeasonApi.md @@ -0,0 +1,127 @@ +# \SeasonApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_season_list**](SeasonApi.md#get_season_list) | **GET** /data/season/list | +[**get_season_race_guide**](SeasonApi.md#get_season_race_guide) | **GET** /data/season/race_guide | +[**get_season_spectator_subsession_ids**](SeasonApi.md#get_season_spectator_subsession_ids) | **GET** /data/season/spectator_subsessionids | +[**get_season_spectator_subsession_ids_detail**](SeasonApi.md#get_season_spectator_subsession_ids_detail) | **GET** /data/season/spectator_subsessionids_detail | + + + +## get_season_list + +> models::IracingApiResponse get_season_list(season_year, season_quarter) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_year** | **f64** | | [required] | +**season_quarter** | **f64** | | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_race_guide + +> models::IracingApiResponse get_season_race_guide(from, include_end_after_from) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**from** | Option<**String**> | ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. | | +**include_end_after_from** | Option<**bool**> | Include sessions which start before 'from' but end after. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_spectator_subsession_ids + +> models::IracingApiResponse get_season_spectator_subsession_ids(event_types) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**event_types** | Option<[**Vec**](models::IracingEventType.md)> | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_season_spectator_subsession_ids_detail + +> models::IracingApiResponse get_season_spectator_subsession_ids_detail(event_types, season_ids) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**event_types** | Option<[**Vec**](models::IracingEventType.md)> | Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 | | +**season_ids** | Option<[**Vec**](f64.md)> | Seasons to include in the search. Defaults to all. ?season_ids=513,937 | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/SeriesApi.md b/crates/iracing-data-api-client/docs/SeriesApi.md new file mode 100644 index 00000000..b87a5bed --- /dev/null +++ b/crates/iracing-data-api-client/docs/SeriesApi.md @@ -0,0 +1,206 @@ +# \SeriesApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_series**](SeriesApi.md#get_series) | **GET** /data/series/get | +[**get_series_assets**](SeriesApi.md#get_series_assets) | **GET** /data/series/assets | +[**get_series_past_seasons**](SeriesApi.md#get_series_past_seasons) | **GET** /data/series/past_seasons | +[**get_series_season_list**](SeriesApi.md#get_series_season_list) | **GET** /data/series/season_list | +[**get_series_season_schedule**](SeriesApi.md#get_series_season_schedule) | **GET** /data/series/season_schedule | +[**get_series_seasons**](SeriesApi.md#get_series_seasons) | **GET** /data/series/seasons | +[**get_series_stats_series**](SeriesApi.md#get_series_stats_series) | **GET** /data/series/stats_series | + + + +## get_series + +> models::IracingApiResponse get_series() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_assets + +> models::IracingApiResponse get_series_assets() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_past_seasons + +> models::IracingApiResponse get_series_past_seasons(series_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**series_id** | **f64** | | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_season_list + +> models::IracingApiResponse get_series_season_list(include_series, season_year, season_quarter) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**include_series** | Option<**bool**> | | | +**season_year** | Option<**f64**> | | | +**season_quarter** | Option<**f64**> | | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_season_schedule + +> models::IracingApiResponse get_series_season_schedule(season_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_seasons + +> models::IracingApiResponse get_series_seasons(include_series, season_year, season_quarter) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**include_series** | Option<**bool**> | | | +**season_year** | Option<**f64**> | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. | | +**season_quarter** | Option<**f64**> | To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_series_stats_series + +> models::IracingApiResponse get_series_stats_series() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/StatsApi.md b/crates/iracing-data-api-client/docs/StatsApi.md new file mode 100644 index 00000000..25f6b669 --- /dev/null +++ b/crates/iracing-data-api-client/docs/StatsApi.md @@ -0,0 +1,438 @@ +# \StatsApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_stats_member_bests**](StatsApi.md#get_stats_member_bests) | **GET** /data/stats/member_bests | +[**get_stats_member_career**](StatsApi.md#get_stats_member_career) | **GET** /data/stats/member_career | +[**get_stats_member_division**](StatsApi.md#get_stats_member_division) | **GET** /data/stats/member_division | +[**get_stats_member_recap**](StatsApi.md#get_stats_member_recap) | **GET** /data/stats/member_recap | +[**get_stats_member_recent_races**](StatsApi.md#get_stats_member_recent_races) | **GET** /data/stats/member_recent_races | +[**get_stats_member_summary**](StatsApi.md#get_stats_member_summary) | **GET** /data/stats/member_summary | +[**get_stats_member_yearly**](StatsApi.md#get_stats_member_yearly) | **GET** /data/stats/member_yearly | +[**get_stats_season_driver_standings**](StatsApi.md#get_stats_season_driver_standings) | **GET** /data/stats/season_driver_standings | +[**get_stats_season_qualify_results**](StatsApi.md#get_stats_season_qualify_results) | **GET** /data/stats/season_qualify_results | +[**get_stats_season_supersession_standings**](StatsApi.md#get_stats_season_supersession_standings) | **GET** /data/stats/season_supersession_standings | +[**get_stats_season_team_standings**](StatsApi.md#get_stats_season_team_standings) | **GET** /data/stats/season_team_standings | +[**get_stats_season_time_trial_results**](StatsApi.md#get_stats_season_time_trial_results) | **GET** /data/stats/season_time_trial_results | +[**get_stats_season_time_trial_standings**](StatsApi.md#get_stats_season_time_trial_standings) | **GET** /data/stats/season_time_trial_standings | +[**get_stats_world_records**](StatsApi.md#get_stats_world_records) | **GET** /data/stats/world_records | + + + +## get_stats_member_bests + +> models::IracingApiResponse get_stats_member_bests(cust_id, car_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | +**car_id** | Option<**f64**> | First call should exclude car_id; use cars_driven list in return for subsequent calls. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_career + +> models::IracingApiResponse get_stats_member_career(cust_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_division + +> models::IracingApiResponse get_stats_member_division(season_id, event_type) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**event_type** | **f64** | The event type code for the division type: 4 - Time Trial; 5 - Race | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_recap + +> models::IracingApiResponse get_stats_member_recap(cust_id, year, season) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | +**year** | Option<**f64**> | Season year; if not supplied the current calendar year (UTC) is used. | | +**season** | Option<**f64**> | Season (quarter) within the year; if not supplied the recap will be for the entire year. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_recent_races + +> models::IracingApiResponse get_stats_member_recent_races(cust_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_summary + +> models::IracingApiResponse get_stats_member_summary(cust_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_member_yearly + +> models::IracingApiResponse get_stats_member_yearly(cust_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**cust_id** | Option<**f64**> | Defaults to the authenticated member. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_driver_standings + +> models::IracingApiResponse get_stats_season_driver_standings(season_id, car_class_id, division, race_week_num) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**car_class_id** | **f64** | | [required] | +**division** | Option<[**IracingDivision**](.md)> | | | +**race_week_num** | Option<**f64**> | The first race week of a season is 0. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_qualify_results + +> models::IracingApiResponse get_stats_season_qualify_results(season_id, car_class_id, race_week_num, division) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**car_class_id** | **f64** | | [required] | +**race_week_num** | **f64** | The first race week of a season is 0. | [required] | +**division** | Option<[**IracingDivision**](.md)> | | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_supersession_standings + +> models::IracingApiResponse get_stats_season_supersession_standings(season_id, car_class_id, division, race_week_num) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**car_class_id** | **f64** | | [required] | +**division** | Option<[**IracingDivision**](.md)> | | | +**race_week_num** | Option<**f64**> | The first race week of a season is 0. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_team_standings + +> models::IracingApiResponse get_stats_season_team_standings(season_id, car_class_id, race_week_num) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**car_class_id** | **f64** | | [required] | +**race_week_num** | Option<**f64**> | The first race week of a season is 0. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_time_trial_results + +> models::IracingApiResponse get_stats_season_time_trial_results(season_id, car_class_id, race_week_num, division) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**car_class_id** | **f64** | | [required] | +**race_week_num** | **f64** | The first race week of a season is 0. | [required] | +**division** | Option<[**IracingDivision**](.md)> | | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_season_time_trial_standings + +> models::IracingApiResponse get_stats_season_time_trial_standings(season_id, car_class_id, division, race_week_num) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**season_id** | **f64** | | [required] | +**car_class_id** | **f64** | | [required] | +**division** | Option<[**IracingDivision**](.md)> | | | +**race_week_num** | Option<**f64**> | The first race week of a season is 0. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_stats_world_records + +> models::IracingApiResponse get_stats_world_records(car_id, track_id, season_year, season_quarter) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**car_id** | **f64** | | [required] | +**track_id** | **f64** | | [required] | +**season_year** | Option<**f64**> | Limit best times to a given year. | | +**season_quarter** | Option<**f64**> | Limit best times to a given quarter; only applicable when year is used. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/TeamApi.md b/crates/iracing-data-api-client/docs/TeamApi.md new file mode 100644 index 00000000..10c3e92e --- /dev/null +++ b/crates/iracing-data-api-client/docs/TeamApi.md @@ -0,0 +1,64 @@ +# \TeamApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_team**](TeamApi.md#get_team) | **GET** /data/team/get | +[**get_team_membership**](TeamApi.md#get_team_membership) | **GET** /data/team/membership | + + + +## get_team + +> models::IracingApiResponse get_team(team_id, include_licenses) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**team_id** | **f64** | | [required] | +**include_licenses** | Option<**bool**> | For faster responses, only request when necessary. | | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_team_membership + +> models::IracingApiResponse get_team_membership() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/TimeAttackApi.md b/crates/iracing-data-api-client/docs/TimeAttackApi.md new file mode 100644 index 00000000..5d9020c0 --- /dev/null +++ b/crates/iracing-data-api-client/docs/TimeAttackApi.md @@ -0,0 +1,37 @@ +# \TimeAttackApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_time_attack_member_season_results**](TimeAttackApi.md#get_time_attack_member_season_results) | **GET** /data/time_attack/member_season_results | + + + +## get_time_attack_member_season_results + +> models::IracingApiResponse get_time_attack_member_season_results(ta_comp_season_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**ta_comp_season_id** | **f64** | | [required] | + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/docs/TrackApi.md b/crates/iracing-data-api-client/docs/TrackApi.md new file mode 100644 index 00000000..64c99a29 --- /dev/null +++ b/crates/iracing-data-api-client/docs/TrackApi.md @@ -0,0 +1,60 @@ +# \TrackApi + +All URIs are relative to *https://members-ng.iracing.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_track**](TrackApi.md#get_track) | **GET** /data/track/get | +[**get_track_assets**](TrackApi.md#get_track_assets) | **GET** /data/track/assets | + + + +## get_track + +> models::IracingApiResponse get_track() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_track_assets + +> models::IracingApiResponse get_track_assets() + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::IracingApiResponse**](iracingAPIResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/crates/iracing-data-api-client/examples/get_member.rs b/crates/iracing-data-api-client/examples/get_member.rs new file mode 100644 index 00000000..dc6217f3 --- /dev/null +++ b/crates/iracing-data-api-client/examples/get_member.rs @@ -0,0 +1,75 @@ +use clap::Parser; +use iracing_data_api_client::apis::{ + configuration::Configuration, + member_api::{self, GetMemberParams}, +}; +use serde_json::Value; +use std::error::Error; + +#[derive(Debug, Parser)] +#[command(author, version, about = "Fetch iRacing member data for customer IDs")] +struct Cli { + /// Bearer access token used to sign the request. + #[arg(long)] + access_token: String, + + /// Comma-separated customer IDs to fetch. + #[arg(long, value_delimiter = ',', num_args = 1.., value_name = "CSV")] + customer_ids: Vec, + + /// Include licenses in the Member API response. + #[arg(long)] + include_licenses: bool, +} + +fn normalize_customer_ids(customer_ids: &[String]) -> Result> { + let ids: Vec<&str> = customer_ids + .iter() + .map(String::as_str) + .map(str::trim) + .filter(|id| !id.is_empty()) + .collect(); + + if ids.is_empty() { + return Err("at least one customer ID must be provided".into()); + } + + Ok(ids.join(",")) +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + let cli = Cli::parse(); + let cust_ids = normalize_customer_ids(&cli.customer_ids)?; + + let mut configuration = Configuration::new(); + configuration.bearer_access_token = Some(cli.access_token); + + let response = member_api::get_member( + &configuration, + GetMemberParams { + cust_ids, + include_licenses: cli.include_licenses.then_some(true), + }, + ) + .await?; + + let data_text = configuration + .client + .get(&response.link) + .send() + .await? + .error_for_status()? + .text() + .await?; + + let data = serde_json::from_str::(&data_text).unwrap_or(Value::String(data_text)); + + let output = serde_json::json!({ + "response": response, + "data": data, + }); + + println!("{}", serde_json::to_string_pretty(&output)?); + Ok(()) +} diff --git a/crates/iracing-data-api-client/git_push.sh b/crates/iracing-data-api-client/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/crates/iracing-data-api-client/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/crates/iracing-data-api-client/src/apis/auth_api.rs b/crates/iracing-data-api-client/src/apis/auth_api.rs new file mode 100644 index 00000000..b013bd81 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/auth_api.rs @@ -0,0 +1,58 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`post_auth`] +#[derive(Clone, Debug)] +pub struct PostAuthParams { + pub post_auth_request: Option +} + + +/// struct for typed errors of method [`post_auth`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PostAuthError { + UnknownValue(serde_json::Value), +} + + +pub async fn post_auth(configuration: &configuration::Configuration, params: PostAuthParams) -> Result<(), Error> { + + let uri_str = format!("{}/auth", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(¶ms.post_auth_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/car_api.rs b/crates/iracing-data-api-client/src/apis/car_api.rs new file mode 100644 index 00000000..a6591c5c --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/car_api.rs @@ -0,0 +1,113 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`get_car`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_car_assets`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarAssetsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_car(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/car/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// image paths are relative to https://images-static.iracing.com/ +pub async fn get_car_assets(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/car/assets", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/carclass_api.rs b/crates/iracing-data-api-client/src/apis/carclass_api.rs new file mode 100644 index 00000000..d00c6282 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/carclass_api.rs @@ -0,0 +1,65 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`get_car_class`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarClassError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_car_class(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/carclass/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/configuration.rs b/crates/iracing-data-api-client/src/apis/configuration.rs new file mode 100644 index 00000000..e9817642 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/configuration.rs @@ -0,0 +1,51 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + +#[derive(Debug, Clone)] +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, +} + +pub type BasicAuth = (String, Option); + +#[derive(Debug, Clone)] +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "https://members-ng.iracing.com".to_owned(), + user_agent: Some("OpenAPI-Generator/0.0.1/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + } + } +} diff --git a/crates/iracing-data-api-client/src/apis/constants_api.rs b/crates/iracing-data-api-client/src/apis/constants_api.rs new file mode 100644 index 00000000..e530976b --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/constants_api.rs @@ -0,0 +1,162 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`get_constants_categories`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConstantsCategoriesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_constants_divisions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConstantsDivisionsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_constants_event_types`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConstantsEventTypesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +/// Constant; returned directly as an array of objects +pub async fn get_constants_categories(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/constants/categories", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Constant; returned directly as an array of objects +pub async fn get_constants_divisions(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/constants/divisions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Constant; returned directly as an array of objects +pub async fn get_constants_event_types(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/constants/event_types", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/doc_api.rs b/crates/iracing-data-api-client/src/apis/doc_api.rs new file mode 100644 index 00000000..3be7bf52 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/doc_api.rs @@ -0,0 +1,3760 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_driver_stats_by_category_category_docs`] +#[derive(Clone, Debug)] +pub struct GetDriverStatsByCategoryCategoryDocsParams { + /// Racing category. + pub category: models::IracingCategory +} + + +/// struct for typed errors of method [`get_car_assets_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarAssetsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_car_class_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarClassDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_car_class_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarClassGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_car_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_car_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCarGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_constants_categories_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConstantsCategoriesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_constants_divisions_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConstantsDivisionsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_constants_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConstantsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_constants_event_types_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConstantsEventTypesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_driver_stats_by_category_category_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetDriverStatsByCategoryCategoryDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_driver_stats_by_category_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetDriverStatsByCategoryDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_hosted_combined_sessions_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetHostedCombinedSessionsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_hosted_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetHostedDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_hosted_sessions_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetHostedSessionsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_customer_league_sessions_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueCustomerLeagueSessionsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_directory_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueDirectoryDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_get_points_systems_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueGetPointsSystemsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_membership_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueMembershipDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_roster_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueRosterDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_season_sessions_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueSeasonSessionsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_season_standings_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueSeasonStandingsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_seasons_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueSeasonsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_countries_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupCountriesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_drivers_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupDriversDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_flairs_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupFlairsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_licenses_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupLicensesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_award_instances_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberAwardInstancesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_awards_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberAwardsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_chart_data_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberChartDataDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_info_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberInfoDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_participation_credits_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberParticipationCreditsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_profile_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberProfileDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_event_log_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsEventLogDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_lap_chart_data_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsLapChartDataDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_lap_data_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsLapDataDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_search_hosted_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsSearchHostedDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_search_series_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsSearchSeriesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_season_results_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsSeasonResultsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_list_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonListDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_race_guide_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonRaceGuideDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_spectator_subsession_ids_detail_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonSpectatorSubsessionIdsDetailDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_spectator_subsession_ids_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonSpectatorSubsessionIdsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_assets_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesAssetsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_past_seasons_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesPastSeasonsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_season_list_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesSeasonListDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_season_schedule_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesSeasonScheduleDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_seasons_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesSeasonsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_stats_series_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesStatsSeriesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_bests_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberBestsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_career_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberCareerDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_division_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberDivisionDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_recap_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberRecapDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_recent_races_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberRecentRacesDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_summary_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberSummaryDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_yearly_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberYearlyDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_driver_standings_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonDriverStandingsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_qualify_results_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonQualifyResultsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_supersession_standings_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonSupersessionStandingsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_team_standings_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonTeamStandingsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_tt_results_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonTtResultsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_tt_standings_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonTtStandingsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_world_records_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsWorldRecordsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_team_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_team_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_team_membership_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamMembershipDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_time_attack_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTimeAttackDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_time_attack_member_season_results_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTimeAttackMemberSeasonResultsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_track_assets_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTrackAssetsDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_track_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTrackDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_track_get_docs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTrackGetDocsError { + Status401(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_car_assets_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/car/assets", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_car_class_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/carclass", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_car_class_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/carclass/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_car_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/car", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_car_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/car/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_constants_categories_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/constants/categories", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_constants_divisions_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/constants/divisions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_constants_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/constants", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_constants_event_types_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/constants/event_types", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_docs(configuration: &configuration::Configuration) -> Result>, Error> { + + let uri_str = format!("{}/data/doc", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, std::collections::HashMap<String, models::IracingServiceMethodDocs>>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, std::collections::HashMap<String, models::IracingServiceMethodDocs>>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_driver_stats_by_category_category_docs(configuration: &configuration::Configuration, params: GetDriverStatsByCategoryCategoryDocsParams) -> Result> { + + let uri_str = format!("{}/data/doc/driver_stats_by_category/{category}", configuration.base_path, category=params.category.to_string()); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_driver_stats_by_category_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/driver_stats_by_category", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_hosted_combined_sessions_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/hosted/combined_sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_hosted_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/hosted", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_hosted_sessions_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/hosted/sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_customer_league_sessions_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/cust_league_sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_directory_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/directory", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/league", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_get_points_systems_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/get_points_systems", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_membership_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/membership", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_roster_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/roster", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_season_sessions_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/season_sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_season_standings_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/season_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_seasons_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/league/seasons", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_countries_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/lookup/countries", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/lookup", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_drivers_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/lookup/drivers", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_flairs_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/lookup/flairs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/lookup/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_licenses_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/lookup/licenses", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_award_instances_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/member/award_instances", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_awards_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/member/awards", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_chart_data_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/member/chart_data", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/member", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/member/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_info_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/member/info", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_participation_credits_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/member/participation_credits", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_profile_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/member/profile", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_event_log_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/results/event_log", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/results/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_lap_chart_data_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/results/lap_chart_data", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_lap_data_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/results/lap_data", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_search_hosted_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/results/search_hosted", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_search_series_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/results/search_series", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_season_results_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/results/season_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/season", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_list_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/season/list", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_race_guide_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/season/race_guide", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_spectator_subsession_ids_detail_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/season/spectator_subsessionids_detail", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_spectator_subsession_ids_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/season/spectator_subsessionids", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_assets_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/series/assets", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/series", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/series/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_past_seasons_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/series/past_seasons", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_season_list_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/series/season_list", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_season_schedule_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/series/season_schedule", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_seasons_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/series/seasons", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_stats_series_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/series/stats_series", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/stats", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_bests_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/member_bests", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_career_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/member_career", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_division_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/member_division", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_recap_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/member_recap", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_recent_races_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/member_recent_races", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_summary_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/member_summary", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_yearly_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/member_yearly", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_driver_standings_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/season_driver_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_qualify_results_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/season_qualify_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_supersession_standings_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/season_supersession_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_team_standings_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/season_team_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_tt_results_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/season_tt_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_tt_standings_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/season_tt_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_world_records_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/stats/world_records", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_team_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/team", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_team_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/team/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_team_membership_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/team/membership", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_time_attack_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/time_attack", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_time_attack_member_season_results_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/time_attack/member_season_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_track_assets_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/track/assets", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_track_docs(configuration: &configuration::Configuration) -> Result, Error> { + + let uri_str = format!("{}/data/doc/track", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::IracingServiceMethodDocs>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_track_get_docs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/doc/track/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingServiceMethodDocs`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingServiceMethodDocs`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/driver_stats_api.rs b/crates/iracing-data-api-client/src/apis/driver_stats_api.rs new file mode 100644 index 00000000..24dba66b --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/driver_stats_api.rs @@ -0,0 +1,72 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_driver_stats_by_category`] +#[derive(Clone, Debug)] +pub struct GetDriverStatsByCategoryParams { + /// Racing category. + pub category: models::IracingCategory +} + + +/// struct for typed errors of method [`get_driver_stats_by_category`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetDriverStatsByCategoryError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_driver_stats_by_category(configuration: &configuration::Configuration, params: GetDriverStatsByCategoryParams) -> Result> { + + let uri_str = format!("{}/data/driver_stats_by_category/{category}", configuration.base_path, category=params.category.to_string()); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/hosted_api.rs b/crates/iracing-data-api-client/src/apis/hosted_api.rs new file mode 100644 index 00000000..63015d7e --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/hosted_api.rs @@ -0,0 +1,124 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_hosted_combined_sessions`] +#[derive(Clone, Debug)] +pub struct GetHostedCombinedSessionsParams { + /// If set, return only sessions using this car or track package ID. + pub package_id: Option +} + + +/// struct for typed errors of method [`get_hosted_combined_sessions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetHostedCombinedSessionsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_hosted_sessions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetHostedSessionsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +/// Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. +pub async fn get_hosted_combined_sessions(configuration: &configuration::Configuration, params: GetHostedCombinedSessionsParams) -> Result> { + + let uri_str = format!("{}/data/hosted/combined_sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.package_id { + req_builder = req_builder.query(&[("package_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. +pub async fn get_hosted_sessions(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/hosted/sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/league_api.rs b/crates/iracing-data-api-client/src/apis/league_api.rs new file mode 100644 index 00000000..fa989b49 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/league_api.rs @@ -0,0 +1,615 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_league`] +#[derive(Clone, Debug)] +pub struct GetLeagueParams { + pub league_id: f64, + /// For faster responses, only request when necessary. + pub include_licenses: Option +} + +/// struct for passing parameters to the method [`get_league_customer_league_sessions`] +#[derive(Clone, Debug)] +pub struct GetLeagueCustomerLeagueSessionsParams { + /// If true, return only sessions created by this user. + pub mine: Option, + /// If set, return only sessions using this car or track package ID. + pub package_id: Option +} + +/// struct for passing parameters to the method [`get_league_directory`] +#[derive(Clone, Debug)] +pub struct GetLeagueDirectoryParams { + /// Will search against league name, description, owner, and league ID. + pub search: Option, + /// One or more tags, comma-separated. + pub tag: Option, + /// If true include only leagues for which customer is a member. + pub restrict_to_member: Option, + /// If true include only leagues which are recruiting. + pub restrict_to_recruiting: Option, + /// If true include only leagues owned by a friend. + pub restrict_to_friends: Option, + /// If true include only leagues owned by a watched member. + pub restrict_to_watched: Option, + /// If set include leagues with at least this number of members. + pub minimum_roster_count: Option, + /// If set include leagues with no more than this number of members. + pub maximum_roster_count: Option, + /// First row of results to return. Defaults to 1. + pub lowerbound: Option, + /// Last row of results to return. Defaults to lowerbound + 39. + pub upperbound: Option, + /// One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance. + pub sort: Option, + /// One of asc or desc. Defaults to asc. + pub order: Option +} + +/// struct for passing parameters to the method [`get_league_membership`] +#[derive(Clone, Debug)] +pub struct GetLeagueMembershipParams { + /// If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + pub cust_id: Option, + pub include_league: Option +} + +/// struct for passing parameters to the method [`get_league_points_systems`] +#[derive(Clone, Debug)] +pub struct GetLeaguePointsSystemsParams { + pub league_id: f64, + /// If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + pub season_id: Option +} + +/// struct for passing parameters to the method [`get_league_roster`] +#[derive(Clone, Debug)] +pub struct GetLeagueRosterParams { + pub league_id: f64, + /// For faster responses, only request when necessary. + pub include_licenses: Option +} + +/// struct for passing parameters to the method [`get_league_season_sessions`] +#[derive(Clone, Debug)] +pub struct GetLeagueSeasonSessionsParams { + pub league_id: f64, + pub season_id: f64, + /// If true include only sessions for which results are available. + pub results_only: Option +} + +/// struct for passing parameters to the method [`get_league_season_standings`] +#[derive(Clone, Debug)] +pub struct GetLeagueSeasonStandingsParams { + pub league_id: f64, + pub season_id: f64, + pub car_class_id: Option, + /// If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. + pub car_id: Option +} + +/// struct for passing parameters to the method [`get_league_seasons`] +#[derive(Clone, Debug)] +pub struct GetLeagueSeasonsParams { + pub league_id: f64, + /// If true include seasons which are no longer active. + pub retired: Option +} + + +/// struct for typed errors of method [`get_league`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_customer_league_sessions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueCustomerLeagueSessionsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_directory`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueDirectoryError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_membership`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueMembershipError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_points_systems`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeaguePointsSystemsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_roster`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueRosterError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_season_sessions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueSeasonSessionsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_season_standings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueSeasonStandingsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_league_seasons`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLeagueSeasonsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_league(configuration: &configuration::Configuration, params: GetLeagueParams) -> Result> { + + let uri_str = format!("{}/data/league/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("league_id", ¶ms.league_id.to_string())]); + if let Some(ref param_value) = params.include_licenses { + req_builder = req_builder.query(&[("include_licenses", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_customer_league_sessions(configuration: &configuration::Configuration, params: GetLeagueCustomerLeagueSessionsParams) -> Result> { + + let uri_str = format!("{}/data/league/cust_league_sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.mine { + req_builder = req_builder.query(&[("mine", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.package_id { + req_builder = req_builder.query(&[("package_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_directory(configuration: &configuration::Configuration, params: GetLeagueDirectoryParams) -> Result> { + + let uri_str = format!("{}/data/league/directory", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.search { + req_builder = req_builder.query(&[("search", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.tag { + req_builder = req_builder.query(&[("tag", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.restrict_to_member { + req_builder = req_builder.query(&[("restrict_to_member", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.restrict_to_recruiting { + req_builder = req_builder.query(&[("restrict_to_recruiting", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.restrict_to_friends { + req_builder = req_builder.query(&[("restrict_to_friends", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.restrict_to_watched { + req_builder = req_builder.query(&[("restrict_to_watched", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.minimum_roster_count { + req_builder = req_builder.query(&[("minimum_roster_count", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.maximum_roster_count { + req_builder = req_builder.query(&[("maximum_roster_count", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.lowerbound { + req_builder = req_builder.query(&[("lowerbound", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.upperbound { + req_builder = req_builder.query(&[("upperbound", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.sort { + req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.order { + req_builder = req_builder.query(&[("order", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_membership(configuration: &configuration::Configuration, params: GetLeagueMembershipParams) -> Result> { + + let uri_str = format!("{}/data/league/membership", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.include_league { + req_builder = req_builder.query(&[("include_league", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_points_systems(configuration: &configuration::Configuration, params: GetLeaguePointsSystemsParams) -> Result> { + + let uri_str = format!("{}/data/league/get_points_systems", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("league_id", ¶ms.league_id.to_string())]); + if let Some(ref param_value) = params.season_id { + req_builder = req_builder.query(&[("season_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_roster(configuration: &configuration::Configuration, params: GetLeagueRosterParams) -> Result> { + + let uri_str = format!("{}/data/league/roster", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("league_id", ¶ms.league_id.to_string())]); + if let Some(ref param_value) = params.include_licenses { + req_builder = req_builder.query(&[("include_licenses", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_season_sessions(configuration: &configuration::Configuration, params: GetLeagueSeasonSessionsParams) -> Result> { + + let uri_str = format!("{}/data/league/season_sessions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("league_id", ¶ms.league_id.to_string())]); + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + if let Some(ref param_value) = params.results_only { + req_builder = req_builder.query(&[("results_only", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_season_standings(configuration: &configuration::Configuration, params: GetLeagueSeasonStandingsParams) -> Result> { + + let uri_str = format!("{}/data/league/season_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("league_id", ¶ms.league_id.to_string())]); + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + if let Some(ref param_value) = params.car_class_id { + req_builder = req_builder.query(&[("car_class_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.car_id { + req_builder = req_builder.query(&[("car_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_league_seasons(configuration: &configuration::Configuration, params: GetLeagueSeasonsParams) -> Result> { + + let uri_str = format!("{}/data/league/seasons", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("league_id", ¶ms.league_id.to_string())]); + if let Some(ref param_value) = params.retired { + req_builder = req_builder.query(&[("retired", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/lookup_api.rs b/crates/iracing-data-api-client/src/apis/lookup_api.rs new file mode 100644 index 00000000..e50e6902 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/lookup_api.rs @@ -0,0 +1,266 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_lookup_drivers`] +#[derive(Clone, Debug)] +pub struct GetLookupDriversParams { + /// A cust_id or partial name for which to search. + pub search_term: String, + /// Narrow the search to the roster of the given league. + pub league_id: Option +} + + +/// struct for typed errors of method [`get_lookup`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_countries`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupCountriesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_drivers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupDriversError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_flairs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupFlairsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lookup_licenses`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLookupLicensesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_lookup(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/lookup/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_countries(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/lookup/countries", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_drivers(configuration: &configuration::Configuration, params: GetLookupDriversParams) -> Result> { + + let uri_str = format!("{}/data/lookup/drivers", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("search_term", ¶ms.search_term.to_string())]); + if let Some(ref param_value) = params.league_id { + req_builder = req_builder.query(&[("league_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_flairs(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/lookup/flairs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lookup_licenses(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/lookup/licenses", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/member_api.rs b/crates/iracing-data-api-client/src/apis/member_api.rs new file mode 100644 index 00000000..74f120d7 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/member_api.rs @@ -0,0 +1,407 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_member`] +#[derive(Clone, Debug)] +pub struct GetMemberParams { + /// Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + pub cust_ids: String, + pub include_licenses: Option +} + +/// struct for passing parameters to the method [`get_member_award_instances`] +#[derive(Clone, Debug)] +pub struct GetMemberAwardInstancesParams { + pub award_id: f64, + /// Defaults to the authenticated member. + pub cust_id: Option +} + +/// struct for passing parameters to the method [`get_member_awards`] +#[derive(Clone, Debug)] +pub struct GetMemberAwardsParams { + /// Defaults to the authenticated member. + pub cust_id: Option +} + +/// struct for passing parameters to the method [`get_member_chart_data`] +#[derive(Clone, Debug)] +pub struct GetMemberChartDataParams { + /// 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + pub category_id: f64, + /// 1 - iRating; 2 - TT Rating; 3 - License/SR + pub chart_type: f64, + /// Defaults to the authenticated member. + pub cust_id: Option +} + +/// struct for passing parameters to the method [`get_member_profile`] +#[derive(Clone, Debug)] +pub struct GetMemberProfileParams { + /// Defaults to the authenticated member. + pub cust_id: Option +} + + +/// struct for typed errors of method [`get_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_award_instances`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberAwardInstancesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_awards`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberAwardsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_chart_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberChartDataError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_info`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberInfoError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_participation_credits`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberParticipationCreditsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_member_profile`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMemberProfileError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_member(configuration: &configuration::Configuration, params: GetMemberParams) -> Result> { + + let uri_str = format!("{}/data/member/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("cust_ids", ¶ms.cust_ids.to_string())]); + if let Some(ref param_value) = params.include_licenses { + req_builder = req_builder.query(&[("include_licenses", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_award_instances(configuration: &configuration::Configuration, params: GetMemberAwardInstancesParams) -> Result> { + + let uri_str = format!("{}/data/member/award_instances", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("award_id", ¶ms.award_id.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_awards(configuration: &configuration::Configuration, params: GetMemberAwardsParams) -> Result> { + + let uri_str = format!("{}/data/member/awards", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_chart_data(configuration: &configuration::Configuration, params: GetMemberChartDataParams) -> Result> { + + let uri_str = format!("{}/data/member/chart_data", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("category_id", ¶ms.category_id.to_string())]); + req_builder = req_builder.query(&[("chart_type", ¶ms.chart_type.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_info(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/member/info", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_participation_credits(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/member/participation_credits", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_member_profile(configuration: &configuration::Configuration, params: GetMemberProfileParams) -> Result> { + + let uri_str = format!("{}/data/member/profile", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/mod.rs b/crates/iracing-data-api-client/src/apis/mod.rs new file mode 100644 index 00000000..35a07b16 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/mod.rs @@ -0,0 +1,132 @@ +use std::error; +use std::fmt; + +#[derive(Debug, Clone)] +pub struct ResponseContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + +/// Internal use only +/// A content type supported by this client. +#[allow(dead_code)] +enum ContentType { + Json, + Text, + Unsupported(String) +} + +impl From<&str> for ContentType { + fn from(content_type: &str) -> Self { + if content_type.starts_with("application") && content_type.contains("json") { + return Self::Json; + } else if content_type.starts_with("text/plain") { + return Self::Text; + } else { + return Self::Unsupported(content_type.to_string()); + } + } +} + +pub mod auth_api; +pub mod car_api; +pub mod carclass_api; +pub mod constants_api; +pub mod doc_api; +pub mod driver_stats_api; +pub mod hosted_api; +pub mod league_api; +pub mod lookup_api; +pub mod member_api; +pub mod results_api; +pub mod season_api; +pub mod series_api; +pub mod stats_api; +pub mod team_api; +pub mod time_attack_api; +pub mod track_api; + +pub mod configuration; diff --git a/crates/iracing-data-api-client/src/apis/results_api.rs b/crates/iracing-data-api-client/src/apis/results_api.rs new file mode 100644 index 00000000..6b4e82cb --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/results_api.rs @@ -0,0 +1,555 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_results`] +#[derive(Clone, Debug)] +pub struct GetResultsParams { + pub subsession_id: f64, + pub include_licenses: Option +} + +/// struct for passing parameters to the method [`get_results_event_log`] +#[derive(Clone, Debug)] +pub struct GetResultsEventLogParams { + pub subsession_id: f64, + /// The main event is 0; the preceding event is -1, and so on. + pub simsession_number: f64 +} + +/// struct for passing parameters to the method [`get_results_lap_chart_data`] +#[derive(Clone, Debug)] +pub struct GetResultsLapChartDataParams { + pub subsession_id: f64, + /// The main event is 0; the preceding event is -1, and so on. + pub simsession_number: f64 +} + +/// struct for passing parameters to the method [`get_results_lap_data`] +#[derive(Clone, Debug)] +pub struct GetResultsLapDataParams { + pub subsession_id: f64, + /// The main event is 0; the preceding event is -1, and so on. + pub simsession_number: f64, + /// Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included. + pub cust_id: Option, + /// Required if the subsession was a team event. + pub team_id: Option +} + +/// struct for passing parameters to the method [`get_results_search_hosted`] +#[derive(Clone, Debug)] +pub struct GetResultsSearchHostedParams { + /// Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + pub start_range_begin: Option, + /// ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + pub start_range_end: Option, + /// Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + pub finish_range_begin: Option, + /// ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + pub finish_range_end: Option, + /// The participant's customer ID. Ignored if team_id is supplied. + pub cust_id: Option, + /// The team ID to search for. Takes priority over cust_id if both are supplied. + pub team_id: Option, + /// The host's customer ID. + pub host_cust_id: Option, + /// Part or all of the session's name. + pub session_name: Option, + /// Include only results for the league with this ID. + pub league_id: Option, + /// Include only results for the league season with this ID. + pub league_season_id: Option, + /// One of the cars used by the session. + pub car_id: Option, + /// The ID of the track used by the session. + pub track_id: Option, + /// Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + pub category_ids: Option +} + +/// struct for passing parameters to the method [`get_results_search_series`] +#[derive(Clone, Debug)] +pub struct GetResultsSearchSeriesParams { + /// Required when using season_quarter. + pub season_year: Option, + /// Required when using season_year. + pub season_quarter: Option, + /// Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + pub start_range_begin: Option, + /// ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + pub start_range_end: Option, + /// Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + pub finish_range_begin: Option, + /// ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + pub finish_range_end: Option, + /// Include only sessions in which this customer participated. Ignored if team_id is supplied. + pub cust_id: Option, + /// Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. + pub team_id: Option, + /// Include only sessions for series with this ID. + pub series_id: Option, + /// Include only sessions with this race week number. + pub race_week_num: Option, + /// If true, include only sessions earning championship points. Defaults to all. + pub official_only: Option, + /// Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + pub event_types: Option, + /// License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + pub category_ids: Option +} + +/// struct for passing parameters to the method [`get_results_season_results`] +#[derive(Clone, Debug)] +pub struct GetResultsSeasonResultsParams { + pub season_id: f64, + /// Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race + pub event_type: Option, + /// The first race week of a season is 0. + pub race_week_num: Option +} + + +/// struct for typed errors of method [`get_results`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_event_log`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsEventLogError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_lap_chart_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsLapChartDataError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_lap_data`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsLapDataError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_search_hosted`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsSearchHostedError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_search_series`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsSearchSeriesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_results_season_results`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetResultsSeasonResultsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_results(configuration: &configuration::Configuration, params: GetResultsParams) -> Result> { + + let uri_str = format!("{}/data/results/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("subsession_id", ¶ms.subsession_id.to_string())]); + if let Some(ref param_value) = params.include_licenses { + req_builder = req_builder.query(&[("include_licenses", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_event_log(configuration: &configuration::Configuration, params: GetResultsEventLogParams) -> Result> { + + let uri_str = format!("{}/data/results/event_log", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("subsession_id", ¶ms.subsession_id.to_string())]); + req_builder = req_builder.query(&[("simsession_number", ¶ms.simsession_number.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_lap_chart_data(configuration: &configuration::Configuration, params: GetResultsLapChartDataParams) -> Result> { + + let uri_str = format!("{}/data/results/lap_chart_data", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("subsession_id", ¶ms.subsession_id.to_string())]); + req_builder = req_builder.query(&[("simsession_number", ¶ms.simsession_number.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_lap_data(configuration: &configuration::Configuration, params: GetResultsLapDataParams) -> Result> { + + let uri_str = format!("{}/data/results/lap_data", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("subsession_id", ¶ms.subsession_id.to_string())]); + req_builder = req_builder.query(&[("simsession_number", ¶ms.simsession_number.to_string())]); + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.team_id { + req_builder = req_builder.query(&[("team_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_search_hosted(configuration: &configuration::Configuration, params: GetResultsSearchHostedParams) -> Result> { + + let uri_str = format!("{}/data/results/search_hosted", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.start_range_begin { + req_builder = req_builder.query(&[("start_range_begin", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.start_range_end { + req_builder = req_builder.query(&[("start_range_end", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.finish_range_begin { + req_builder = req_builder.query(&[("finish_range_begin", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.finish_range_end { + req_builder = req_builder.query(&[("finish_range_end", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.team_id { + req_builder = req_builder.query(&[("team_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.host_cust_id { + req_builder = req_builder.query(&[("host_cust_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.session_name { + req_builder = req_builder.query(&[("session_name", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.league_id { + req_builder = req_builder.query(&[("league_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.league_season_id { + req_builder = req_builder.query(&[("league_season_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.car_id { + req_builder = req_builder.query(&[("car_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.track_id { + req_builder = req_builder.query(&[("track_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.category_ids { + req_builder = req_builder.query(&[("category_ids", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_search_series(configuration: &configuration::Configuration, params: GetResultsSearchSeriesParams) -> Result> { + + let uri_str = format!("{}/data/results/search_series", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.season_year { + req_builder = req_builder.query(&[("season_year", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.season_quarter { + req_builder = req_builder.query(&[("season_quarter", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.start_range_begin { + req_builder = req_builder.query(&[("start_range_begin", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.start_range_end { + req_builder = req_builder.query(&[("start_range_end", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.finish_range_begin { + req_builder = req_builder.query(&[("finish_range_begin", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.finish_range_end { + req_builder = req_builder.query(&[("finish_range_end", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.team_id { + req_builder = req_builder.query(&[("team_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.series_id { + req_builder = req_builder.query(&[("series_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.race_week_num { + req_builder = req_builder.query(&[("race_week_num", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.official_only { + req_builder = req_builder.query(&[("official_only", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.event_types { + req_builder = req_builder.query(&[("event_types", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.category_ids { + req_builder = req_builder.query(&[("category_ids", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_results_season_results(configuration: &configuration::Configuration, params: GetResultsSeasonResultsParams) -> Result> { + + let uri_str = format!("{}/data/results/season_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + if let Some(ref param_value) = params.event_type { + req_builder = req_builder.query(&[("event_type", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.race_week_num { + req_builder = req_builder.query(&[("race_week_num", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/season_api.rs b/crates/iracing-data-api-client/src/apis/season_api.rs new file mode 100644 index 00000000..4d0b3dad --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/season_api.rs @@ -0,0 +1,264 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_season_list`] +#[derive(Clone, Debug)] +pub struct GetSeasonListParams { + pub season_year: f64, + pub season_quarter: f64 +} + +/// struct for passing parameters to the method [`get_season_race_guide`] +#[derive(Clone, Debug)] +pub struct GetSeasonRaceGuideParams { + /// ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. + pub from: Option, + /// Include sessions which start before 'from' but end after. + pub include_end_after_from: Option +} + +/// struct for passing parameters to the method [`get_season_spectator_subsession_ids`] +#[derive(Clone, Debug)] +pub struct GetSeasonSpectatorSubsessionIdsParams { + /// Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + pub event_types: Option> +} + +/// struct for passing parameters to the method [`get_season_spectator_subsession_ids_detail`] +#[derive(Clone, Debug)] +pub struct GetSeasonSpectatorSubsessionIdsDetailParams { + /// Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + pub event_types: Option>, + /// Seasons to include in the search. Defaults to all. ?season_ids=513,937 + pub season_ids: Option> +} + + +/// struct for typed errors of method [`get_season_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonListError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_race_guide`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonRaceGuideError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_spectator_subsession_ids`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonSpectatorSubsessionIdsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_season_spectator_subsession_ids_detail`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeasonSpectatorSubsessionIdsDetailError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_season_list(configuration: &configuration::Configuration, params: GetSeasonListParams) -> Result> { + + let uri_str = format!("{}/data/season/list", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_year", ¶ms.season_year.to_string())]); + req_builder = req_builder.query(&[("season_quarter", ¶ms.season_quarter.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_race_guide(configuration: &configuration::Configuration, params: GetSeasonRaceGuideParams) -> Result> { + + let uri_str = format!("{}/data/season/race_guide", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.from { + req_builder = req_builder.query(&[("from", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.include_end_after_from { + req_builder = req_builder.query(&[("include_end_after_from", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_spectator_subsession_ids(configuration: &configuration::Configuration, params: GetSeasonSpectatorSubsessionIdsParams) -> Result> { + + let uri_str = format!("{}/data/season/spectator_subsessionids", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.event_types { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("event_types".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("event_types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_season_spectator_subsession_ids_detail(configuration: &configuration::Configuration, params: GetSeasonSpectatorSubsessionIdsDetailParams) -> Result> { + + let uri_str = format!("{}/data/season/spectator_subsessionids_detail", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.event_types { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("event_types".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("event_types", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = params.season_ids { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("season_ids".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("season_ids", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/series_api.rs b/crates/iracing-data-api-client/src/apis/series_api.rs new file mode 100644 index 00000000..6cb38a93 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/series_api.rs @@ -0,0 +1,397 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_series_past_seasons`] +#[derive(Clone, Debug)] +pub struct GetSeriesPastSeasonsParams { + pub series_id: f64 +} + +/// struct for passing parameters to the method [`get_series_season_list`] +#[derive(Clone, Debug)] +pub struct GetSeriesSeasonListParams { + pub include_series: Option, + pub season_year: Option, + pub season_quarter: Option +} + +/// struct for passing parameters to the method [`get_series_season_schedule`] +#[derive(Clone, Debug)] +pub struct GetSeriesSeasonScheduleParams { + pub season_id: f64 +} + +/// struct for passing parameters to the method [`get_series_seasons`] +#[derive(Clone, Debug)] +pub struct GetSeriesSeasonsParams { + pub include_series: Option, + /// To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + pub season_year: Option, + /// To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + pub season_quarter: Option +} + + +/// struct for typed errors of method [`get_series`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_assets`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesAssetsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_past_seasons`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesPastSeasonsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_season_list`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesSeasonListError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_season_schedule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesSeasonScheduleError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_seasons`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesSeasonsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_series_stats_series`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSeriesStatsSeriesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_series(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/series/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_assets(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/series/assets", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_past_seasons(configuration: &configuration::Configuration, params: GetSeriesPastSeasonsParams) -> Result> { + + let uri_str = format!("{}/data/series/past_seasons", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("series_id", ¶ms.series_id.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_season_list(configuration: &configuration::Configuration, params: GetSeriesSeasonListParams) -> Result> { + + let uri_str = format!("{}/data/series/season_list", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.include_series { + req_builder = req_builder.query(&[("include_series", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.season_year { + req_builder = req_builder.query(&[("season_year", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.season_quarter { + req_builder = req_builder.query(&[("season_quarter", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_season_schedule(configuration: &configuration::Configuration, params: GetSeriesSeasonScheduleParams) -> Result> { + + let uri_str = format!("{}/data/series/season_schedule", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_seasons(configuration: &configuration::Configuration, params: GetSeriesSeasonsParams) -> Result> { + + let uri_str = format!("{}/data/series/seasons", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.include_series { + req_builder = req_builder.query(&[("include_series", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.season_year { + req_builder = req_builder.query(&[("season_year", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.season_quarter { + req_builder = req_builder.query(&[("season_quarter", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_series_stats_series(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/series/stats_series", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/stats_api.rs b/crates/iracing-data-api-client/src/apis/stats_api.rs new file mode 100644 index 00000000..873282f2 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/stats_api.rs @@ -0,0 +1,880 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_stats_member_bests`] +#[derive(Clone, Debug)] +pub struct GetStatsMemberBestsParams { + /// Defaults to the authenticated member. + pub cust_id: Option, + /// First call should exclude car_id; use cars_driven list in return for subsequent calls. + pub car_id: Option +} + +/// struct for passing parameters to the method [`get_stats_member_career`] +#[derive(Clone, Debug)] +pub struct GetStatsMemberCareerParams { + /// Defaults to the authenticated member. + pub cust_id: Option +} + +/// struct for passing parameters to the method [`get_stats_member_division`] +#[derive(Clone, Debug)] +pub struct GetStatsMemberDivisionParams { + pub season_id: f64, + /// The event type code for the division type: 4 - Time Trial; 5 - Race + pub event_type: f64 +} + +/// struct for passing parameters to the method [`get_stats_member_recap`] +#[derive(Clone, Debug)] +pub struct GetStatsMemberRecapParams { + /// Defaults to the authenticated member. + pub cust_id: Option, + /// Season year; if not supplied the current calendar year (UTC) is used. + pub year: Option, + /// Season (quarter) within the year; if not supplied the recap will be for the entire year. + pub season: Option +} + +/// struct for passing parameters to the method [`get_stats_member_recent_races`] +#[derive(Clone, Debug)] +pub struct GetStatsMemberRecentRacesParams { + /// Defaults to the authenticated member. + pub cust_id: Option +} + +/// struct for passing parameters to the method [`get_stats_member_summary`] +#[derive(Clone, Debug)] +pub struct GetStatsMemberSummaryParams { + /// Defaults to the authenticated member. + pub cust_id: Option +} + +/// struct for passing parameters to the method [`get_stats_member_yearly`] +#[derive(Clone, Debug)] +pub struct GetStatsMemberYearlyParams { + /// Defaults to the authenticated member. + pub cust_id: Option +} + +/// struct for passing parameters to the method [`get_stats_season_driver_standings`] +#[derive(Clone, Debug)] +pub struct GetStatsSeasonDriverStandingsParams { + pub season_id: f64, + pub car_class_id: f64, + pub division: Option, + /// The first race week of a season is 0. + pub race_week_num: Option +} + +/// struct for passing parameters to the method [`get_stats_season_qualify_results`] +#[derive(Clone, Debug)] +pub struct GetStatsSeasonQualifyResultsParams { + pub season_id: f64, + pub car_class_id: f64, + /// The first race week of a season is 0. + pub race_week_num: f64, + pub division: Option +} + +/// struct for passing parameters to the method [`get_stats_season_supersession_standings`] +#[derive(Clone, Debug)] +pub struct GetStatsSeasonSupersessionStandingsParams { + pub season_id: f64, + pub car_class_id: f64, + pub division: Option, + /// The first race week of a season is 0. + pub race_week_num: Option +} + +/// struct for passing parameters to the method [`get_stats_season_team_standings`] +#[derive(Clone, Debug)] +pub struct GetStatsSeasonTeamStandingsParams { + pub season_id: f64, + pub car_class_id: f64, + /// The first race week of a season is 0. + pub race_week_num: Option +} + +/// struct for passing parameters to the method [`get_stats_season_time_trial_results`] +#[derive(Clone, Debug)] +pub struct GetStatsSeasonTimeTrialResultsParams { + pub season_id: f64, + pub car_class_id: f64, + /// The first race week of a season is 0. + pub race_week_num: f64, + pub division: Option +} + +/// struct for passing parameters to the method [`get_stats_season_time_trial_standings`] +#[derive(Clone, Debug)] +pub struct GetStatsSeasonTimeTrialStandingsParams { + pub season_id: f64, + pub car_class_id: f64, + pub division: Option, + /// The first race week of a season is 0. + pub race_week_num: Option +} + +/// struct for passing parameters to the method [`get_stats_world_records`] +#[derive(Clone, Debug)] +pub struct GetStatsWorldRecordsParams { + pub car_id: f64, + pub track_id: f64, + /// Limit best times to a given year. + pub season_year: Option, + /// Limit best times to a given quarter; only applicable when year is used. + pub season_quarter: Option +} + + +/// struct for typed errors of method [`get_stats_member_bests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberBestsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_career`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberCareerError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_division`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberDivisionError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_recap`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberRecapError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_recent_races`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberRecentRacesError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_summary`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberSummaryError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_member_yearly`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsMemberYearlyError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_driver_standings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonDriverStandingsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_qualify_results`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonQualifyResultsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_supersession_standings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonSupersessionStandingsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_team_standings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonTeamStandingsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_time_trial_results`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonTimeTrialResultsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_season_time_trial_standings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsSeasonTimeTrialStandingsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stats_world_records`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStatsWorldRecordsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_stats_member_bests(configuration: &configuration::Configuration, params: GetStatsMemberBestsParams) -> Result> { + + let uri_str = format!("{}/data/stats/member_bests", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.car_id { + req_builder = req_builder.query(&[("car_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_career(configuration: &configuration::Configuration, params: GetStatsMemberCareerParams) -> Result> { + + let uri_str = format!("{}/data/stats/member_career", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_division(configuration: &configuration::Configuration, params: GetStatsMemberDivisionParams) -> Result> { + + let uri_str = format!("{}/data/stats/member_division", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + req_builder = req_builder.query(&[("event_type", ¶ms.event_type.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_recap(configuration: &configuration::Configuration, params: GetStatsMemberRecapParams) -> Result> { + + let uri_str = format!("{}/data/stats/member_recap", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.year { + req_builder = req_builder.query(&[("year", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.season { + req_builder = req_builder.query(&[("season", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_recent_races(configuration: &configuration::Configuration, params: GetStatsMemberRecentRacesParams) -> Result> { + + let uri_str = format!("{}/data/stats/member_recent_races", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_summary(configuration: &configuration::Configuration, params: GetStatsMemberSummaryParams) -> Result> { + + let uri_str = format!("{}/data/stats/member_summary", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_member_yearly(configuration: &configuration::Configuration, params: GetStatsMemberYearlyParams) -> Result> { + + let uri_str = format!("{}/data/stats/member_yearly", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = params.cust_id { + req_builder = req_builder.query(&[("cust_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_driver_standings(configuration: &configuration::Configuration, params: GetStatsSeasonDriverStandingsParams) -> Result> { + + let uri_str = format!("{}/data/stats/season_driver_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + req_builder = req_builder.query(&[("car_class_id", ¶ms.car_class_id.to_string())]); + if let Some(ref param_value) = params.division { + req_builder = req_builder.query(&[("division", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.race_week_num { + req_builder = req_builder.query(&[("race_week_num", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_qualify_results(configuration: &configuration::Configuration, params: GetStatsSeasonQualifyResultsParams) -> Result> { + + let uri_str = format!("{}/data/stats/season_qualify_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + req_builder = req_builder.query(&[("car_class_id", ¶ms.car_class_id.to_string())]); + req_builder = req_builder.query(&[("race_week_num", ¶ms.race_week_num.to_string())]); + if let Some(ref param_value) = params.division { + req_builder = req_builder.query(&[("division", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_supersession_standings(configuration: &configuration::Configuration, params: GetStatsSeasonSupersessionStandingsParams) -> Result> { + + let uri_str = format!("{}/data/stats/season_supersession_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + req_builder = req_builder.query(&[("car_class_id", ¶ms.car_class_id.to_string())]); + if let Some(ref param_value) = params.division { + req_builder = req_builder.query(&[("division", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.race_week_num { + req_builder = req_builder.query(&[("race_week_num", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_team_standings(configuration: &configuration::Configuration, params: GetStatsSeasonTeamStandingsParams) -> Result> { + + let uri_str = format!("{}/data/stats/season_team_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + req_builder = req_builder.query(&[("car_class_id", ¶ms.car_class_id.to_string())]); + if let Some(ref param_value) = params.race_week_num { + req_builder = req_builder.query(&[("race_week_num", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_time_trial_results(configuration: &configuration::Configuration, params: GetStatsSeasonTimeTrialResultsParams) -> Result> { + + let uri_str = format!("{}/data/stats/season_time_trial_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + req_builder = req_builder.query(&[("car_class_id", ¶ms.car_class_id.to_string())]); + req_builder = req_builder.query(&[("race_week_num", ¶ms.race_week_num.to_string())]); + if let Some(ref param_value) = params.division { + req_builder = req_builder.query(&[("division", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_season_time_trial_standings(configuration: &configuration::Configuration, params: GetStatsSeasonTimeTrialStandingsParams) -> Result> { + + let uri_str = format!("{}/data/stats/season_time_trial_standings", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("season_id", ¶ms.season_id.to_string())]); + req_builder = req_builder.query(&[("car_class_id", ¶ms.car_class_id.to_string())]); + if let Some(ref param_value) = params.division { + req_builder = req_builder.query(&[("division", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.race_week_num { + req_builder = req_builder.query(&[("race_week_num", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_stats_world_records(configuration: &configuration::Configuration, params: GetStatsWorldRecordsParams) -> Result> { + + let uri_str = format!("{}/data/stats/world_records", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("car_id", ¶ms.car_id.to_string())]); + req_builder = req_builder.query(&[("track_id", ¶ms.track_id.to_string())]); + if let Some(ref param_value) = params.season_year { + req_builder = req_builder.query(&[("season_year", ¶m_value.to_string())]); + } + if let Some(ref param_value) = params.season_quarter { + req_builder = req_builder.query(&[("season_quarter", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/team_api.rs b/crates/iracing-data-api-client/src/apis/team_api.rs new file mode 100644 index 00000000..95d9eec8 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/team_api.rs @@ -0,0 +1,124 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_team`] +#[derive(Clone, Debug)] +pub struct GetTeamParams { + pub team_id: f64, + /// For faster responses, only request when necessary. + pub include_licenses: Option +} + + +/// struct for typed errors of method [`get_team`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_team_membership`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamMembershipError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_team(configuration: &configuration::Configuration, params: GetTeamParams) -> Result> { + + let uri_str = format!("{}/data/team/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("team_id", ¶ms.team_id.to_string())]); + if let Some(ref param_value) = params.include_licenses { + req_builder = req_builder.query(&[("include_licenses", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_team_membership(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/team/membership", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/time_attack_api.rs b/crates/iracing-data-api-client/src/apis/time_attack_api.rs new file mode 100644 index 00000000..9c59cad9 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/time_attack_api.rs @@ -0,0 +1,72 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + +/// struct for passing parameters to the method [`get_time_attack_member_season_results`] +#[derive(Clone, Debug)] +pub struct GetTimeAttackMemberSeasonResultsParams { + pub ta_comp_season_id: f64 +} + + +/// struct for typed errors of method [`get_time_attack_member_season_results`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTimeAttackMemberSeasonResultsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_time_attack_member_season_results(configuration: &configuration::Configuration, params: GetTimeAttackMemberSeasonResultsParams) -> Result> { + + let uri_str = format!("{}/data/time_attack/member_season_results", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + req_builder = req_builder.query(&[("ta_comp_season_id", ¶ms.ta_comp_season_id.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/apis/track_api.rs b/crates/iracing-data-api-client/src/apis/track_api.rs new file mode 100644 index 00000000..d94915c7 --- /dev/null +++ b/crates/iracing-data-api-client/src/apis/track_api.rs @@ -0,0 +1,112 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`get_track`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTrackError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_track_assets`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTrackAssetsError { + Status401(models::ErrorResponse), + Status429(models::ErrorResponse), + Status503(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn get_track(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/track/get", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_track_assets(configuration: &configuration::Configuration) -> Result> { + + let uri_str = format!("{}/data/track/assets", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IracingApiResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IracingApiResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/crates/iracing-data-api-client/src/lib.rs b/crates/iracing-data-api-client/src/lib.rs new file mode 100644 index 00000000..e1520628 --- /dev/null +++ b/crates/iracing-data-api-client/src/lib.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] + +extern crate serde_repr; +extern crate serde; +extern crate serde_json; +extern crate url; +extern crate reqwest; + +pub mod apis; +pub mod models; diff --git a/crates/iracing-data-api-client/src/models/error_response.rs b/crates/iracing-data-api-client/src/models/error_response.rs new file mode 100644 index 00000000..1fc724d0 --- /dev/null +++ b/crates/iracing-data-api-client/src/models/error_response.rs @@ -0,0 +1,33 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ErrorResponse { + #[serde(rename = "error")] + pub error: String, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option, +} + +impl ErrorResponse { + pub fn new(error: String) -> ErrorResponse { + ErrorResponse { + error, + message: None, + note: None, + } + } +} + diff --git a/crates/iracing-data-api-client/src/models/iracing_api_response.rs b/crates/iracing-data-api-client/src/models/iracing_api_response.rs new file mode 100644 index 00000000..cfd0cdb6 --- /dev/null +++ b/crates/iracing-data-api-client/src/models/iracing_api_response.rs @@ -0,0 +1,33 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IracingApiResponse : Response from iRacing `/data` API. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IracingApiResponse { + /// A link to the cached data + #[serde(rename = "link")] + pub link: String, + #[serde(rename = "expires")] + pub expires: String, +} + +impl IracingApiResponse { + /// Response from iRacing `/data` API. + pub fn new(link: String, expires: String) -> IracingApiResponse { + IracingApiResponse { + link, + expires, + } + } +} + diff --git a/crates/iracing-data-api-client/src/models/iracing_category.rs b/crates/iracing-data-api-client/src/models/iracing_category.rs new file mode 100644 index 00000000..09c8adda --- /dev/null +++ b/crates/iracing-data-api-client/src/models/iracing_category.rs @@ -0,0 +1,51 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IracingCategory : Racing category. +/// Racing category. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IracingCategory { + #[serde(rename = "oval")] + Oval, + #[serde(rename = "road")] + Road, + #[serde(rename = "dirt_road")] + DirtRoad, + #[serde(rename = "dirt_oval")] + DirtOval, + #[serde(rename = "sports_car")] + SportsCar, + #[serde(rename = "formula_car")] + FormulaCar, + +} + +impl std::fmt::Display for IracingCategory { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Oval => write!(f, "oval"), + Self::Road => write!(f, "road"), + Self::DirtRoad => write!(f, "dirt_road"), + Self::DirtOval => write!(f, "dirt_oval"), + Self::SportsCar => write!(f, "sports_car"), + Self::FormulaCar => write!(f, "formula_car"), + } + } +} + +impl Default for IracingCategory { + fn default() -> IracingCategory { + Self::Oval + } +} + diff --git a/crates/iracing-data-api-client/src/models/iracing_division.rs b/crates/iracing-data-api-client/src/models/iracing_division.rs new file mode 100644 index 00000000..5e08d2b4 --- /dev/null +++ b/crates/iracing-data-api-client/src/models/iracing_division.rs @@ -0,0 +1,66 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IracingDivision : iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. +/// iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IracingDivision { + #[serde(rename = "0")] + Variant0, + #[serde(rename = "1")] + Variant1, + #[serde(rename = "2")] + Variant2, + #[serde(rename = "3")] + Variant3, + #[serde(rename = "4")] + Variant4, + #[serde(rename = "5")] + Variant5, + #[serde(rename = "6")] + Variant6, + #[serde(rename = "7")] + Variant7, + #[serde(rename = "8")] + Variant8, + #[serde(rename = "9")] + Variant9, + #[serde(rename = "10")] + Variant10, + +} + +impl std::fmt::Display for IracingDivision { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Variant0 => write!(f, "0"), + Self::Variant1 => write!(f, "1"), + Self::Variant2 => write!(f, "2"), + Self::Variant3 => write!(f, "3"), + Self::Variant4 => write!(f, "4"), + Self::Variant5 => write!(f, "5"), + Self::Variant6 => write!(f, "6"), + Self::Variant7 => write!(f, "7"), + Self::Variant8 => write!(f, "8"), + Self::Variant9 => write!(f, "9"), + Self::Variant10 => write!(f, "10"), + } + } +} + +impl Default for IracingDivision { + fn default() -> IracingDivision { + Self::Variant0 + } +} + diff --git a/crates/iracing-data-api-client/src/models/iracing_event_type.rs b/crates/iracing-data-api-client/src/models/iracing_event_type.rs new file mode 100644 index 00000000..abf5dd49 --- /dev/null +++ b/crates/iracing-data-api-client/src/models/iracing_event_type.rs @@ -0,0 +1,45 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IracingEventType : iRacing Event Type +/// iRacing Event Type +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IracingEventType { + #[serde(rename = "2")] + Variant2, + #[serde(rename = "3")] + Variant3, + #[serde(rename = "4")] + Variant4, + #[serde(rename = "5")] + Variant5, + +} + +impl std::fmt::Display for IracingEventType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Variant2 => write!(f, "2"), + Self::Variant3 => write!(f, "3"), + Self::Variant4 => write!(f, "4"), + Self::Variant5 => write!(f, "5"), + } + } +} + +impl Default for IracingEventType { + fn default() -> IracingEventType { + Self::Variant2 + } +} + diff --git a/crates/iracing-data-api-client/src/models/iracing_service_method_docs.rs b/crates/iracing-data-api-client/src/models/iracing_service_method_docs.rs new file mode 100644 index 00000000..71f98efe --- /dev/null +++ b/crates/iracing-data-api-client/src/models/iracing_service_method_docs.rs @@ -0,0 +1,35 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IracingServiceMethodDocs : An iRacing API Service Method object. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IracingServiceMethodDocs { + #[serde(rename = "link")] + pub link: String, + #[serde(rename = "parameters")] + pub parameters: std::collections::HashMap, + #[serde(rename = "expirationSeconds", skip_serializing_if = "Option::is_none")] + pub expiration_seconds: Option, +} + +impl IracingServiceMethodDocs { + /// An iRacing API Service Method object. + pub fn new(link: String, parameters: std::collections::HashMap) -> IracingServiceMethodDocs { + IracingServiceMethodDocs { + link, + parameters, + expiration_seconds: None, + } + } +} + diff --git a/crates/iracing-data-api-client/src/models/iracing_service_method_parameters_docs.rs b/crates/iracing-data-api-client/src/models/iracing_service_method_parameters_docs.rs new file mode 100644 index 00000000..adc56b64 --- /dev/null +++ b/crates/iracing-data-api-client/src/models/iracing_service_method_parameters_docs.rs @@ -0,0 +1,35 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IracingServiceMethodParametersDocs : An iRacing API Service Method Parameters object. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IracingServiceMethodParametersDocs { + #[serde(rename = "type")] + pub r#type: String, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, +} + +impl IracingServiceMethodParametersDocs { + /// An iRacing API Service Method Parameters object. + pub fn new(r#type: String) -> IracingServiceMethodParametersDocs { + IracingServiceMethodParametersDocs { + r#type, + note: None, + required: None, + } + } +} + diff --git a/crates/iracing-data-api-client/src/models/mod.rs b/crates/iracing-data-api-client/src/models/mod.rs new file mode 100644 index 00000000..bbde2f80 --- /dev/null +++ b/crates/iracing-data-api-client/src/models/mod.rs @@ -0,0 +1,16 @@ +pub mod error_response; +pub use self::error_response::ErrorResponse; +pub mod iracing_api_response; +pub use self::iracing_api_response::IracingApiResponse; +pub mod iracing_category; +pub use self::iracing_category::IracingCategory; +pub mod iracing_division; +pub use self::iracing_division::IracingDivision; +pub mod iracing_event_type; +pub use self::iracing_event_type::IracingEventType; +pub mod iracing_service_method_docs; +pub use self::iracing_service_method_docs::IracingServiceMethodDocs; +pub mod iracing_service_method_parameters_docs; +pub use self::iracing_service_method_parameters_docs::IracingServiceMethodParametersDocs; +pub mod post_auth_request; +pub use self::post_auth_request::PostAuthRequest; diff --git a/crates/iracing-data-api-client/src/models/post_auth_request.rs b/crates/iracing-data-api-client/src/models/post_auth_request.rs new file mode 100644 index 00000000..d42f2892 --- /dev/null +++ b/crates/iracing-data-api-client/src/models/post_auth_request.rs @@ -0,0 +1,30 @@ +/* + * iRacing `/data` API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct PostAuthRequest { + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "password")] + pub password: String, +} + +impl PostAuthRequest { + pub fn new(email: String, password: String) -> PostAuthRequest { + PostAuthRequest { + email, + password, + } + } +} + diff --git a/dist-workspace.toml b/dist-workspace.toml index d8a065af..c98bfb5e 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -1,12 +1,32 @@ # dist-workspace.toml -# Declares the npm packages managed by dist (cargo-dist). +# Declares the npm and cargo packages managed by dist (cargo-dist). # See: https://axodotdev.github.io/cargo-dist/book/quickstart/javascript.html [workspace] members = [ + "cargo:./crates/iracing-data-api-client/", "npm:./packages/oauth/schema/", "npm:./packages/oauth/client/", "npm:./packages/api/schema/", "npm:./packages/api/client/fetch/", "npm:./packages/api/client/axios/", ] + +# Config for 'dist' +[dist] +# Target platforms to build apps for (Rust target-triple syntax) +targets = [ + "aarch64-apple-darwin", + "x86_64-apple-darwin", + "aarch64-pc-windows-msvc", + "x86_64-pc-windows-msvc", + "aarch64-unknown-linux-gnu", + "x86_64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "x86_64-unknown-linux-musl", + "wasm32-unknown-unknown", +] +# The preferred dist version to use in CI (Cargo.toml SemVer syntax) +cargo-dist-version = "0.30.4" +# The installers to generate for each app +installers = [] diff --git a/docs/RELEASING.md b/docs/RELEASING.md index 08e85473..66ca1031 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -185,3 +185,9 @@ dist init --yes ``` The workspace members are declared in [`dist-workspace.toml`](../dist-workspace.toml). + +For the Rust library crate (`crates/iracing-data-api-client`), use an explicit tag when planning or releasing with `dist`: + +```bash +dist plan --tag=iracing-data-api-client-v0.0.1 +``` diff --git a/examples/oauth-password-limited/src/index.ts b/examples/oauth-password-limited/src/index.ts index 957f86e8..ec8735f4 100644 --- a/examples/oauth-password-limited/src/index.ts +++ b/examples/oauth-password-limited/src/index.ts @@ -294,7 +294,7 @@ async function main() { let session: IRacingOAuthTokenResponse | undefined; try { - session = await client.restoreSession(username!); + session = await client.restoreSessionForId(username!); if (!session) { console.log("Could not find existing session. Authenticating..."); session = await client.passwordLimitedAuthorization(); diff --git a/openapi/iracing.json b/openapi/iracing.json index d3ce662b..a907da27 100644 --- a/openapi/iracing.json +++ b/openapi/iracing.json @@ -1 +1 @@ -{"openapi":"3.1.1","info":{"title":"iRacing `/data` API","version":"0.0.1"},"servers":[{"url":"https://members-ng.iracing.com/"}],"externalDocs":{"url":"/data/doc","description":"Find more information on available services here. Requires authentication."},"security":[{"bearerAuth":[]}],"tags":[{"name":"auth","description":"Auth endpoint."},{"name":"doc","description":"A documentation endpoint."},{"name":"car","description":"Car service endpoint."},{"name":"carclass","description":"Car class service endpoint."},{"name":"constants","description":"Constants service endpoint."},{"name":"driver_stats","description":"Driver stats service endpoint."},{"name":"hosted","description":"Hosted service endpoint."},{"name":"league","description":"League service endpoint"},{"name":"lookup","description":"Lookup endpoints for static reference data (countries, licenses, drivers, etc.)"},{"name":"member","description":"Member profile and related endpoints (profile, awards, participation credits)."},{"name":"results","description":"Race and session result endpoints (lap data, event logs, season results)."},{"name":"season","description":"Season-related endpoints (season lists, race guides, schedules)."},{"name":"series","description":"Series endpoints (series metadata, seasons, assets)."},{"name":"stats","description":"Statistical endpoints and summaries for members and seasons."},{"name":"team","description":"Team endpoints (team details, membership)."},{"name":"time_attack","description":"Time attack specific endpoints and member season results."},{"name":"track","description":"Track metadata and asset endpoints."}],"paths":{"/auth":{"post":{"operationId":"postAuth","tags":["auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string"}},"required":["email","password"]}}}},"responses":{}}},"/data/doc":{"get":{"operationId":"getDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/Docs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/carclass":{"get":{"operationId":"getCarClassDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/carclass/get":{"get":{"operationId":"getCarClassGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car":{"get":{"operationId":"getCarDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car/assets":{"get":{"operationId":"getCarAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car/get":{"get":{"operationId":"getCarGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants":{"get":{"operationId":"getConstantsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/categories":{"get":{"operationId":"getConstantsCategoriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/divisions":{"get":{"operationId":"getConstantsDivisionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/event_types":{"get":{"operationId":"getConstantsEventTypesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/driver_stats_by_category":{"get":{"operationId":"getDriverStatsByCategoryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/driver_stats_by_category/{category}":{"get":{"operationId":"getDriverStatsByCategoryCategoryDocs","tags":["doc"],"parameters":[{"in":"path","name":"category","schema":{"$ref":"#/components/schemas/iracingCategory"},"required":true,"description":"Racing category."}],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted":{"get":{"operationId":"getHostedDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted/combined_sessions":{"get":{"operationId":"getHostedCombinedSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted/sessions":{"get":{"operationId":"getHostedSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league":{"get":{"operationId":"getLeagueDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/cust_league_sessions":{"get":{"operationId":"getLeagueCustomerLeagueSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/directory":{"get":{"operationId":"getLeagueDirectoryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/get":{"get":{"operationId":"getLeagueGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/get_points_systems":{"get":{"operationId":"getLeagueGetPointsSystemsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/membership":{"get":{"operationId":"getLeagueMembershipDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/roster":{"get":{"operationId":"getLeagueRosterDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/seasons":{"get":{"operationId":"getLeagueSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/season_standings":{"get":{"operationId":"getLeagueSeasonStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/season_sessions":{"get":{"operationId":"getLeagueSeasonSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup":{"get":{"operationId":"getLookupDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/countries":{"get":{"operationId":"getLookupCountriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/drivers":{"get":{"operationId":"getLookupDriversDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/flairs":{"get":{"operationId":"getLookupFlairsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/get":{"get":{"operationId":"getLookupGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/licenses":{"get":{"operationId":"getLookupLicensesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member":{"get":{"operationId":"getMemberDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/awards":{"get":{"operationId":"getMemberAwardsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/award_instances":{"get":{"operationId":"getMemberAwardInstancesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/chart_data":{"get":{"operationId":"getMemberChartDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/get":{"get":{"operationId":"getMemberGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/info":{"get":{"operationId":"getMemberInfoDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/participation_credits":{"get":{"operationId":"getMemberParticipationCreditsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/profile":{"get":{"operationId":"getMemberProfileDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results":{"get":{"operationId":"getResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/get":{"get":{"operationId":"getResultsGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/event_log":{"get":{"operationId":"getResultsEventLogDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/lap_chart_data":{"get":{"operationId":"getResultsLapChartDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/lap_data":{"get":{"operationId":"getResultsLapDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/search_hosted":{"get":{"operationId":"getResultsSearchHostedDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/search_series":{"get":{"operationId":"getResultsSearchSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/season_results":{"get":{"operationId":"getResultsSeasonResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season":{"get":{"operationId":"getSeasonDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/list":{"get":{"operationId":"getSeasonListDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/race_guide":{"get":{"operationId":"getSeasonRaceGuideDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/spectator_subsessionids":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/spectator_subsessionids_detail":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDetailDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series":{"get":{"operationId":"getSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/assets":{"get":{"operationId":"getSeriesAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/get":{"get":{"operationId":"getSeriesGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/past_seasons":{"get":{"operationId":"getSeriesPastSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/seasons":{"get":{"operationId":"getSeriesSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/season_list":{"get":{"operationId":"getSeriesSeasonListDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/season_schedule":{"get":{"operationId":"getSeriesSeasonScheduleDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/stats_series":{"get":{"operationId":"getSeriesStatsSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats":{"get":{"operationId":"getStatsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_bests":{"get":{"operationId":"getStatsMemberBestsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_career":{"get":{"operationId":"getStatsMemberCareerDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_division":{"get":{"operationId":"getStatsMemberDivisionDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_recap":{"get":{"operationId":"getStatsMemberRecapDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_recent_races":{"get":{"operationId":"getStatsMemberRecentRacesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_summary":{"get":{"operationId":"getStatsMemberSummaryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_yearly":{"get":{"operationId":"getStatsMemberYearlyDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_driver_standings":{"get":{"operationId":"getStatsSeasonDriverStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_supersession_standings":{"get":{"operationId":"getStatsSeasonSupersessionStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_team_standings":{"get":{"operationId":"getStatsSeasonTeamStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_tt_standings":{"get":{"operationId":"getStatsSeasonTTStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_tt_results":{"get":{"operationId":"getStatsSeasonTTResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_qualify_results":{"get":{"operationId":"getStatsSeasonQualifyResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/world_records":{"get":{"operationId":"getStatsWorldRecordsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team":{"get":{"operationId":"getTeamDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team/get":{"get":{"operationId":"getTeamGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team/membership":{"get":{"operationId":"getTeamMembershipDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/time_attack":{"get":{"operationId":"getTimeAttackDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/time_attack/member_season_results":{"get":{"operationId":"getTimeAttackMemberSeasonResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track":{"get":{"operationId":"getTrackDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track/assets":{"get":{"operationId":"getTrackAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track/get":{"get":{"operationId":"getTrackGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/carclass/get":{"get":{"operationId":"getCarClass","summary":"Gets car classes.","tags":["carclass"],"externalDocs":{"url":"/data/doc/carclass/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/car/assets":{"get":{"operationId":"getCarAssets","description":"image paths are relative to https://images-static.iracing.com/","tags":["car"],"externalDocs":{"url":"/data/doc/car/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/car/get":{"get":{"operationId":"getCar","tags":["car"],"externalDocs":{"url":"/data/doc/car/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/categories":{"get":{"operationId":"getConstantsCategories","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/categories"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/divisions":{"get":{"operationId":"getConstantsDivisions","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/divisions"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/event_types":{"get":{"operationId":"getConstantsEventTypes","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/event_types"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/driver_stats_by_category/{category}":{"get":{"operationId":"getDriverStatsByCategory","tags":["driver_stats"],"externalDocs":{"url":"/data/doc/driver_stats_by_category/{category}"},"parameters":[{"in":"path","name":"category","schema":{"$ref":"#/components/schemas/iracingCategory"},"required":true,"description":"Racing category."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/hosted/combined_sessions":{"get":{"operationId":"getHostedCombinedSessions","description":"Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user.","tags":["hosted"],"externalDocs":{"url":"/data/doc/hosted/combined_sessions"},"parameters":[{"in":"query","name":"package_id","schema":{"description":"If set, return only sessions using this car or track package ID.","type":"number"},"description":"If set, return only sessions using this car or track package ID."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/hosted/sessions":{"get":{"operationId":"getHostedSessions","description":"Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user.","tags":["hosted"],"externalDocs":{"url":"/data/doc/hosted/sessions"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/cust_league_sessions":{"get":{"operationId":"getLeagueCustomerLeagueSessions","tags":["league"],"externalDocs":{"url":"/data/doc/league/cust_league_sessions"},"parameters":[{"in":"query","name":"mine","schema":{"description":"If true, return only sessions created by this user.","type":"boolean"},"description":"If true, return only sessions created by this user."},{"in":"query","name":"package_id","schema":{"description":"If set, return only sessions using this car or track package ID.","type":"number"},"description":"If set, return only sessions using this car or track package ID."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/directory":{"get":{"operationId":"getLeagueDirectory","tags":["league"],"externalDocs":{"url":"/data/doc/league/directory"},"parameters":[{"in":"query","name":"search","schema":{"description":"Will search against league name, description, owner, and league ID.","type":"string"},"description":"Will search against league name, description, owner, and league ID."},{"in":"query","name":"tag","schema":{"description":"One or more tags, comma-separated.","type":"string"},"description":"One or more tags, comma-separated."},{"in":"query","name":"restrict_to_member","schema":{"description":"If true include only leagues for which customer is a member.","type":"boolean"},"description":"If true include only leagues for which customer is a member."},{"in":"query","name":"restrict_to_recruiting","schema":{"description":"If true include only leagues which are recruiting.","type":"boolean"},"description":"If true include only leagues which are recruiting."},{"in":"query","name":"restrict_to_friends","schema":{"description":"If true include only leagues owned by a friend.","type":"boolean"},"description":"If true include only leagues owned by a friend."},{"in":"query","name":"restrict_to_watched","schema":{"description":"If true include only leagues owned by a watched member.","type":"boolean"},"description":"If true include only leagues owned by a watched member."},{"in":"query","name":"minimum_roster_count","schema":{"description":"If set include leagues with at least this number of members.","type":"number"},"description":"If set include leagues with at least this number of members."},{"in":"query","name":"maximum_roster_count","schema":{"description":"If set include leagues with no more than this number of members.","type":"number"},"description":"If set include leagues with no more than this number of members."},{"in":"query","name":"lowerbound","schema":{"description":"First row of results to return. Defaults to 1.","type":"number"},"description":"First row of results to return. Defaults to 1."},{"in":"query","name":"upperbound","schema":{"description":"Last row of results to return. Defaults to lowerbound + 39.","type":"number"},"description":"Last row of results to return. Defaults to lowerbound + 39."},{"in":"query","name":"sort","schema":{"description":"One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance.","type":"string"},"description":"One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance."},{"in":"query","name":"order","schema":{"description":"One of asc or desc. Defaults to asc.","type":"string"},"description":"One of asc or desc. Defaults to asc."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/get":{"get":{"operationId":"getLeague","tags":["league"],"externalDocs":{"url":"/data/doc/league/get"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/get_points_systems":{"get":{"operationId":"getLeaguePointsSystems","tags":["league"],"externalDocs":{"url":"/data/doc/league/get_points_systems"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"description":"If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned.","type":"number"},"description":"If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/membership":{"get":{"operationId":"getLeagueMembership","tags":["league"],"externalDocs":{"url":"/data/doc/league/membership"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned.","$ref":"#/components/schemas/customerId"},"description":"If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned."},{"in":"query","name":"include_league","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/roster":{"get":{"operationId":"getLeagueRoster","tags":["league"],"externalDocs":{"url":"/data/doc/league/roster"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/seasons":{"get":{"operationId":"getLeagueSeasons","tags":["league"],"externalDocs":{"url":"/data/doc/league/seasons"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"retired","schema":{"description":"If true include seasons which are no longer active.","type":"boolean"},"description":"If true include seasons which are no longer active."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/season_standings":{"get":{"operationId":"getLeagueSeasonStandings","tags":["league"],"externalDocs":{"url":"/data/doc/league/season_standings"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"}},{"in":"query","name":"car_id","schema":{"description":"If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes.","type":"number"},"description":"If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/season_sessions":{"get":{"operationId":"getLeagueSeasonSessions","tags":["league"],"externalDocs":{"url":"/data/doc/league/season_sessions"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"results_only","schema":{"description":"If true include only sessions for which results are available.","type":"boolean"},"description":"If true include only sessions for which results are available."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/countries":{"get":{"operationId":"getLookupCountries","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/countries"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/flairs":{"get":{"operationId":"getLookupFlairs","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/flairs"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/licenses":{"get":{"operationId":"getLookupLicenses","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/licenses"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/drivers":{"get":{"operationId":"getLookupDrivers","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/drivers"},"parameters":[{"in":"query","name":"search_term","schema":{"description":"A cust_id or partial name for which to search.","type":"string"},"required":true,"description":"A cust_id or partial name for which to search."},{"in":"query","name":"league_id","schema":{"description":"Narrow the search to the roster of the given league.","type":"number"},"description":"Narrow the search to the roster of the given league."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/get":{"get":{"operationId":"getLookup","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/awards":{"get":{"operationId":"getMemberAwards","tags":["member"],"externalDocs":{"url":"/data/doc/member/awards"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/award_instances":{"get":{"operationId":"getMemberAwardInstances","tags":["member"],"externalDocs":{"url":"/data/doc/member/award_instances"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"award_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/chart_data":{"get":{"operationId":"getMemberChartData","tags":["member"],"externalDocs":{"url":"/data/doc/member/chart_data"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"category_id","schema":{"description":"1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road","type":"number"},"required":true,"description":"1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road"},{"in":"query","name":"chart_type","schema":{"description":"1 - iRating; 2 - TT Rating; 3 - License/SR","type":"number"},"required":true,"description":"1 - iRating; 2 - TT Rating; 3 - License/SR"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/get":{"get":{"operationId":"getMember","tags":["member"],"externalDocs":{"url":"/data/doc/member/get"},"parameters":[{"in":"query","name":"cust_ids","schema":{"description":"Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"required":true,"description":"Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4"},{"in":"query","name":"include_licenses","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/info":{"get":{"operationId":"getMemberInfo","tags":["member"],"externalDocs":{"url":"/data/doc/member/info"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/participation_credits":{"get":{"operationId":"getMemberParticipationCredits","tags":["member"],"externalDocs":{"url":"/data/doc/member/participation_credits"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/profile":{"get":{"operationId":"getMemberProfile","summary":"Gets a requested user's profile.","tags":["member"],"externalDocs":{"url":"/data/doc/member/profile"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/get":{"get":{"operationId":"getResults","tags":["results"],"externalDocs":{"url":"/data/doc/results/get"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/event_log":{"get":{"operationId":"getResultsEventLog","tags":["results"],"externalDocs":{"url":"/data/doc/results/event_log"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"description":"The main event is 0; the preceding event is -1, and so on.","type":"number"},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/lap_chart_data":{"get":{"operationId":"getResultsLapChartData","tags":["results"],"externalDocs":{"url":"/data/doc/results/lap_chart_data"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"description":"The main event is 0; the preceding event is -1, and so on.","type":"number"},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/lap_data":{"get":{"operationId":"getResultsLapData","tags":["results"],"externalDocs":{"url":"/data/doc/results/lap_data"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"description":"The main event is 0; the preceding event is -1, and so on.","type":"number"},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."},{"in":"query","name":"cust_id","schema":{"description":"Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included.","$ref":"#/components/schemas/customerId"},"description":"Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included."},{"in":"query","name":"team_id","schema":{"description":"Required if the subsession was a team event.","type":"number"},"description":"Required if the subsession was a team event."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/search_hosted":{"get":{"operationId":"getResultsSearchHosted","tags":["results"],"externalDocs":{"url":"/data/doc/results/search_hosted"},"parameters":[{"in":"query","name":"start_range_begin","schema":{"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"start_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past."},{"in":"query","name":"finish_range_begin","schema":{"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"finish_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past."},{"in":"query","name":"cust_id","schema":{"description":"The participant's customer ID. Ignored if team_id is supplied.","$ref":"#/components/schemas/customerId"},"description":"The participant's customer ID. Ignored if team_id is supplied."},{"in":"query","name":"team_id","schema":{"description":"The team ID to search for. Takes priority over cust_id if both are supplied.","type":"number"},"description":"The team ID to search for. Takes priority over cust_id if both are supplied."},{"in":"query","name":"host_cust_id","schema":{"description":"The host's customer ID.","$ref":"#/components/schemas/customerId"},"description":"The host's customer ID."},{"in":"query","name":"session_name","schema":{"description":"Part or all of the session's name.","type":"string"},"description":"Part or all of the session's name."},{"in":"query","name":"league_id","schema":{"description":"Include only results for the league with this ID.","type":"number"},"description":"Include only results for the league with this ID."},{"in":"query","name":"league_season_id","schema":{"description":"Include only results for the league season with this ID.","type":"number"},"description":"Include only results for the league season with this ID."},{"in":"query","name":"car_id","schema":{"description":"One of the cars used by the session.","type":"number"},"description":"One of the cars used by the session."},{"in":"query","name":"track_id","schema":{"description":"The ID of the track used by the session.","type":"number"},"description":"The ID of the track used by the session."},{"in":"query","name":"category_ids","schema":{"description":"Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/search_series":{"get":{"operationId":"getResultsSearchSeries","tags":["results"],"externalDocs":{"url":"/data/doc/results/search_series"},"parameters":[{"in":"query","name":"season_year","schema":{"description":"Required when using season_quarter.","type":"number"},"description":"Required when using season_quarter."},{"in":"query","name":"season_quarter","schema":{"description":"Required when using season_year.","type":"number"},"description":"Required when using season_year."},{"in":"query","name":"start_range_begin","schema":{"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"start_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past."},{"in":"query","name":"finish_range_begin","schema":{"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"finish_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past."},{"in":"query","name":"cust_id","schema":{"description":"Include only sessions in which this customer participated. Ignored if team_id is supplied.","$ref":"#/components/schemas/customerId"},"description":"Include only sessions in which this customer participated. Ignored if team_id is supplied."},{"in":"query","name":"team_id","schema":{"description":"Include only sessions in which this team participated. Takes priority over cust_id if both are supplied.","type":"number"},"description":"Include only sessions in which this team participated. Takes priority over cust_id if both are supplied."},{"in":"query","name":"series_id","schema":{"description":"Include only sessions for series with this ID.","type":"number"},"description":"Include only sessions for series with this ID."},{"in":"query","name":"race_week_num","schema":{"description":"Include only sessions with this race week number.","type":"number"},"description":"Include only sessions with this race week number."},{"in":"query","name":"official_only","schema":{"description":"If true, include only sessions earning championship points. Defaults to all.","type":"boolean"},"description":"If true, include only sessions earning championship points. Defaults to all."},{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"},{"in":"query","name":"category_ids","schema":{"description":"License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/season_results":{"get":{"operationId":"getResultsSeasonResults","tags":["results"],"externalDocs":{"url":"/data/doc/results/season_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"event_type","schema":{"description":"Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race","$ref":"#/components/schemas/iracingEventType"},"description":"Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race"},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/list":{"get":{"operationId":"getSeasonList","tags":["season"],"externalDocs":{"url":"/data/doc/season/list"},"parameters":[{"in":"query","name":"season_year","schema":{"type":"number"},"required":true},{"in":"query","name":"season_quarter","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/race_guide":{"get":{"operationId":"getSeasonRaceGuide","tags":["season"],"externalDocs":{"url":"/data/doc/season/race_guide"},"parameters":[{"in":"query","name":"from","schema":{"description":"ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time."},{"in":"query","name":"include_end_after_from","schema":{"description":"Include sessions which start before 'from' but end after.","type":"boolean"},"description":"Include sessions which start before 'from' but end after."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/spectator_subsessionids":{"get":{"operationId":"getSeasonSpectatorSubsessionIds","tags":["season"],"externalDocs":{"url":"/data/doc/season/spectator_subsessionids"},"parameters":[{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"array","items":{"$ref":"#/components/schemas/iracingEventType"}},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/spectator_subsessionids_detail":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDetail","tags":["season"],"externalDocs":{"url":"/data/doc/season/spectator_subsessionids_detail"},"parameters":[{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"array","items":{"$ref":"#/components/schemas/iracingEventType"}},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"},{"in":"query","name":"season_ids","schema":{"description":"Seasons to include in the search. Defaults to all. ?season_ids=513,937","type":"array","items":{"type":"number"}},"description":"Seasons to include in the search. Defaults to all. ?season_ids=513,937"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/assets":{"get":{"operationId":"getSeriesAssets","tags":["series"],"externalDocs":{"url":"/data/doc/series/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/get":{"get":{"operationId":"getSeries","tags":["series"],"externalDocs":{"url":"/data/doc/series/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/past_seasons":{"get":{"operationId":"getSeriesPastSeasons","tags":["series"],"externalDocs":{"url":"/data/doc/series/past_seasons"},"parameters":[{"in":"query","name":"series_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/seasons":{"get":{"operationId":"getSeriesSeasons","tags":["series"],"externalDocs":{"url":"/data/doc/series/seasons"},"parameters":[{"in":"query","name":"include_series","schema":{"type":"boolean"}},{"in":"query","name":"season_year","schema":{"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.","type":"number"},"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned."},{"in":"query","name":"season_quarter","schema":{"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.","type":"number"},"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/season_list":{"get":{"operationId":"getSeriesSeasonList","tags":["series"],"externalDocs":{"url":"/data/doc/series/season_list"},"parameters":[{"in":"query","name":"include_series","schema":{"type":"boolean"}},{"in":"query","name":"season_year","schema":{"type":"number"}},{"in":"query","name":"season_quarter","schema":{"type":"number"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/season_schedule":{"get":{"operationId":"getSeriesSeasonSchedule","tags":["series"],"externalDocs":{"url":"/data/doc/series/season_schedule"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/stats_series":{"get":{"operationId":"getSeriesStatsSeries","tags":["series"],"externalDocs":{"url":"/data/doc/series/stats_series"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_bests":{"get":{"operationId":"getStatsMemberBests","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_bests"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"car_id","schema":{"description":"First call should exclude car_id; use cars_driven list in return for subsequent calls.","type":"number"},"description":"First call should exclude car_id; use cars_driven list in return for subsequent calls."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_career":{"get":{"operationId":"getStatsMemberCareer","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_career"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_division":{"get":{"operationId":"getStatsMemberDivision","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_division"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"event_type","schema":{"description":"The event type code for the division type: 4 - Time Trial; 5 - Race","anyOf":[{"description":"Time trial","type":"number","const":4},{"description":"Race","type":"number","const":5}]},"required":true,"description":"The event type code for the division type: 4 - Time Trial; 5 - Race"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_recap":{"get":{"operationId":"getStatsMemberRecap","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_recap"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"year","schema":{"description":"Season year; if not supplied the current calendar year (UTC) is used.","anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"description":"Season year; if not supplied the current calendar year (UTC) is used."},{"in":"query","name":"season","schema":{"description":"Season (quarter) within the year; if not supplied the recap will be for the entire year.","type":"number"},"description":"Season (quarter) within the year; if not supplied the recap will be for the entire year."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_recent_races":{"get":{"operationId":"getStatsMemberRecentRaces","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_recent_races"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_summary":{"get":{"operationId":"getStatsMemberSummary","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_summary"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_yearly":{"get":{"operationId":"getStatsMemberYearly","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_yearly"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_driver_standings":{"get":{"operationId":"getStatsSeasonDriverStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_driver_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_supersession_standings":{"get":{"operationId":"getStatsSeasonSupersessionStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_supersession_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_team_standings":{"get":{"operationId":"getStatsSeasonTeamStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_team_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_time_trial_standings":{"get":{"operationId":"getStatsSeasonTimeTrialStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_time_trial_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_time_trial_results":{"get":{"operationId":"getStatsSeasonTimeTrialResults","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_time_trial_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"required":true,"description":"The first race week of a season is 0."},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_qualify_results":{"get":{"operationId":"getStatsSeasonQualifyResults","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_qualify_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"required":true,"description":"The first race week of a season is 0."},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/world_records":{"get":{"operationId":"getStatsWorldRecords","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/world_records"},"parameters":[{"in":"query","name":"car_id","schema":{"type":"number"},"required":true},{"in":"query","name":"track_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_year","schema":{"description":"Limit best times to a given year.","type":"number"},"description":"Limit best times to a given year."},{"in":"query","name":"season_quarter","schema":{"description":"Limit best times to a given quarter; only applicable when year is used.","type":"number"},"description":"Limit best times to a given quarter; only applicable when year is used."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/team/get":{"get":{"operationId":"getTeam","tags":["team"],"externalDocs":{"url":"/data/doc/team/get"},"parameters":[{"in":"query","name":"team_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/team/membership":{"get":{"operationId":"getTeamMembership","tags":["team"],"externalDocs":{"url":"/data/doc/team/membership"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/time_attack/member_season_results":{"get":{"operationId":"getTimeAttackMemberSeasonResults","tags":["time_attack"],"externalDocs":{"url":"/data/doc/time_attack/member_season_results"},"parameters":[{"in":"query","name":"ta_comp_season_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/track/assets":{"get":{"operationId":"getTrackAssets","tags":["track"],"externalDocs":{"url":"/data/doc/track/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/track/get":{"get":{"operationId":"getTrack","tags":["track"],"externalDocs":{"url":"/data/doc/track/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}}},"components":{"schemas":{"iracingCategory":{"description":"Racing category.","anyOf":[{"description":"Oval discipline","type":"string","const":"oval"},{"description":"Road discipline. Legacy, use `sports_car` or `formula_car` instead.","type":"string","const":"road"},{"description":"Dirt road discipline.","type":"string","const":"dirt_road"},{"description":"Dirt oval discipline.","type":"string","const":"dirt_oval"},{"description":"Sports car discipline.","type":"string","const":"sports_car"},{"description":"Formula car discipline.","type":"string","const":"formula_car"}]},"customerId":{"description":"Numeric ID of a customer on iRacing.","type":"number"},"iracingEventType":{"description":"iRacing Event Type","anyOf":[{"description":"Practice","type":"number","const":2},{"description":"Qualifying","type":"number","const":3},{"description":"Time trial","type":"number","const":4},{"description":"Race","type":"number","const":5}]},"iracingDivision":{"description":"iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information.","anyOf":[{"description":"Division 1","type":"number","const":0},{"description":"Division 2","type":"number","const":1},{"description":"Division 3","type":"number","const":2},{"description":"Division 4","type":"number","const":3},{"description":"Division 5","type":"number","const":4},{"description":"Division 6","type":"number","const":5},{"description":"Division 7","type":"number","const":6},{"description":"Division 8","type":"number","const":7},{"description":"Division 9","type":"number","const":8},{"description":"Division 10","type":"number","const":9},{"description":"Rookie","type":"number","const":10}]},"iracingAPIResponse":{"description":"Response from iRacing `/data` API.","type":"object","properties":{"link":{"description":"A link to the cached data","type":"string","format":"uri"},"expires":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["link","expires"],"additionalProperties":false},"iracingServicesDocs":{"description":"An index of available services on the iRacing API.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceDocs"}},"iracingServiceDocs":{"description":"An index of service methods available for the requested service.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceMethodDocs"}},"iracingServiceMethodDocs":{"description":"An iRacing API Service Method object.","type":"object","properties":{"link":{"type":"string","format":"uri"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceMethodParametersDocs"}},"expirationSeconds":{"type":"number"}},"required":["link","parameters"],"additionalProperties":false},"iracingServiceMethodParametersDocs":{"description":"An iRacing API Service Method Parameters object.","type":"object","properties":{"type":{"type":"string"},"note":{"type":"string"},"required":{"type":"boolean"}},"required":["type"],"additionalProperties":false},"errorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"note":{"type":"string"}},"required":["error"],"additionalProperties":false}},"headers":{"x-ratelimit-limit":{"required":true,"description":"The current total rate limit.","schema":{"title":"Rate limit limit","description":"The current total rate limit.","type":"number"}},"x-ratelimit-remaining":{"required":true,"description":"How much of the rate limit you have remaining.","schema":{"title":"Rate limit remaining","description":"How much of the rate limit you have remaining.","type":"number"}},"x-ratelimit-reset":{"required":true,"description":"When the rate limit will reset in epoch timestamp.","schema":{"title":"Rate limit reset","description":"When the rate limit will reset in epoch timestamp.","type":"string"}}},"responses":{"Success":{"description":"Success","headers":{"x-ratelimit-limit":{"$ref":"#/components/headers/x-ratelimit-limit"},"x-ratelimit-remaining":{"$ref":"#/components/headers/x-ratelimit-remaining"},"x-ratelimit-reset":{"$ref":"#/components/headers/x-ratelimit-reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingAPIResponse"}}}},"Docs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServicesDocs"}}}},"ServiceDocs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServiceDocs"}}}},"ServiceMethodDocs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServiceMethodDocs"}}}},"RateLimited":{"description":"Rate limited","headers":{"x-ratelimit-limit":{"$ref":"#/components/headers/x-ratelimit-limit"},"x-ratelimit-remaining":{"$ref":"#/components/headers/x-ratelimit-remaining"},"x-ratelimit-reset":{"$ref":"#/components/headers/x-ratelimit-reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}},"Maintenance":{"description":"Maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}},"Unauthorized":{"description":"Access token is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Authentication"},"oAuth2":{"type":"oauth2","description":"OAuth service for obtaining a JWT. For more information, see https://oauth.iracing.com/oauth2/book/introduction.html","flows":{"authorizationCode":{"authorizationUrl":"https://oauth.iracing.com/oauth2/authorize","tokenUrl":"https://oauth.iracing.com/oauth2/token","scopes":{"iracing.auth":"Authorization for iRacing services.","iracing.profile":"Access to the iRacing profile."}}}}}}} \ No newline at end of file +{"openapi":"3.1.1","info":{"title":"iRacing `/data` API","version":"0.0.1"},"servers":[{"url":"https://members-ng.iracing.com/"}],"externalDocs":{"url":"/data/doc","description":"Find more information on available services here. Requires authentication."},"security":[{"bearerAuth":[]}],"tags":[{"name":"auth","description":"Auth endpoint."},{"name":"doc","description":"A documentation endpoint."},{"name":"car","description":"Car service endpoint."},{"name":"carclass","description":"Car class service endpoint."},{"name":"constants","description":"Constants service endpoint."},{"name":"driver_stats","description":"Driver stats service endpoint."},{"name":"hosted","description":"Hosted service endpoint."},{"name":"league","description":"League service endpoint"},{"name":"lookup","description":"Lookup endpoints for static reference data (countries, licenses, drivers, etc.)"},{"name":"member","description":"Member profile and related endpoints (profile, awards, participation credits)."},{"name":"results","description":"Race and session result endpoints (lap data, event logs, season results)."},{"name":"season","description":"Season-related endpoints (season lists, race guides, schedules)."},{"name":"series","description":"Series endpoints (series metadata, seasons, assets)."},{"name":"stats","description":"Statistical endpoints and summaries for members and seasons."},{"name":"team","description":"Team endpoints (team details, membership)."},{"name":"time_attack","description":"Time attack specific endpoints and member season results."},{"name":"track","description":"Track metadata and asset endpoints."}],"paths":{"/auth":{"post":{"operationId":"postAuth","tags":["auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string"}},"required":["email","password"]}}}},"responses":{}}},"/data/doc":{"get":{"operationId":"getDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/Docs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/carclass":{"get":{"operationId":"getCarClassDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/carclass/get":{"get":{"operationId":"getCarClassGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car":{"get":{"operationId":"getCarDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car/assets":{"get":{"operationId":"getCarAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/car/get":{"get":{"operationId":"getCarGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants":{"get":{"operationId":"getConstantsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/categories":{"get":{"operationId":"getConstantsCategoriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/divisions":{"get":{"operationId":"getConstantsDivisionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/constants/event_types":{"get":{"operationId":"getConstantsEventTypesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/driver_stats_by_category":{"get":{"operationId":"getDriverStatsByCategoryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/driver_stats_by_category/{category}":{"get":{"operationId":"getDriverStatsByCategoryCategoryDocs","tags":["doc"],"parameters":[{"in":"path","name":"category","schema":{"$ref":"#/components/schemas/iracingCategory"},"required":true,"description":"Racing category."}],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted":{"get":{"operationId":"getHostedDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted/combined_sessions":{"get":{"operationId":"getHostedCombinedSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/hosted/sessions":{"get":{"operationId":"getHostedSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league":{"get":{"operationId":"getLeagueDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/cust_league_sessions":{"get":{"operationId":"getLeagueCustomerLeagueSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/directory":{"get":{"operationId":"getLeagueDirectoryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/get":{"get":{"operationId":"getLeagueGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/get_points_systems":{"get":{"operationId":"getLeagueGetPointsSystemsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/membership":{"get":{"operationId":"getLeagueMembershipDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/roster":{"get":{"operationId":"getLeagueRosterDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/seasons":{"get":{"operationId":"getLeagueSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/season_standings":{"get":{"operationId":"getLeagueSeasonStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/league/season_sessions":{"get":{"operationId":"getLeagueSeasonSessionsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup":{"get":{"operationId":"getLookupDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/countries":{"get":{"operationId":"getLookupCountriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/drivers":{"get":{"operationId":"getLookupDriversDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/flairs":{"get":{"operationId":"getLookupFlairsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/get":{"get":{"operationId":"getLookupGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/lookup/licenses":{"get":{"operationId":"getLookupLicensesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member":{"get":{"operationId":"getMemberDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/awards":{"get":{"operationId":"getMemberAwardsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/award_instances":{"get":{"operationId":"getMemberAwardInstancesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/chart_data":{"get":{"operationId":"getMemberChartDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/get":{"get":{"operationId":"getMemberGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/info":{"get":{"operationId":"getMemberInfoDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/participation_credits":{"get":{"operationId":"getMemberParticipationCreditsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/member/profile":{"get":{"operationId":"getMemberProfileDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results":{"get":{"operationId":"getResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/get":{"get":{"operationId":"getResultsGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/event_log":{"get":{"operationId":"getResultsEventLogDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/lap_chart_data":{"get":{"operationId":"getResultsLapChartDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/lap_data":{"get":{"operationId":"getResultsLapDataDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/search_hosted":{"get":{"operationId":"getResultsSearchHostedDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/search_series":{"get":{"operationId":"getResultsSearchSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/results/season_results":{"get":{"operationId":"getResultsSeasonResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season":{"get":{"operationId":"getSeasonDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/list":{"get":{"operationId":"getSeasonListDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/race_guide":{"get":{"operationId":"getSeasonRaceGuideDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/spectator_subsessionids":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/season/spectator_subsessionids_detail":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDetailDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series":{"get":{"operationId":"getSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/assets":{"get":{"operationId":"getSeriesAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/get":{"get":{"operationId":"getSeriesGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/past_seasons":{"get":{"operationId":"getSeriesPastSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/seasons":{"get":{"operationId":"getSeriesSeasonsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/season_list":{"get":{"operationId":"getSeriesSeasonListDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/season_schedule":{"get":{"operationId":"getSeriesSeasonScheduleDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/series/stats_series":{"get":{"operationId":"getSeriesStatsSeriesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats":{"get":{"operationId":"getStatsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_bests":{"get":{"operationId":"getStatsMemberBestsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_career":{"get":{"operationId":"getStatsMemberCareerDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_division":{"get":{"operationId":"getStatsMemberDivisionDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_recap":{"get":{"operationId":"getStatsMemberRecapDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_recent_races":{"get":{"operationId":"getStatsMemberRecentRacesDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_summary":{"get":{"operationId":"getStatsMemberSummaryDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/member_yearly":{"get":{"operationId":"getStatsMemberYearlyDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_driver_standings":{"get":{"operationId":"getStatsSeasonDriverStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_supersession_standings":{"get":{"operationId":"getStatsSeasonSupersessionStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_team_standings":{"get":{"operationId":"getStatsSeasonTeamStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_tt_standings":{"get":{"operationId":"getStatsSeasonTTStandingsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_tt_results":{"get":{"operationId":"getStatsSeasonTTResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/season_qualify_results":{"get":{"operationId":"getStatsSeasonQualifyResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/stats/world_records":{"get":{"operationId":"getStatsWorldRecordsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team":{"get":{"operationId":"getTeamDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team/get":{"get":{"operationId":"getTeamGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/team/membership":{"get":{"operationId":"getTeamMembershipDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/time_attack":{"get":{"operationId":"getTimeAttackDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/time_attack/member_season_results":{"get":{"operationId":"getTimeAttackMemberSeasonResultsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track":{"get":{"operationId":"getTrackDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track/assets":{"get":{"operationId":"getTrackAssetsDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/doc/track/get":{"get":{"operationId":"getTrackGetDocs","tags":["doc"],"responses":{"200":{"$ref":"#/components/responses/ServiceMethodDocs"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/data/carclass/get":{"get":{"operationId":"getCarClass","summary":"Gets car classes.","tags":["carclass"],"externalDocs":{"url":"/data/doc/carclass/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/car/assets":{"get":{"operationId":"getCarAssets","description":"image paths are relative to https://images-static.iracing.com/","tags":["car"],"externalDocs":{"url":"/data/doc/car/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/car/get":{"get":{"operationId":"getCar","tags":["car"],"externalDocs":{"url":"/data/doc/car/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/categories":{"get":{"operationId":"getConstantsCategories","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/categories"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/divisions":{"get":{"operationId":"getConstantsDivisions","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/divisions"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/constants/event_types":{"get":{"operationId":"getConstantsEventTypes","description":"Constant; returned directly as an array of objects","tags":["constants"],"externalDocs":{"url":"/data/doc/constants/event_types"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/driver_stats_by_category/{category}":{"get":{"operationId":"getDriverStatsByCategory","tags":["driver_stats"],"externalDocs":{"url":"/data/doc/driver_stats_by_category/{category}"},"parameters":[{"in":"path","name":"category","schema":{"$ref":"#/components/schemas/iracingCategory"},"required":true,"description":"Racing category."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/hosted/combined_sessions":{"get":{"operationId":"getHostedCombinedSessions","description":"Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user.","tags":["hosted"],"externalDocs":{"url":"/data/doc/hosted/combined_sessions"},"parameters":[{"in":"query","name":"package_id","schema":{"description":"If set, return only sessions using this car or track package ID.","type":"number"},"description":"If set, return only sessions using this car or track package ID."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/hosted/sessions":{"get":{"operationId":"getHostedSessions","description":"Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user.","tags":["hosted"],"externalDocs":{"url":"/data/doc/hosted/sessions"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/cust_league_sessions":{"get":{"operationId":"getLeagueCustomerLeagueSessions","tags":["league"],"externalDocs":{"url":"/data/doc/league/cust_league_sessions"},"parameters":[{"in":"query","name":"mine","schema":{"description":"If true, return only sessions created by this user.","type":"boolean"},"description":"If true, return only sessions created by this user."},{"in":"query","name":"package_id","schema":{"description":"If set, return only sessions using this car or track package ID.","type":"number"},"description":"If set, return only sessions using this car or track package ID."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/directory":{"get":{"operationId":"getLeagueDirectory","tags":["league"],"externalDocs":{"url":"/data/doc/league/directory"},"parameters":[{"in":"query","name":"search","schema":{"description":"Will search against league name, description, owner, and league ID.","type":"string"},"description":"Will search against league name, description, owner, and league ID."},{"in":"query","name":"tag","schema":{"description":"One or more tags, comma-separated.","type":"string"},"description":"One or more tags, comma-separated."},{"in":"query","name":"restrict_to_member","schema":{"description":"If true include only leagues for which customer is a member.","type":"boolean"},"description":"If true include only leagues for which customer is a member."},{"in":"query","name":"restrict_to_recruiting","schema":{"description":"If true include only leagues which are recruiting.","type":"boolean"},"description":"If true include only leagues which are recruiting."},{"in":"query","name":"restrict_to_friends","schema":{"description":"If true include only leagues owned by a friend.","type":"boolean"},"description":"If true include only leagues owned by a friend."},{"in":"query","name":"restrict_to_watched","schema":{"description":"If true include only leagues owned by a watched member.","type":"boolean"},"description":"If true include only leagues owned by a watched member."},{"in":"query","name":"minimum_roster_count","schema":{"description":"If set include leagues with at least this number of members.","type":"number"},"description":"If set include leagues with at least this number of members."},{"in":"query","name":"maximum_roster_count","schema":{"description":"If set include leagues with no more than this number of members.","type":"number"},"description":"If set include leagues with no more than this number of members."},{"in":"query","name":"lowerbound","schema":{"description":"First row of results to return. Defaults to 1.","type":"number"},"description":"First row of results to return. Defaults to 1."},{"in":"query","name":"upperbound","schema":{"description":"Last row of results to return. Defaults to lowerbound + 39.","type":"number"},"description":"Last row of results to return. Defaults to lowerbound + 39."},{"in":"query","name":"sort","schema":{"description":"One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance.","type":"string"},"description":"One of relevance, leaguename, displayname, rostercount. displayname is owners's name. Defaults to relevance."},{"in":"query","name":"order","schema":{"description":"One of asc or desc. Defaults to asc.","type":"string"},"description":"One of asc or desc. Defaults to asc."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/get":{"get":{"operationId":"getLeague","tags":["league"],"externalDocs":{"url":"/data/doc/league/get"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/get_points_systems":{"get":{"operationId":"getLeaguePointsSystems","tags":["league"],"externalDocs":{"url":"/data/doc/league/get_points_systems"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"description":"If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned.","type":"number"},"description":"If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/membership":{"get":{"operationId":"getLeagueMembership","tags":["league"],"externalDocs":{"url":"/data/doc/league/membership"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned.","$ref":"#/components/schemas/customerId"},"description":"If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer's block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned."},{"in":"query","name":"include_league","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/roster":{"get":{"operationId":"getLeagueRoster","tags":["league"],"externalDocs":{"url":"/data/doc/league/roster"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/seasons":{"get":{"operationId":"getLeagueSeasons","tags":["league"],"externalDocs":{"url":"/data/doc/league/seasons"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"retired","schema":{"description":"If true include seasons which are no longer active.","type":"boolean"},"description":"If true include seasons which are no longer active."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/season_standings":{"get":{"operationId":"getLeagueSeasonStandings","tags":["league"],"externalDocs":{"url":"/data/doc/league/season_standings"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"}},{"in":"query","name":"car_id","schema":{"description":"If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes.","type":"number"},"description":"If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/league/season_sessions":{"get":{"operationId":"getLeagueSeasonSessions","tags":["league"],"externalDocs":{"url":"/data/doc/league/season_sessions"},"parameters":[{"in":"query","name":"league_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"results_only","schema":{"description":"If true include only sessions for which results are available.","type":"boolean"},"description":"If true include only sessions for which results are available."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/countries":{"get":{"operationId":"getLookupCountries","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/countries"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/flairs":{"get":{"operationId":"getLookupFlairs","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/flairs"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/licenses":{"get":{"operationId":"getLookupLicenses","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/licenses"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/drivers":{"get":{"operationId":"getLookupDrivers","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/drivers"},"parameters":[{"in":"query","name":"search_term","schema":{"type":"string","description":"A cust_id or partial name for which to search."},"required":true,"description":"A cust_id or partial name for which to search."},{"in":"query","name":"league_id","schema":{"description":"Narrow the search to the roster of the given league.","type":"number"},"description":"Narrow the search to the roster of the given league."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/lookup/get":{"get":{"operationId":"getLookup","tags":["lookup"],"externalDocs":{"url":"/data/doc/lookup/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/awards":{"get":{"operationId":"getMemberAwards","tags":["member"],"externalDocs":{"url":"/data/doc/member/awards"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/award_instances":{"get":{"operationId":"getMemberAwardInstances","tags":["member"],"externalDocs":{"url":"/data/doc/member/award_instances"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"award_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/chart_data":{"get":{"operationId":"getMemberChartData","tags":["member"],"externalDocs":{"url":"/data/doc/member/chart_data"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"category_id","schema":{"description":"1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road","type":"number"},"required":true,"description":"1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road"},{"in":"query","name":"chart_type","schema":{"description":"1 - iRating; 2 - TT Rating; 3 - License/SR","type":"number"},"required":true,"description":"1 - iRating; 2 - TT Rating; 3 - License/SR"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/get":{"get":{"operationId":"getMember","tags":["member"],"externalDocs":{"url":"/data/doc/member/get"},"parameters":[{"in":"query","name":"cust_ids","schema":{"type":"string","pattern":"^\\d+(?:,\\d+)*$","description":"Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4"},"required":true,"description":"Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4"},{"in":"query","name":"include_licenses","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/info":{"get":{"operationId":"getMemberInfo","tags":["member"],"externalDocs":{"url":"/data/doc/member/info"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/participation_credits":{"get":{"operationId":"getMemberParticipationCredits","tags":["member"],"externalDocs":{"url":"/data/doc/member/participation_credits"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/member/profile":{"get":{"operationId":"getMemberProfile","summary":"Gets a requested user's profile.","tags":["member"],"externalDocs":{"url":"/data/doc/member/profile"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/get":{"get":{"operationId":"getResults","tags":["results"],"externalDocs":{"url":"/data/doc/results/get"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/event_log":{"get":{"operationId":"getResultsEventLog","tags":["results"],"externalDocs":{"url":"/data/doc/results/event_log"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"type":"number","description":"The main event is 0; the preceding event is -1, and so on."},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/lap_chart_data":{"get":{"operationId":"getResultsLapChartData","tags":["results"],"externalDocs":{"url":"/data/doc/results/lap_chart_data"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"type":"number","description":"The main event is 0; the preceding event is -1, and so on."},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/lap_data":{"get":{"operationId":"getResultsLapData","tags":["results"],"externalDocs":{"url":"/data/doc/results/lap_data"},"parameters":[{"in":"query","name":"subsession_id","schema":{"type":"number"},"required":true},{"in":"query","name":"simsession_number","schema":{"type":"number","description":"The main event is 0; the preceding event is -1, and so on."},"required":true,"description":"The main event is 0; the preceding event is -1, and so on."},{"in":"query","name":"cust_id","schema":{"description":"Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included.","$ref":"#/components/schemas/customerId"},"description":"Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team's drivers will be included."},{"in":"query","name":"team_id","schema":{"description":"Required if the subsession was a team event.","type":"number"},"description":"Required if the subsession was a team event."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/search_hosted":{"get":{"operationId":"getResultsSearchHosted","tags":["results"],"externalDocs":{"url":"/data/doc/results/search_hosted"},"parameters":[{"in":"query","name":"start_range_begin","schema":{"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"start_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past."},{"in":"query","name":"finish_range_begin","schema":{"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"finish_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past."},{"in":"query","name":"cust_id","schema":{"description":"The participant's customer ID. Ignored if team_id is supplied.","$ref":"#/components/schemas/customerId"},"description":"The participant's customer ID. Ignored if team_id is supplied."},{"in":"query","name":"team_id","schema":{"description":"The team ID to search for. Takes priority over cust_id if both are supplied.","type":"number"},"description":"The team ID to search for. Takes priority over cust_id if both are supplied."},{"in":"query","name":"host_cust_id","schema":{"description":"The host's customer ID.","$ref":"#/components/schemas/customerId"},"description":"The host's customer ID."},{"in":"query","name":"session_name","schema":{"description":"Part or all of the session's name.","type":"string"},"description":"Part or all of the session's name."},{"in":"query","name":"league_id","schema":{"description":"Include only results for the league with this ID.","type":"number"},"description":"Include only results for the league with this ID."},{"in":"query","name":"league_season_id","schema":{"description":"Include only results for the league season with this ID.","type":"number"},"description":"Include only results for the league season with this ID."},{"in":"query","name":"car_id","schema":{"description":"One of the cars used by the session.","type":"number"},"description":"One of the cars used by the session."},{"in":"query","name":"track_id","schema":{"description":"The ID of the track used by the session.","type":"number"},"description":"The ID of the track used by the session."},{"in":"query","name":"category_ids","schema":{"description":"Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/search_series":{"get":{"operationId":"getResultsSearchSeries","tags":["results"],"externalDocs":{"url":"/data/doc/results/search_series"},"parameters":[{"in":"query","name":"season_year","schema":{"description":"Required when using season_quarter.","type":"number"},"description":"Required when using season_quarter."},{"in":"query","name":"season_quarter","schema":{"description":"Required when using season_year.","type":"number"},"description":"Required when using season_year."},{"in":"query","name":"start_range_begin","schema":{"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"start_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past."},{"in":"query","name":"finish_range_begin","schema":{"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\".","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\"."},{"in":"query","name":"finish_range_end","schema":{"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"description":"ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past."},{"in":"query","name":"cust_id","schema":{"description":"Include only sessions in which this customer participated. Ignored if team_id is supplied.","$ref":"#/components/schemas/customerId"},"description":"Include only sessions in which this customer participated. Ignored if team_id is supplied."},{"in":"query","name":"team_id","schema":{"description":"Include only sessions in which this team participated. Takes priority over cust_id if both are supplied.","type":"number"},"description":"Include only sessions in which this team participated. Takes priority over cust_id if both are supplied."},{"in":"query","name":"series_id","schema":{"description":"Include only sessions for series with this ID.","type":"number"},"description":"Include only sessions for series with this ID."},{"in":"query","name":"race_week_num","schema":{"description":"Include only sessions with this race week number.","type":"number"},"description":"Include only sessions with this race week number."},{"in":"query","name":"official_only","schema":{"description":"If true, include only sessions earning championship points. Defaults to all.","type":"boolean"},"description":"If true, include only sessions earning championship points. Defaults to all."},{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"},{"in":"query","name":"category_ids","schema":{"description":"License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4","type":"string","pattern":"^\\d+(?:,\\d+)*$"},"description":"License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/results/season_results":{"get":{"operationId":"getResultsSeasonResults","tags":["results"],"externalDocs":{"url":"/data/doc/results/season_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"event_type","schema":{"description":"Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race","$ref":"#/components/schemas/iracingEventType"},"description":"Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race"},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/list":{"get":{"operationId":"getSeasonList","tags":["season"],"externalDocs":{"url":"/data/doc/season/list"},"parameters":[{"in":"query","name":"season_year","schema":{"type":"number"},"required":true},{"in":"query","name":"season_quarter","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/race_guide":{"get":{"operationId":"getSeasonRaceGuide","tags":["season"],"externalDocs":{"url":"/data/doc/season/race_guide"},"parameters":[{"in":"query","name":"from","schema":{"description":"ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time."},{"in":"query","name":"include_end_after_from","schema":{"description":"Include sessions which start before 'from' but end after.","type":"boolean"},"description":"Include sessions which start before 'from' but end after."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/spectator_subsessionids":{"get":{"operationId":"getSeasonSpectatorSubsessionIds","tags":["season"],"externalDocs":{"url":"/data/doc/season/spectator_subsessionids"},"parameters":[{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"array","items":{"$ref":"#/components/schemas/iracingEventType"}},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/season/spectator_subsessionids_detail":{"get":{"operationId":"getSeasonSpectatorSubsessionIdsDetail","tags":["season"],"externalDocs":{"url":"/data/doc/season/spectator_subsessionids_detail"},"parameters":[{"in":"query","name":"event_types","schema":{"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5","type":"array","items":{"$ref":"#/components/schemas/iracingEventType"}},"description":"Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5"},{"in":"query","name":"season_ids","schema":{"description":"Seasons to include in the search. Defaults to all. ?season_ids=513,937","type":"array","items":{"type":"number"}},"description":"Seasons to include in the search. Defaults to all. ?season_ids=513,937"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/assets":{"get":{"operationId":"getSeriesAssets","tags":["series"],"externalDocs":{"url":"/data/doc/series/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/get":{"get":{"operationId":"getSeries","tags":["series"],"externalDocs":{"url":"/data/doc/series/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/past_seasons":{"get":{"operationId":"getSeriesPastSeasons","tags":["series"],"externalDocs":{"url":"/data/doc/series/past_seasons"},"parameters":[{"in":"query","name":"series_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/seasons":{"get":{"operationId":"getSeriesSeasons","tags":["series"],"externalDocs":{"url":"/data/doc/series/seasons"},"parameters":[{"in":"query","name":"include_series","schema":{"type":"boolean"}},{"in":"query","name":"season_year","schema":{"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.","type":"number"},"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned."},{"in":"query","name":"season_quarter","schema":{"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned.","type":"number"},"description":"To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/season_list":{"get":{"operationId":"getSeriesSeasonList","tags":["series"],"externalDocs":{"url":"/data/doc/series/season_list"},"parameters":[{"in":"query","name":"include_series","schema":{"type":"boolean"}},{"in":"query","name":"season_year","schema":{"type":"number"}},{"in":"query","name":"season_quarter","schema":{"type":"number"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/season_schedule":{"get":{"operationId":"getSeriesSeasonSchedule","tags":["series"],"externalDocs":{"url":"/data/doc/series/season_schedule"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/series/stats_series":{"get":{"operationId":"getSeriesStatsSeries","tags":["series"],"externalDocs":{"url":"/data/doc/series/stats_series"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_bests":{"get":{"operationId":"getStatsMemberBests","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_bests"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"car_id","schema":{"description":"First call should exclude car_id; use cars_driven list in return for subsequent calls.","type":"number"},"description":"First call should exclude car_id; use cars_driven list in return for subsequent calls."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_career":{"get":{"operationId":"getStatsMemberCareer","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_career"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_division":{"get":{"operationId":"getStatsMemberDivision","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_division"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"event_type","schema":{"anyOf":[{"type":"number","const":4,"description":"Time trial"},{"type":"number","const":5,"description":"Race"}],"description":"The event type code for the division type: 4 - Time Trial; 5 - Race"},"required":true,"description":"The event type code for the division type: 4 - Time Trial; 5 - Race"}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_recap":{"get":{"operationId":"getStatsMemberRecap","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_recap"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."},{"in":"query","name":"year","schema":{"description":"Season year; if not supplied the current calendar year (UTC) is used.","anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"description":"Season year; if not supplied the current calendar year (UTC) is used."},{"in":"query","name":"season","schema":{"description":"Season (quarter) within the year; if not supplied the recap will be for the entire year.","type":"number"},"description":"Season (quarter) within the year; if not supplied the recap will be for the entire year."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_recent_races":{"get":{"operationId":"getStatsMemberRecentRaces","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_recent_races"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_summary":{"get":{"operationId":"getStatsMemberSummary","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_summary"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/member_yearly":{"get":{"operationId":"getStatsMemberYearly","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/member_yearly"},"parameters":[{"in":"query","name":"cust_id","schema":{"description":"Defaults to the authenticated member.","$ref":"#/components/schemas/customerId"},"description":"Defaults to the authenticated member."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_driver_standings":{"get":{"operationId":"getStatsSeasonDriverStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_driver_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_supersession_standings":{"get":{"operationId":"getStatsSeasonSupersessionStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_supersession_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_team_standings":{"get":{"operationId":"getStatsSeasonTeamStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_team_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_time_trial_standings":{"get":{"operationId":"getStatsSeasonTimeTrialStandings","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_time_trial_standings"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}},{"in":"query","name":"race_week_num","schema":{"description":"The first race week of a season is 0.","type":"number"},"description":"The first race week of a season is 0."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_time_trial_results":{"get":{"operationId":"getStatsSeasonTimeTrialResults","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_time_trial_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"type":"number","description":"The first race week of a season is 0."},"required":true,"description":"The first race week of a season is 0."},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/season_qualify_results":{"get":{"operationId":"getStatsSeasonQualifyResults","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/season_qualify_results"},"parameters":[{"in":"query","name":"season_id","schema":{"type":"number"},"required":true},{"in":"query","name":"car_class_id","schema":{"type":"number"},"required":true},{"in":"query","name":"race_week_num","schema":{"type":"number","description":"The first race week of a season is 0."},"required":true,"description":"The first race week of a season is 0."},{"in":"query","name":"division","schema":{"$ref":"#/components/schemas/iracingDivision"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/stats/world_records":{"get":{"operationId":"getStatsWorldRecords","tags":["stats"],"externalDocs":{"url":"/data/doc/stats/world_records"},"parameters":[{"in":"query","name":"car_id","schema":{"type":"number"},"required":true},{"in":"query","name":"track_id","schema":{"type":"number"},"required":true},{"in":"query","name":"season_year","schema":{"description":"Limit best times to a given year.","type":"number"},"description":"Limit best times to a given year."},{"in":"query","name":"season_quarter","schema":{"description":"Limit best times to a given quarter; only applicable when year is used.","type":"number"},"description":"Limit best times to a given quarter; only applicable when year is used."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/team/get":{"get":{"operationId":"getTeam","tags":["team"],"externalDocs":{"url":"/data/doc/team/get"},"parameters":[{"in":"query","name":"team_id","schema":{"type":"number"},"required":true},{"in":"query","name":"include_licenses","schema":{"description":"For faster responses, only request when necessary.","type":"boolean"},"description":"For faster responses, only request when necessary."}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/team/membership":{"get":{"operationId":"getTeamMembership","tags":["team"],"externalDocs":{"url":"/data/doc/team/membership"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/time_attack/member_season_results":{"get":{"operationId":"getTimeAttackMemberSeasonResults","tags":["time_attack"],"externalDocs":{"url":"/data/doc/time_attack/member_season_results"},"parameters":[{"in":"query","name":"ta_comp_season_id","schema":{"type":"number"},"required":true}],"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/track/assets":{"get":{"operationId":"getTrackAssets","tags":["track"],"externalDocs":{"url":"/data/doc/track/assets"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}},"/data/track/get":{"get":{"operationId":"getTrack","tags":["track"],"externalDocs":{"url":"/data/doc/track/get"},"responses":{"200":{"$ref":"#/components/responses/Success"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Maintenance"}}}}},"components":{"schemas":{"iracingCategory":{"anyOf":[{"type":"string","const":"oval","description":"Oval discipline"},{"type":"string","const":"road","description":"Road discipline. Legacy, use `sports_car` or `formula_car` instead."},{"type":"string","const":"dirt_road","description":"Dirt road discipline."},{"type":"string","const":"dirt_oval","description":"Dirt oval discipline."},{"type":"string","const":"sports_car","description":"Sports car discipline."},{"type":"string","const":"formula_car","description":"Formula car discipline."}],"description":"Racing category."},"customerId":{"type":"number","description":"Numeric ID of a customer on iRacing."},"iracingEventType":{"anyOf":[{"type":"number","const":2,"description":"Practice"},{"type":"number","const":3,"description":"Qualifying"},{"type":"number","const":4,"description":"Time trial"},{"type":"number","const":5,"description":"Race"}],"description":"iRacing Event Type"},"iracingDivision":{"anyOf":[{"type":"number","const":0,"description":"Division 1"},{"type":"number","const":1,"description":"Division 2"},{"type":"number","const":2,"description":"Division 3"},{"type":"number","const":3,"description":"Division 4"},{"type":"number","const":4,"description":"Division 5"},{"type":"number","const":5,"description":"Division 6"},{"type":"number","const":6,"description":"Division 7"},{"type":"number","const":7,"description":"Division 8"},{"type":"number","const":8,"description":"Division 9"},{"type":"number","const":9,"description":"Division 10"},{"type":"number","const":10,"description":"Rookie"}],"description":"iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information."},"iracingAPIResponse":{"type":"object","properties":{"link":{"type":"string","format":"uri","description":"A link to the cached data"},"expires":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["link","expires"],"additionalProperties":false,"description":"Response from iRacing `/data` API."},"iracingServicesDocs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceDocs"},"description":"An index of available services on the iRacing API."},"iracingServiceDocs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceMethodDocs"},"description":"An index of service methods available for the requested service."},"iracingServiceMethodDocs":{"type":"object","properties":{"link":{"type":"string","format":"uri"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/iracingServiceMethodParametersDocs"}},"expirationSeconds":{"type":"number"}},"required":["link","parameters"],"additionalProperties":false,"description":"An iRacing API Service Method object."},"iracingServiceMethodParametersDocs":{"type":"object","properties":{"type":{"type":"string"},"note":{"type":"string"},"required":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"description":"An iRacing API Service Method Parameters object."},"errorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"note":{"type":"string"}},"required":["error"],"additionalProperties":false}},"headers":{"x-ratelimit-limit":{"required":true,"description":"The current total rate limit.","schema":{"type":"number","title":"Rate limit limit","description":"The current total rate limit."}},"x-ratelimit-remaining":{"required":true,"description":"How much of the rate limit you have remaining.","schema":{"type":"number","title":"Rate limit remaining","description":"How much of the rate limit you have remaining."}},"x-ratelimit-reset":{"required":true,"description":"When the rate limit will reset in epoch timestamp.","schema":{"title":"Rate limit reset","description":"When the rate limit will reset in epoch timestamp.","type":"string"}}},"responses":{"Success":{"description":"Success","headers":{"x-ratelimit-limit":{"$ref":"#/components/headers/x-ratelimit-limit"},"x-ratelimit-remaining":{"$ref":"#/components/headers/x-ratelimit-remaining"},"x-ratelimit-reset":{"$ref":"#/components/headers/x-ratelimit-reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingAPIResponse"}}}},"Docs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServicesDocs"}}}},"ServiceDocs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServiceDocs"}}}},"ServiceMethodDocs":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iracingServiceMethodDocs"}}}},"RateLimited":{"description":"Rate limited","headers":{"x-ratelimit-limit":{"$ref":"#/components/headers/x-ratelimit-limit"},"x-ratelimit-remaining":{"$ref":"#/components/headers/x-ratelimit-remaining"},"x-ratelimit-reset":{"$ref":"#/components/headers/x-ratelimit-reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}},"Maintenance":{"description":"Maintenance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}},"Unauthorized":{"description":"Access token is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Authentication"},"oAuth2":{"type":"oauth2","description":"OAuth service for obtaining a JWT. For more information, see https://oauth.iracing.com/oauth2/book/introduction.html","flows":{"authorizationCode":{"authorizationUrl":"https://oauth.iracing.com/oauth2/authorize","tokenUrl":"https://oauth.iracing.com/oauth2/token","scopes":{"iracing.auth":"Authorization for iRacing services.","iracing.profile":"Access to the iRacing profile."}}}}}}} \ No newline at end of file diff --git a/openapi/oauth.json b/openapi/oauth.json index 793f8bfd..bf9cfc98 100644 --- a/openapi/oauth.json +++ b/openapi/oauth.json @@ -1 +1 @@ -{"openapi":"3.1.1","info":{"title":"iRacing OAuth API","version":"0.0.1"},"servers":[{"url":"https://oauth.iracing.com/oauth2","description":"iRacing OAuth server."}],"externalDocs":{"url":"/book"},"paths":{"/iracing/profile":{"get":{"operationId":"getProfile","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"iracing_name":{"type":"string"},"iracing_cust_id":{"type":"number"}},"required":["iracing_name","iracing_cust_id"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/sessions":{"get":{"operationId":"getSessions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"session_id":{"description":"A session identifier. This value is considered opaque and its format may change without warning at our discretion.","type":"string"},"client_id":{"description":"A client identifier.","type":"string"},"client_name":{"description":"The name of the client as selected during client registration.","type":"string"},"client_developer_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_developer_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_developer_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope_descriptions":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_session":{"type":"boolean"},"impersonated":{"type":"boolean"},"impersonation_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_ip":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"null"}]},"first_continent":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_country":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_subdivisions":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_city":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_operating_system":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_browser":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_ip":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"null"}]},"last_continent":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_country":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_subdivisions":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_city":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_operating_system":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_browser":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["session_id","client_id","client_name","client_developer_name","client_developer_url","client_developer_email","scope","scope_descriptions","current_session","impersonated","impersonation_note","first_ip","first_continent","first_country","first_subdivisions","first_city","first_user_agent_header","first_user_agent_operating_system","first_user_agent_browser","last_ip","last_continent","last_country","last_subdivisions","last_city","last_user_agent_header","last_user_agent_operating_system","last_user_agent_browser"],"additionalProperties":false}}},"required":["sessions"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/current":{"post":{"operationId":"revokeCurrent","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"forgetBrowser":{"type":"boolean"}}}}}},"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/sessions":{"post":{"operationId":"revokeSessions","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"sessionIds":{"type":"array","items":{"type":"string"}}},"required":["sessionIds"]}}}},"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/client":{"post":{"operationId":"revokeClient","security":[{"bearerAuth":[]}],"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/authorize":{"get":{"operationId":"authorize","parameters":[{"in":"query","name":"client_id","schema":{"description":"The client identifier issued during client registration.","type":"string"},"required":true,"description":"The client identifier issued during client registration."},{"in":"query","name":"redirect_uri","schema":{"description":"A redirect URI registered to the client, which must match exactly.","type":"string","format":"uri"},"required":true,"description":"A redirect URI registered to the client, which must match exactly."},{"in":"query","name":"response_type","schema":{"description":"The only valid value for this is code.","type":"string","const":"code"},"required":true,"description":"The only valid value for this is code."},{"in":"query","name":"code_challenge","schema":{"description":"A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless.","type":"string"},"description":"A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless."},{"in":"query","name":"code_challenge_method","schema":{"description":"The PKCE code challenge method. Either S256 (recommended) or plain.","default":"plain","anyOf":[{"type":"string","const":"plain"},{"type":"string","const":"S256"}]},"description":"The PKCE code challenge method. Either S256 (recommended) or plain."},{"in":"query","name":"state","schema":{"description":"This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks.","type":"string"},"description":"This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks."},{"in":"query","name":"scope","schema":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},{"in":"query","name":"prompt","schema":{"description":"Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user.","type":"string"},"description":"Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user."}],"responses":{"302":{"description":"Redirect back to the provided redirect_uri"}}}},"/token":{"post":{"operationId":"exchangeToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/tokenGrantParameters"}}}},"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenGrantResponse"}}}},"400":{"description":"Failure","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"status_reason":{"type":"string"},"error":{"type":"string"},"error_description":{"type":"string"},"error_uri":{"type":"string"},"state":{"type":"string"}},"required":["status","status_reason","error","error_description","error_uri"],"additionalProperties":false}}}}}}}},"components":{"schemas":{"tokenGrantParameters":{"oneOf":[{"$ref":"#/components/schemas/authorizationCodeGrant"},{"$ref":"#/components/schemas/refreshTokenGrant"},{"$ref":"#/components/schemas/passwordLimitedGrant"}],"type":"object","discriminator":{"propertyName":"grant_type","mapping":{"authorization_code":"#/components/schemas/authorizationCodeGrant","refresh_token":"#/components/schemas/refreshTokenGrant","password_limited":"#/components/schemas/passwordLimitedGrant"}}},"authorizationCodeGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"authorization_code"},"client_id":{"description":"The client identifier issued during client registration.","type":"string"},"client_secret":{"description":"The client secret issued during registration.","type":"string"},"code":{"description":"As returned to the redirect_uri of the client.","type":"string"},"redirect_uri":{"description":"The same redirect_uri used to `/authorize`.","type":"string"},"code_verifier":{"description":"The PKCE code verifier which is only required if a code_challenge was used to `/authorize``.","type":"string"}},"required":["grant_type","client_id","code","redirect_uri"]},"refreshTokenGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"refresh_token"},"client_id":{"description":"The client identifier issued during client registration.","type":"string"},"client_secret":{"description":"The client secret issued during registration.","type":"string"},"refresh_token":{"description":"As returned in the `/token` response.","type":"string"}},"required":["grant_type","client_id","refresh_token"]},"passwordLimitedGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"password_limited"},"client_id":{"description":"The client identifier issued during client registration.","type":"string"},"client_secret":{"description":"The client secret issued during registration.","type":"string"},"username":{"description":"The email address or other issued identifier for a user.","type":"string"},"password":{"description":"The password of the user. Password must be masked with the `username` before it is sent to the server.","type":"string"},"scope":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},"required":["grant_type","client_id","client_secret","username","password"]},"tokenGrantResponse":{"type":"object","properties":{"access_token":{"description":"The access token may be used to authorize a connection to a resource server. The value is considered opaque and its format may change without warning at our discretion.","type":"string"},"token_type":{"type":"string","const":"bearer"},"expires_in":{"description":"The number of seconds after which this access token will no longer be considered valid.","type":"number"},"refresh_token":{"description":"The refresh token may be used in a Refresh Token Grant to obtain new access and refresh tokens. Each refresh token may only be used once. The value is considered opaque and its format may change without warning at our discretion.","type":"string"},"refresh_token_expires_in":{"description":"The number of seconds after which this refresh token will no longer be considered valid. The server may not issue a refresh token, in which case this field will be omitted.","type":"number"},"scope":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},"required":["access_token","token_type","expires_in"],"additionalProperties":false}},"headers":{"x-request-id":{"required":true,"description":"Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.","schema":{"title":"Request ID","description":"Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.","type":"string"}}},"responses":{"SessionsRevoked":{"description":"Session(s) were successfully revoked.","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}}},"Unauthorized":{"description":"Access token is missing or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"status_reason":{"type":"string"},"error":{"type":"string"},"error_description":{"type":"string"},"error_uri":{"type":"string"},"state":{"type":"string"}},"required":["status","status_reason","error","error_description","error_uri"],"additionalProperties":false}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Authentication"}}}} \ No newline at end of file +{"openapi":"3.1.1","info":{"title":"iRacing OAuth API","version":"0.0.1"},"servers":[{"url":"https://oauth.iracing.com/oauth2","description":"iRacing OAuth server."}],"externalDocs":{"url":"/book"},"paths":{"/iracing/profile":{"get":{"operationId":"getProfile","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"iracing_name":{"type":"string"},"iracing_cust_id":{"type":"number"}},"required":["iracing_name","iracing_cust_id"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/sessions":{"get":{"operationId":"getSessions","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"session_id":{"type":"string","description":"A session identifier. This value is considered opaque and its format may change without warning at our discretion."},"client_id":{"type":"string","description":"A client identifier."},"client_name":{"type":"string","description":"The name of the client as selected during client registration."},"client_developer_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_developer_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"client_developer_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope_descriptions":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_session":{"type":"boolean"},"impersonated":{"type":"boolean"},"impersonation_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_ip":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"null"}]},"first_continent":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_country":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_subdivisions":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_city":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_operating_system":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_user_agent_browser":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_ip":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"null"}]},"last_continent":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_country":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_subdivisions":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_city":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_operating_system":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_user_agent_browser":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["session_id","client_id","client_name","client_developer_name","client_developer_url","client_developer_email","scope","scope_descriptions","current_session","impersonated","impersonation_note","first_ip","first_continent","first_country","first_subdivisions","first_city","first_user_agent_header","first_user_agent_operating_system","first_user_agent_browser","last_ip","last_continent","last_country","last_subdivisions","last_city","last_user_agent_header","last_user_agent_operating_system","last_user_agent_browser"],"additionalProperties":false}}},"required":["sessions"],"additionalProperties":false}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/current":{"post":{"operationId":"revokeCurrent","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"forgetBrowser":{"type":"boolean"}}}}}},"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/sessions":{"post":{"operationId":"revokeSessions","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"sessionIds":{"type":"array","items":{"type":"string"}}},"required":["sessionIds"]}}}},"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/revoke/client":{"post":{"operationId":"revokeClient","security":[{"bearerAuth":[]}],"responses":{"200":{"$ref":"#/components/responses/SessionsRevoked"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/authorize":{"get":{"operationId":"authorize","parameters":[{"in":"query","name":"client_id","schema":{"type":"string","description":"The client identifier issued during client registration."},"required":true,"description":"The client identifier issued during client registration."},{"in":"query","name":"redirect_uri","schema":{"type":"string","format":"uri","description":"A redirect URI registered to the client, which must match exactly."},"required":true,"description":"A redirect URI registered to the client, which must match exactly."},{"in":"query","name":"response_type","schema":{"type":"string","const":"code","description":"The only valid value for this is code."},"required":true,"description":"The only valid value for this is code."},{"in":"query","name":"code_challenge","schema":{"description":"A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless.","type":"string"},"description":"A PKCE code challenge. We require this of any client which cannot reasonably keep a secret, and encourage server-side applications to implement it regardless."},{"in":"query","name":"code_challenge_method","schema":{"description":"The PKCE code challenge method. Either S256 (recommended) or plain.","default":"plain","anyOf":[{"type":"string","const":"plain"},{"type":"string","const":"S256"}]},"description":"The PKCE code challenge method. Either S256 (recommended) or plain."},{"in":"query","name":"state","schema":{"description":"This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks.","type":"string"},"description":"This state value will be returned unmodified at the end of the authentication and authorization flow. It may be used to store request-specific data and in the prevention of CSRF attacks."},{"in":"query","name":"scope","schema":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},{"in":"query","name":"prompt","schema":{"description":"Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user.","type":"string"},"description":"Space-delimited, case-sensitive list of ASCII string values which influence how the authorization server interacts with the user."}],"responses":{"302":{"description":"Redirect back to the provided redirect_uri"}}}},"/token":{"post":{"operationId":"exchangeToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/tokenGrantParameters"}}}},"responses":{"200":{"description":"Success","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenGrantResponse"}}}},"400":{"description":"Failure","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"status_reason":{"type":"string"},"error":{"type":"string"},"error_description":{"type":"string"},"error_uri":{"type":"string"},"state":{"type":"string"}},"required":["status","status_reason","error","error_description","error_uri"],"additionalProperties":false}}}}}}}},"components":{"schemas":{"tokenGrantParameters":{"oneOf":[{"$ref":"#/components/schemas/authorizationCodeGrant"},{"$ref":"#/components/schemas/refreshTokenGrant"},{"$ref":"#/components/schemas/passwordLimitedGrant"}],"type":"object","discriminator":{"propertyName":"grant_type","mapping":{"authorization_code":"#/components/schemas/authorizationCodeGrant","refresh_token":"#/components/schemas/refreshTokenGrant","password_limited":"#/components/schemas/passwordLimitedGrant"}}},"authorizationCodeGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"authorization_code"},"client_id":{"type":"string","description":"The client identifier issued during client registration."},"client_secret":{"type":"string","description":"The client secret issued during registration."},"code":{"type":"string","description":"As returned to the redirect_uri of the client."},"redirect_uri":{"type":"string","description":"The same redirect_uri used to `/authorize`."},"code_verifier":{"description":"The PKCE code verifier which is only required if a code_challenge was used to `/authorize``.","type":"string"}},"required":["grant_type","client_id","code","redirect_uri"]},"refreshTokenGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"refresh_token"},"client_id":{"type":"string","description":"The client identifier issued during client registration."},"client_secret":{"type":"string","description":"The client secret issued during registration."},"refresh_token":{"type":"string","description":"As returned in the `/token` response."}},"required":["grant_type","client_id","refresh_token"]},"passwordLimitedGrant":{"type":"object","properties":{"grant_type":{"type":"string","const":"password_limited"},"client_id":{"type":"string","description":"The client identifier issued during client registration."},"client_secret":{"type":"string","description":"The client secret issued during registration."},"username":{"type":"string","description":"The email address or other issued identifier for a user."},"password":{"type":"string","description":"The password of the user. Password must be masked with the `username` before it is sent to the server."},"scope":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},"required":["grant_type","client_id","client_secret","username","password"]},"tokenGrantResponse":{"type":"object","properties":{"access_token":{"type":"string","description":"The access token may be used to authorize a connection to a resource server. The value is considered opaque and its format may change without warning at our discretion."},"token_type":{"type":"string","const":"bearer"},"expires_in":{"type":"number","description":"The number of seconds after which this access token will no longer be considered valid."},"refresh_token":{"description":"The refresh token may be used in a Refresh Token Grant to obtain new access and refresh tokens. Each refresh token may only be used once. The value is considered opaque and its format may change without warning at our discretion.","type":"string"},"refresh_token_expires_in":{"description":"The number of seconds after which this refresh token will no longer be considered valid. The server may not issue a refresh token, in which case this field will be omitted.","type":"number"},"scope":{"description":"One or more scopes to request, if any, separated by whitespace.","type":"string"}},"required":["access_token","token_type","expires_in"],"additionalProperties":false}},"headers":{"x-request-id":{"required":true,"description":"Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues.","schema":{"type":"string","title":"Request ID","description":"Each incoming request is assigned a request identifier. The request identifier is used to associate log messages with the request. Please include the value of the received x-request-id header when reporting issues."}}},"responses":{"SessionsRevoked":{"description":"Session(s) were successfully revoked.","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}}},"Unauthorized":{"description":"Access token is missing or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"status_reason":{"type":"string"},"error":{"type":"string"},"error_description":{"type":"string"},"error_uri":{"type":"string"},"state":{"type":"string"}},"required":["status","status_reason","error","error_description","error_uri"],"additionalProperties":false}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT Authentication"}}}} \ No newline at end of file diff --git a/package.json b/package.json index 387729ca..e4b0acec 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,9 @@ "codegen": "pnpm codegen:openapi && pnpm codegen:client", "codegen:client": "pnpm -w --parallel --stream '/^codegen:client:api:.+$/'", "codegen:client:api": "pnpm -w --parallel --stream '/^codegen:client:api:.+$/'", - "codegen:client:api:axios": "openapi-generator-cli generate -g typescript-axios -i openapi/iracing.json -o packages/api/client/axios --additional-properties=useSingleRequestParameter=true,paramNaming='snake_case',npmName='@iracing-data/api-client-axios'", - "codegen:client:api:fetch": "openapi-generator-cli generate -g typescript-fetch -i openapi/iracing.json -o packages/api/client/fetch --additional-properties=useSingleRequestParameter=true,paramNaming='snake_case',npmName='@iracing-data/api-client-fetch'", + "codegen:client:api:axios": "./scripts/openapi-generator-axios.sh", + "codegen:client:api:fetch": "./scripts/openapi-generator-fetch.sh", + "codegen:client:api:rust": "./scripts/openapi-generator-rust.sh", "codegen:openapi": "pnpm -w --parallel --stream '/^codegen:openapi:.+$/'", "codegen:openapi:api": "iracing-api-openapi -o ./openapi -f iracing.json", "codegen:openapi:oauth": "iracing-oauth-api-openapi -o ./openapi -f oauth.json", @@ -29,7 +30,7 @@ "devDependencies": { "@iracing-data/api-schema-to-openapi": "workspace:*", "@iracing-data/oauth-schema-to-openapi": "workspace:*", - "@openapitools/openapi-generator-cli": "^2.25.0", + "@openapitools/openapi-generator-cli": "^2.31.1", "@types/google-protobuf": "^3.15.12", "@types/lodash": "^4.17.15", "@types/node": "^24", @@ -59,4 +60,4 @@ "packages/telemetry/client/*" ], "packageManager": "pnpm@10.24.0+sha512.01ff8ae71b4419903b65c60fb2dc9d34cf8bb6e06d03bde112ef38f7a34d6904c424ba66bea5cdcf12890230bf39f9580473140ed9c946fef328b6e5238a345a" -} +} \ No newline at end of file diff --git a/packages/api/client/axios/api.ts b/packages/api/client/axios/api.ts index 2b293010..91378ae8 100644 --- a/packages/api/client/axios/api.ts +++ b/packages/api/client/axios/api.ts @@ -5,11822 +5,17956 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; +import type { Configuration } from "./configuration"; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; +import globalAxios from "axios"; // Some imports not used depending on template conditions // @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from "./common"; +import type { RequestArgs } from "./base"; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; +import { + BASE_PATH, + COLLECTION_FORMATS, + BaseAPI, + RequiredError, + operationServerMap, +} from "./base"; export interface ErrorResponse { - 'error': string; - 'message'?: string; - 'note'?: string; + error: string; + message?: string; + note?: string; } /** * Response from iRacing `/data` API. */ export interface IracingAPIResponse { - /** - * A link to the cached data - */ - 'link': string; - 'expires': string; + /** + * A link to the cached data + */ + link: string; + expires: string; } /** * Racing category. */ export const IracingCategory = { - /** - * Oval discipline - */ - Oval: 'oval', - /** - * Road discipline. Legacy, use `sports_car` or `formula_car` instead. - */ - Road: 'road', - /** - * Dirt road discipline. - */ - DirtRoad: 'dirt_road', - /** - * Dirt oval discipline. - */ - DirtOval: 'dirt_oval', - /** - * Sports car discipline. - */ - SportsCar: 'sports_car', - /** - * Formula car discipline. - */ - FormulaCar: 'formula_car' + /** + * Oval discipline + */ + Oval: "oval", + /** + * Road discipline. Legacy, use `sports_car` or `formula_car` instead. + */ + Road: "road", + /** + * Dirt road discipline. + */ + DirtRoad: "dirt_road", + /** + * Dirt oval discipline. + */ + DirtOval: "dirt_oval", + /** + * Sports car discipline. + */ + SportsCar: "sports_car", + /** + * Formula car discipline. + */ + FormulaCar: "formula_car", } as const; -export type IracingCategory = typeof IracingCategory[keyof typeof IracingCategory]; - +export type IracingCategory = + (typeof IracingCategory)[keyof typeof IracingCategory]; /** * iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. */ export const IracingDivision = { - /** - * Division 1 - */ - NUMBER_0: 0, - /** - * Division 2 - */ - NUMBER_1: 1, - /** - * Division 3 - */ - NUMBER_2: 2, - /** - * Division 4 - */ - NUMBER_3: 3, - /** - * Division 5 - */ - NUMBER_4: 4, - /** - * Division 6 - */ - NUMBER_5: 5, - /** - * Division 7 - */ - NUMBER_6: 6, - /** - * Division 8 - */ - NUMBER_7: 7, - /** - * Division 9 - */ - NUMBER_8: 8, - /** - * Division 10 - */ - NUMBER_9: 9, - /** - * Rookie - */ - NUMBER_10: 10 + /** + * Division 1 + */ + NUMBER_0: 0, + /** + * Division 2 + */ + NUMBER_1: 1, + /** + * Division 3 + */ + NUMBER_2: 2, + /** + * Division 4 + */ + NUMBER_3: 3, + /** + * Division 5 + */ + NUMBER_4: 4, + /** + * Division 6 + */ + NUMBER_5: 5, + /** + * Division 7 + */ + NUMBER_6: 6, + /** + * Division 8 + */ + NUMBER_7: 7, + /** + * Division 9 + */ + NUMBER_8: 8, + /** + * Division 10 + */ + NUMBER_9: 9, + /** + * Rookie + */ + NUMBER_10: 10, } as const; -export type IracingDivision = typeof IracingDivision[keyof typeof IracingDivision]; - +export type IracingDivision = + (typeof IracingDivision)[keyof typeof IracingDivision]; /** * iRacing Event Type */ export const IracingEventType = { - /** - * Practice - */ - NUMBER_2: 2, - /** - * Qualifying - */ - NUMBER_3: 3, - /** - * Time trial - */ - NUMBER_4: 4, - /** - * Race - */ - NUMBER_5: 5 + /** + * Practice + */ + NUMBER_2: 2, + /** + * Qualifying + */ + NUMBER_3: 3, + /** + * Time trial + */ + NUMBER_4: 4, + /** + * Race + */ + NUMBER_5: 5, } as const; -export type IracingEventType = typeof IracingEventType[keyof typeof IracingEventType]; - +export type IracingEventType = + (typeof IracingEventType)[keyof typeof IracingEventType]; /** * An iRacing API Service Method object. */ export interface IracingServiceMethodDocs { - 'link': string; - 'parameters': { [key: string]: IracingServiceMethodParametersDocs; }; - 'expirationSeconds'?: number; + link: string; + parameters: { [key: string]: IracingServiceMethodParametersDocs }; + expirationSeconds?: number; } /** * An iRacing API Service Method Parameters object. */ export interface IracingServiceMethodParametersDocs { - 'type': string; - 'note'?: string; - 'required'?: boolean; + type: string; + note?: string; + required?: boolean; } export interface PostAuthRequest { - 'email': string; - 'password': string; + email: string; + password: string; } /** * AuthApi - axios parameter creator */ -export const AuthApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {PostAuthRequest} [post_auth_request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postAuth: async (post_auth_request?: PostAuthRequest, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/auth`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(post_auth_request, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } +export const AuthApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {PostAuthRequest} [post_auth_request] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postAuth: async ( + post_auth_request?: PostAuthRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/auth`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "POST", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + localVarHeaderParameter["Content-Type"] = "application/json"; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + post_auth_request, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** * AuthApi - functional programming interface */ -export const AuthApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration) - return { - /** - * - * @param {PostAuthRequest} [post_auth_request] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async postAuth(post_auth_request?: PostAuthRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.postAuth(post_auth_request, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['AuthApi.postAuth']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } +export const AuthApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration); + return { + /** + * + * @param {PostAuthRequest} [post_auth_request] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async postAuth( + post_auth_request?: PostAuthRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.postAuth( + post_auth_request, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["AuthApi.postAuth"]?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; }; /** * AuthApi - factory interface */ -export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AuthApiFp(configuration) - return { - /** - * - * @param {AuthApiPostAuthRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - postAuth(requestParameters: AuthApiPostAuthRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.postAuth(requestParameters.post_auth_request, options).then((request) => request(axios, basePath)); - }, - }; +export const AuthApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = AuthApiFp(configuration); + return { + /** + * + * @param {AuthApiPostAuthRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + postAuth( + requestParameters: AuthApiPostAuthRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .postAuth(requestParameters.post_auth_request, options) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for postAuth operation in AuthApi. */ export interface AuthApiPostAuthRequest { - readonly post_auth_request?: PostAuthRequest + readonly post_auth_request?: PostAuthRequest; } /** * AuthApi - object-oriented interface */ export class AuthApi extends BaseAPI { - /** - * - * @param {AuthApiPostAuthRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public postAuth(requestParameters: AuthApiPostAuthRequest = {}, options?: RawAxiosRequestConfig) { - return AuthApiFp(this.configuration).postAuth(requestParameters.post_auth_request, options).then((request) => request(this.axios, this.basePath)); - } + /** + * + * @param {AuthApiPostAuthRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public postAuth( + requestParameters: AuthApiPostAuthRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return AuthApiFp(this.configuration) + .postAuth(requestParameters.post_auth_request, options) + .then((request) => request(this.axios, this.basePath)); + } } - - /** * CarApi - axios parameter creator */ -export const CarApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCar: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/car/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * image paths are relative to https://images-static.iracing.com/ - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarAssets: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/car/assets`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } +export const CarApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCar: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/car/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * image paths are relative to https://images-static.iracing.com/ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarAssets: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/car/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** * CarApi - functional programming interface */ -export const CarApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = CarApiAxiosParamCreator(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCar(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCar(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CarApi.getCar']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * image paths are relative to https://images-static.iracing.com/ - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCarAssets(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCarAssets(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CarApi.getCarAssets']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } +export const CarApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = CarApiAxiosParamCreator(configuration); + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCar( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCar(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["CarApi.getCar"]?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * image paths are relative to https://images-static.iracing.com/ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCarAssets( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getCarAssets(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["CarApi.getCarAssets"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; }; /** * CarApi - factory interface */ -export const CarApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CarApiFp(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCar(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getCar(options).then((request) => request(axios, basePath)); - }, - /** - * image paths are relative to https://images-static.iracing.com/ - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarAssets(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getCarAssets(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * CarApi - object-oriented interface - */ -export class CarApi extends BaseAPI { - /** - * +export const CarApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = CarApiFp(configuration); + return { + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCar(options?: RawAxiosRequestConfig) { - return CarApiFp(this.configuration).getCar(options).then((request) => request(this.axios, this.basePath)); - } - + getCar(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp + .getCar(options) + .then((request) => request(axios, basePath)); + }, /** * image paths are relative to https://images-static.iracing.com/ * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCarAssets(options?: RawAxiosRequestConfig) { - return CarApiFp(this.configuration).getCarAssets(options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * CarclassApi - axios parameter creator - */ -export const CarclassApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @summary Gets car classes. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarClass: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/carclass/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } + getCarAssets( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getCarAssets(options) + .then((request) => request(axios, basePath)); + }, + }; }; /** - * CarclassApi - functional programming interface + * CarApi - object-oriented interface */ -export const CarclassApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = CarclassApiAxiosParamCreator(configuration) - return { - /** - * - * @summary Gets car classes. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCarClass(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCarClass(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['CarclassApi.getCarClass']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; +export class CarApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCar(options?: RawAxiosRequestConfig) { + return CarApiFp(this.configuration) + .getCar(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * image paths are relative to https://images-static.iracing.com/ + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarAssets(options?: RawAxiosRequestConfig) { + return CarApiFp(this.configuration) + .getCarAssets(options) + .then((request) => request(this.axios, this.basePath)); + } +} /** - * CarclassApi - factory interface + * CarclassApi - axios parameter creator */ -export const CarclassApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CarclassApiFp(configuration) - return { - /** - * - * @summary Gets car classes. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarClass(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getCarClass(options).then((request) => request(axios, basePath)); - }, - }; +export const CarclassApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @summary Gets car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClass: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/carclass/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** - * CarclassApi - object-oriented interface + * CarclassApi - functional programming interface */ -export class CarclassApi extends BaseAPI { +export const CarclassApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = CarclassApiAxiosParamCreator(configuration); + return { /** - * + * * @summary Gets car classes. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCarClass(options?: RawAxiosRequestConfig) { - return CarclassApiFp(this.configuration).getCarClass(options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * ConstantsApi - axios parameter creator - */ -export const ConstantsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsCategories: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/constants/categories`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsDivisions: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/constants/divisions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsEventTypes: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/constants/event_types`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } + async getCarClass( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getCarClass(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["CarclassApi.getCarClass"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; }; /** - * ConstantsApi - functional programming interface + * CarclassApi - factory interface */ -export const ConstantsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ConstantsApiAxiosParamCreator(configuration) - return { - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConstantsCategories(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsCategories(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ConstantsApi.getConstantsCategories']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConstantsDivisions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsDivisions(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ConstantsApi.getConstantsDivisions']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConstantsEventTypes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsEventTypes(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ConstantsApi.getConstantsEventTypes']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } +export const CarclassApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = CarclassApiFp(configuration); + return { + /** + * + * @summary Gets car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClass( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getCarClass(options) + .then((request) => request(axios, basePath)); + }, + }; }; /** - * ConstantsApi - factory interface + * CarclassApi - object-oriented interface */ -export const ConstantsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ConstantsApiFp(configuration) - return { - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsCategories(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getConstantsCategories(options).then((request) => request(axios, basePath)); - }, - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsDivisions(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getConstantsDivisions(options).then((request) => request(axios, basePath)); - }, - /** - * Constant; returned directly as an array of objects - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsEventTypes(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getConstantsEventTypes(options).then((request) => request(axios, basePath)); - }, - }; -}; +export class CarclassApi extends BaseAPI { + /** + * + * @summary Gets car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarClass(options?: RawAxiosRequestConfig) { + return CarclassApiFp(this.configuration) + .getCarClass(options) + .then((request) => request(this.axios, this.basePath)); + } +} /** - * ConstantsApi - object-oriented interface + * ConstantsApi - axios parameter creator */ -export class ConstantsApi extends BaseAPI { +export const ConstantsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getConstantsCategories(options?: RawAxiosRequestConfig) { - return ConstantsApiFp(this.configuration).getConstantsCategories(options).then((request) => request(this.axios, this.basePath)); - } - + getConstantsCategories: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/constants/categories`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getConstantsDivisions(options?: RawAxiosRequestConfig) { - return ConstantsApiFp(this.configuration).getConstantsDivisions(options).then((request) => request(this.axios, this.basePath)); - } - + getConstantsDivisions: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/constants/divisions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getConstantsEventTypes(options?: RawAxiosRequestConfig) { - return ConstantsApiFp(this.configuration).getConstantsEventTypes(options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * DocApi - axios parameter creator - */ -export const DocApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarAssetsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/car/assets`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarClassDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/carclass`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarClassGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/carclass/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/car`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/car/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsCategoriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/constants/categories`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsDivisionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/constants/divisions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/constants`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsEventTypesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/constants/event_types`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {IracingCategory} category Racing category. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDriverStatsByCategoryCategoryDocs: async (category: IracingCategory, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'category' is not null or undefined - assertParamExists('getDriverStatsByCategoryCategoryDocs', 'category', category) - const localVarPath = `/data/doc/driver_stats_by_category/{category}` - .replace(`{${"category"}}`, encodeURIComponent(String(category))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDriverStatsByCategoryDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/driver_stats_by_category`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedCombinedSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/hosted/combined_sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/hosted`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/hosted/sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueCustomerLeagueSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/cust_league_sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueDirectoryDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/directory`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueGetPointsSystemsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/get_points_systems`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueMembershipDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/membership`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueRosterDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/roster`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonSessionsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/season_sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/season_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/league/seasons`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupCountriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/lookup/countries`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/lookup`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupDriversDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/lookup/drivers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupFlairsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/lookup/flairs`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/lookup/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupLicensesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/lookup/licenses`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwardInstancesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member/award_instances`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwardsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member/awards`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberChartDataDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member/chart_data`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberInfoDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member/info`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberParticipationCreditsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member/participation_credits`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberProfileDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/member/profile`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsEventLogDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results/event_log`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapChartDataDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results/lap_chart_data`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapDataDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results/lap_data`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchHostedDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results/search_hosted`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchSeriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results/search_series`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSeasonResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/results/season_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/season`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonListDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/season/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonRaceGuideDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/season/race_guide`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIdsDetailDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/season/spectator_subsessionids_detail`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIdsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/season/spectator_subsessionids`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesAssetsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series/assets`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesPastSeasonsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series/past_seasons`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonListDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series/season_list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonScheduleDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series/season_schedule`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series/seasons`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesStatsSeriesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/series/stats_series`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberBestsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/member_bests`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberCareerDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/member_career`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberDivisionDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/member_division`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecapDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/member_recap`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecentRacesDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/member_recent_races`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberSummaryDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/member_summary`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberYearlyDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/member_yearly`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonDriverStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/season_driver_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonQualifyResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/season_qualify_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonSupersessionStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/season_supersession_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTTResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/season_tt_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTTStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/season_tt_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTeamStandingsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/season_team_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsWorldRecordsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/stats/world_records`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/team`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/team/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamMembershipDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/team/membership`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTimeAttackDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/time_attack`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTimeAttackMemberSeasonResultsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/time_attack/member_season_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackAssetsDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/track/assets`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/track`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackGetDocs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/doc/track/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DocApi - functional programming interface - */ -export const DocApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DocApiAxiosParamCreator(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCarAssetsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCarAssetsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getCarAssetsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCarClassDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCarClassDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getCarClassDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCarClassGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCarClassGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getCarClassGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCarDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCarDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getCarDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCarGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCarGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getCarGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConstantsCategoriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsCategoriesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsCategoriesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConstantsDivisionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsDivisionsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsDivisionsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConstantsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConstantsEventTypesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConstantsEventTypesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getConstantsEventTypesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {IracingCategory} category Racing category. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDriverStatsByCategoryCategoryDocs(category: IracingCategory, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDriverStatsByCategoryCategoryDocs(category, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getDriverStatsByCategoryCategoryDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDriverStatsByCategoryDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDriverStatsByCategoryDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getDriverStatsByCategoryDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHostedCombinedSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedCombinedSessionsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getHostedCombinedSessionsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHostedDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getHostedDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHostedSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedSessionsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getHostedSessionsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueCustomerLeagueSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueCustomerLeagueSessionsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueCustomerLeagueSessionsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueDirectoryDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueDirectoryDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueDirectoryDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueGetPointsSystemsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueGetPointsSystemsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueGetPointsSystemsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueMembershipDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueMembershipDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueMembershipDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueRosterDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueRosterDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueRosterDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueSeasonSessionsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonSessionsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueSeasonSessionsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueSeasonStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonStandingsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueSeasonStandingsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueSeasonsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLeagueSeasonsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupCountriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupCountriesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupCountriesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupDriversDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupDriversDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupDriversDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupFlairsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupFlairsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupFlairsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupLicensesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupLicensesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getLookupLicensesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberAwardInstancesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwardInstancesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberAwardInstancesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberAwardsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwardsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberAwardsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberChartDataDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberChartDataDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberChartDataDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberInfoDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberInfoDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberInfoDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberParticipationCreditsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberParticipationCreditsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberParticipationCreditsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberProfileDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberProfileDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getMemberProfileDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsEventLogDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsEventLogDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsEventLogDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsLapChartDataDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapChartDataDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsLapChartDataDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsLapDataDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapDataDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsLapDataDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsSearchHostedDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchHostedDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsSearchHostedDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsSearchSeriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchSeriesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsSearchSeriesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsSeasonResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSeasonResultsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getResultsSeasonResultsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonListDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonListDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonListDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonRaceGuideDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonRaceGuideDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonRaceGuideDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonSpectatorSubsessionIdsDetailDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDetailDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonSpectatorSubsessionIdsDetailDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonSpectatorSubsessionIdsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeasonSpectatorSubsessionIdsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesAssetsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesAssetsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesAssetsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesPastSeasonsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesPastSeasonsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesPastSeasonsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesSeasonListDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonListDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesSeasonListDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesSeasonScheduleDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonScheduleDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesSeasonScheduleDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesSeasonsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesSeasonsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesStatsSeriesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesStatsSeriesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getSeriesStatsSeriesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberBestsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberBestsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberBestsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberCareerDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberCareerDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberCareerDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberDivisionDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberDivisionDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberDivisionDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberRecapDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecapDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberRecapDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberRecentRacesDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecentRacesDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberRecentRacesDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberSummaryDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberSummaryDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberSummaryDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberYearlyDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberYearlyDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsMemberYearlyDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonDriverStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonDriverStandingsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonDriverStandingsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonQualifyResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonQualifyResultsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonQualifyResultsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonSupersessionStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonSupersessionStandingsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonSupersessionStandingsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonTTResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTTResultsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonTTResultsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonTTStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTTStandingsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonTTStandingsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonTeamStandingsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTeamStandingsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsSeasonTeamStandingsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsWorldRecordsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsWorldRecordsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getStatsWorldRecordsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTeamDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTeamDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTeamGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTeamGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTeamMembershipDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamMembershipDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTeamMembershipDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTimeAttackDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeAttackDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTimeAttackDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTimeAttackMemberSeasonResultsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeAttackMemberSeasonResultsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTimeAttackMemberSeasonResultsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTrackAssetsDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackAssetsDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTrackAssetsDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTrackDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTrackDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTrackGetDocs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackGetDocs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DocApi.getTrackGetDocs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * DocApi - factory interface - */ -export const DocApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DocApiFp(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarAssetsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getCarAssetsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarClassDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getCarClassDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarClassGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getCarClassGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getCarDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCarGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getCarGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsCategoriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getConstantsCategoriesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsDivisionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getConstantsDivisionsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getConstantsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConstantsEventTypesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getConstantsEventTypesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }> { - return localVarFp.getDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {DocApiGetDriverStatsByCategoryCategoryDocsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDriverStatsByCategoryCategoryDocs(requestParameters: DocApiGetDriverStatsByCategoryCategoryDocsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getDriverStatsByCategoryCategoryDocs(requestParameters.category, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDriverStatsByCategoryDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getDriverStatsByCategoryDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedCombinedSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getHostedCombinedSessionsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getHostedDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getHostedSessionsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueCustomerLeagueSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueCustomerLeagueSessionsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueDirectoryDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueDirectoryDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getLeagueDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueGetPointsSystemsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueGetPointsSystemsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueMembershipDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueMembershipDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueRosterDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueRosterDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonSessionsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueSeasonSessionsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueSeasonStandingsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueSeasonsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupCountriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupCountriesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getLookupDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupDriversDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupDriversDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupFlairsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupFlairsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupLicensesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupLicensesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwardInstancesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberAwardInstancesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwardsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberAwardsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberChartDataDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberChartDataDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getMemberDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberInfoDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberInfoDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberParticipationCreditsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberParticipationCreditsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberProfileDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberProfileDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getResultsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsEventLogDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsEventLogDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapChartDataDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsLapChartDataDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapDataDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsLapDataDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchHostedDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsSearchHostedDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchSeriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsSearchSeriesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSeasonResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsSeasonResultsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getSeasonDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonListDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonListDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonRaceGuideDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonRaceGuideDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIdsDetailDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonSpectatorSubsessionIdsDetailDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIdsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonSpectatorSubsessionIdsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesAssetsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesAssetsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getSeriesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesPastSeasonsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesPastSeasonsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonListDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesSeasonListDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonScheduleDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesSeasonScheduleDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesSeasonsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesStatsSeriesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesStatsSeriesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getStatsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberBestsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberBestsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberCareerDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberCareerDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberDivisionDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberDivisionDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecapDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberRecapDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecentRacesDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberRecentRacesDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberSummaryDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberSummaryDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberYearlyDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberYearlyDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonDriverStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonDriverStandingsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonQualifyResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonQualifyResultsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonSupersessionStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonSupersessionStandingsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTTResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonTTResultsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTTStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonTTStandingsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTeamStandingsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonTeamStandingsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsWorldRecordsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsWorldRecordsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getTeamDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTeamGetDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamMembershipDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTeamMembershipDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTimeAttackDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getTimeAttackDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTimeAttackMemberSeasonResultsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTimeAttackMemberSeasonResultsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackAssetsDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTrackAssetsDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackDocs(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: IracingServiceMethodDocs; }> { - return localVarFp.getTrackDocs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackGetDocs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTrackGetDocs(options).then((request) => request(axios, basePath)); - }, - }; + getConstantsEventTypes: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/constants/event_types`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** - * Request parameters for getDriverStatsByCategoryCategoryDocs operation in DocApi. + * ConstantsApi - functional programming interface */ -export interface DocApiGetDriverStatsByCategoryCategoryDocsRequest { +export const ConstantsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + ConstantsApiAxiosParamCreator(configuration); + return { /** - * Racing category. + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly category: IracingCategory -} - -/** - * DocApi - object-oriented interface - */ -export class DocApi extends BaseAPI { + async getConstantsCategories( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getConstantsCategories(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ConstantsApi.getConstantsCategories"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, /** - * + * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCarAssetsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getCarAssetsDocs(options).then((request) => request(this.axios, this.basePath)); - } - + async getConstantsDivisions( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getConstantsDivisions(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ConstantsApi.getConstantsDivisions"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, /** - * + * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCarClassDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getCarClassDocs(options).then((request) => request(this.axios, this.basePath)); - } + async getConstantsEventTypes( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getConstantsEventTypes(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ConstantsApi.getConstantsEventTypes"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; +/** + * ConstantsApi - factory interface + */ +export const ConstantsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ConstantsApiFp(configuration); + return { /** - * + * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCarClassGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getCarClassGetDocs(options).then((request) => request(this.axios, this.basePath)); - } - + getConstantsCategories( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getConstantsCategories(options) + .then((request) => request(axios, basePath)); + }, /** - * + * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCarDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getCarDocs(options).then((request) => request(this.axios, this.basePath)); - } - + getConstantsDivisions( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getConstantsDivisions(options) + .then((request) => request(axios, basePath)); + }, /** - * + * Constant; returned directly as an array of objects * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getCarGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getCarGetDocs(options).then((request) => request(this.axios, this.basePath)); - } + getConstantsEventTypes( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getConstantsEventTypes(options) + .then((request) => request(axios, basePath)); + }, + }; +}; +/** + * ConstantsApi - object-oriented interface + */ +export class ConstantsApi extends BaseAPI { + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsCategories(options?: RawAxiosRequestConfig) { + return ConstantsApiFp(this.configuration) + .getConstantsCategories(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsDivisions(options?: RawAxiosRequestConfig) { + return ConstantsApiFp(this.configuration) + .getConstantsDivisions(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Constant; returned directly as an array of objects + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsEventTypes(options?: RawAxiosRequestConfig) { + return ConstantsApiFp(this.configuration) + .getConstantsEventTypes(options) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * DocApi - axios parameter creator + */ +export const DocApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getConstantsCategoriesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getConstantsCategoriesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getCarAssetsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/car/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getConstantsDivisionsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getConstantsDivisionsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getCarClassDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/carclass`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getConstantsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getConstantsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getCarClassGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/carclass/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getConstantsEventTypesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getConstantsEventTypesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getCarDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/car`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {DocApiGetDriverStatsByCategoryCategoryDocsRequest} requestParameters Request parameters. + getCarGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/car/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getDriverStatsByCategoryCategoryDocs(requestParameters: DocApiGetDriverStatsByCategoryCategoryDocsRequest, options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getDriverStatsByCategoryCategoryDocs(requestParameters.category, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getConstantsCategoriesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/constants/categories`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getDriverStatsByCategoryDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getDriverStatsByCategoryDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getConstantsDivisionsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/constants/divisions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getHostedCombinedSessionsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getHostedCombinedSessionsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getConstantsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/constants`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getHostedDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getHostedDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getConstantsEventTypesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/constants/event_types`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getHostedSessionsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getHostedSessionsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {IracingCategory} category Racing category. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueCustomerLeagueSessionsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueCustomerLeagueSessionsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getDriverStatsByCategoryCategoryDocs: async ( + category: IracingCategory, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'category' is not null or undefined + assertParamExists( + "getDriverStatsByCategoryCategoryDocs", + "category", + category, + ); + const localVarPath = + `/data/doc/driver_stats_by_category/{category}`.replace( + `{${"category"}}`, + encodeURIComponent(String(category)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueDirectoryDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueDirectoryDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getDriverStatsByCategoryDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/driver_stats_by_category`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getHostedCombinedSessionsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/hosted/combined_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueGetDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getHostedDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/hosted`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueGetPointsSystemsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueGetPointsSystemsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getHostedSessionsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/hosted/sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueMembershipDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueMembershipDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueCustomerLeagueSessionsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/cust_league_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueRosterDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueRosterDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueDirectoryDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/directory`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueSeasonSessionsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueSeasonSessionsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueSeasonStandingsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueSeasonStandingsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueSeasonsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLeagueSeasonsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueGetPointsSystemsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/get_points_systems`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupCountriesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLookupCountriesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueMembershipDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLookupDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueRosterDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/roster`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupDriversDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLookupDriversDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueSeasonSessionsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/season_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupFlairsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLookupFlairsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueSeasonStandingsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/season_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLookupGetDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLeagueSeasonsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/league/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupLicensesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getLookupLicensesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLookupCountriesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/lookup/countries`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberAwardInstancesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberAwardInstancesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLookupDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/lookup`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberAwardsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberAwardsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLookupDriversDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/lookup/drivers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberChartDataDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberChartDataDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLookupFlairsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/lookup/flairs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLookupGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/lookup/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberGetDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getLookupLicensesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/lookup/licenses`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberInfoDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberInfoDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberAwardInstancesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member/award_instances`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberParticipationCreditsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberParticipationCreditsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberAwardsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member/awards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberProfileDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getMemberProfileDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberChartDataDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member/chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsEventLogDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsEventLogDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsGetDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberInfoDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member/info`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsLapChartDataDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsLapChartDataDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberParticipationCreditsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member/participation_credits`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsLapDataDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsLapDataDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberProfileDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/member/profile`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsSearchHostedDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsSearchHostedDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsSearchSeriesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsSearchSeriesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsEventLogDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results/event_log`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsSeasonResultsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getResultsSeasonResultsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeasonDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsLapChartDataDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results/lap_chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonListDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeasonListDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsLapDataDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results/lap_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonRaceGuideDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeasonRaceGuideDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsSearchHostedDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results/search_hosted`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonSpectatorSubsessionIdsDetailDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeasonSpectatorSubsessionIdsDetailDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsSearchSeriesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results/search_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonSpectatorSubsessionIdsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeasonSpectatorSubsessionIdsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsSeasonResultsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/results/season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesAssetsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesAssetsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeasonDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/season`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeasonListDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/season/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesGetDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeasonRaceGuideDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/season/race_guide`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesPastSeasonsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesPastSeasonsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeasonSpectatorSubsessionIdsDetailDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/season/spectator_subsessionids_detail`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesSeasonListDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesSeasonListDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeasonSpectatorSubsessionIdsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/season/spectator_subsessionids`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesSeasonScheduleDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesSeasonScheduleDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesAssetsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesSeasonsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesSeasonsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesStatsSeriesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getSeriesStatsSeriesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesPastSeasonsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series/past_seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsMemberBestsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsMemberBestsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesSeasonListDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series/season_list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsMemberCareerDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsMemberCareerDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesSeasonScheduleDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series/season_schedule`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsMemberDivisionDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsMemberDivisionDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesSeasonsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsMemberRecapDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsMemberRecapDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getSeriesStatsSeriesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/series/stats_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsMemberRecentRacesDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsMemberRecentRacesDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsMemberSummaryDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsMemberSummaryDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsMemberBestsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/member_bests`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsMemberYearlyDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsMemberYearlyDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsMemberCareerDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/member_career`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonDriverStandingsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsSeasonDriverStandingsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsMemberDivisionDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/member_division`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonQualifyResultsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsSeasonQualifyResultsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsMemberRecapDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/member_recap`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonSupersessionStandingsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsSeasonSupersessionStandingsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsMemberRecentRacesDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/member_recent_races`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonTTResultsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsSeasonTTResultsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsMemberSummaryDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/member_summary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonTTStandingsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsSeasonTTStandingsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsMemberYearlyDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/member_yearly`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonTeamStandingsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsSeasonTeamStandingsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonDriverStandingsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/season_driver_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsWorldRecordsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getStatsWorldRecordsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonQualifyResultsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/season_qualify_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTeamDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTeamDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonSupersessionStandingsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/season_supersession_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTeamGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTeamGetDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonTTResultsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/season_tt_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTeamMembershipDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTeamMembershipDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonTTStandingsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/season_tt_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTimeAttackDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTimeAttackDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonTeamStandingsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/season_team_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTimeAttackMemberSeasonResultsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTimeAttackMemberSeasonResultsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsWorldRecordsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/stats/world_records`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTrackAssetsDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTrackAssetsDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getTeamDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/team`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTrackDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTrackDocs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getTeamGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/team/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTrackGetDocs(options?: RawAxiosRequestConfig) { - return DocApiFp(this.configuration).getTrackGetDocs(options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * DriverStatsApi - axios parameter creator - */ -export const DriverStatsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {IracingCategory} category Racing category. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDriverStatsByCategory: async (category: IracingCategory, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'category' is not null or undefined - assertParamExists('getDriverStatsByCategory', 'category', category) - const localVarPath = `/data/driver_stats_by_category/{category}` - .replace(`{${"category"}}`, encodeURIComponent(String(category))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DriverStatsApi - functional programming interface - */ -export const DriverStatsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DriverStatsApiAxiosParamCreator(configuration) - return { - /** - * - * @param {IracingCategory} category Racing category. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getDriverStatsByCategory(category: IracingCategory, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getDriverStatsByCategory(category, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['DriverStatsApi.getDriverStatsByCategory']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * DriverStatsApi - factory interface - */ -export const DriverStatsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DriverStatsApiFp(configuration) - return { - /** - * - * @param {DriverStatsApiGetDriverStatsByCategoryRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getDriverStatsByCategory(requestParameters: DriverStatsApiGetDriverStatsByCategoryRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getDriverStatsByCategory(requestParameters.category, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for getDriverStatsByCategory operation in DriverStatsApi. - */ -export interface DriverStatsApiGetDriverStatsByCategoryRequest { - /** - * Racing category. + getTeamMembershipDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/team/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly category: IracingCategory -} - -/** - * DriverStatsApi - object-oriented interface - */ -export class DriverStatsApi extends BaseAPI { - /** - * - * @param {DriverStatsApiGetDriverStatsByCategoryRequest} requestParameters Request parameters. + getTimeAttackDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/time_attack`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getDriverStatsByCategory(requestParameters: DriverStatsApiGetDriverStatsByCategoryRequest, options?: RawAxiosRequestConfig) { - return DriverStatsApiFp(this.configuration).getDriverStatsByCategory(requestParameters.category, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * HostedApi - axios parameter creator - */ -export const HostedApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. - * @param {number} [package_id] If set, return only sessions using this car or track package ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedCombinedSessions: async (package_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/hosted/combined_sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (package_id !== undefined) { - localVarQueryParameter['package_id'] = package_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedSessions: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/hosted/sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * HostedApi - functional programming interface - */ -export const HostedApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = HostedApiAxiosParamCreator(configuration) - return { - /** - * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. - * @param {number} [package_id] If set, return only sessions using this car or track package ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHostedCombinedSessions(package_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedCombinedSessions(package_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['HostedApi.getHostedCombinedSessions']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getHostedSessions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getHostedSessions(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['HostedApi.getHostedSessions']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * HostedApi - factory interface - */ -export const HostedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = HostedApiFp(configuration) - return { - /** - * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. - * @param {HostedApiGetHostedCombinedSessionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedCombinedSessions(requestParameters: HostedApiGetHostedCombinedSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getHostedCombinedSessions(requestParameters.package_id, options).then((request) => request(axios, basePath)); - }, - /** - * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getHostedSessions(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getHostedSessions(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for getHostedCombinedSessions operation in HostedApi. - */ -export interface HostedApiGetHostedCombinedSessionsRequest { - /** - * If set, return only sessions using this car or track package ID. + getTimeAttackMemberSeasonResultsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/time_attack/member_season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly package_id?: number -} - -/** - * HostedApi - object-oriented interface - */ -export class HostedApi extends BaseAPI { - /** - * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. - * @param {HostedApiGetHostedCombinedSessionsRequest} requestParameters Request parameters. + getTrackAssetsDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/track/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getHostedCombinedSessions(requestParameters: HostedApiGetHostedCombinedSessionsRequest = {}, options?: RawAxiosRequestConfig) { - return HostedApiFp(this.configuration).getHostedCombinedSessions(requestParameters.package_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + getTrackDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/track`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getHostedSessions(options?: RawAxiosRequestConfig) { - return HostedApiFp(this.configuration).getHostedSessions(options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * LeagueApi - axios parameter creator - */ -export const LeagueApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {number} league_id - * @param {boolean} [include_licenses] For faster responses, only request when necessary. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeague: async (league_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'league_id' is not null or undefined - assertParamExists('getLeague', 'league_id', league_id) - const localVarPath = `/data/league/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - if (include_licenses !== undefined) { - localVarQueryParameter['include_licenses'] = include_licenses; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {boolean} [mine] If true, return only sessions created by this user. - * @param {number} [package_id] If set, return only sessions using this car or track package ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueCustomerLeagueSessions: async (mine?: boolean, package_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/league/cust_league_sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (mine !== undefined) { - localVarQueryParameter['mine'] = mine; - } - - if (package_id !== undefined) { - localVarQueryParameter['package_id'] = package_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {string} [search] Will search against league name, description, owner, and league ID. - * @param {string} [tag] One or more tags, comma-separated. - * @param {boolean} [restrict_to_member] If true include only leagues for which customer is a member. - * @param {boolean} [restrict_to_recruiting] If true include only leagues which are recruiting. - * @param {boolean} [restrict_to_friends] If true include only leagues owned by a friend. - * @param {boolean} [restrict_to_watched] If true include only leagues owned by a watched member. - * @param {number} [minimum_roster_count] If set include leagues with at least this number of members. - * @param {number} [maximum_roster_count] If set include leagues with no more than this number of members. - * @param {number} [lowerbound] First row of results to return. Defaults to 1. - * @param {number} [upperbound] Last row of results to return. Defaults to lowerbound + 39. - * @param {string} [sort] One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. - * @param {string} [order] One of asc or desc. Defaults to asc. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueDirectory: async (search?: string, tag?: string, restrict_to_member?: boolean, restrict_to_recruiting?: boolean, restrict_to_friends?: boolean, restrict_to_watched?: boolean, minimum_roster_count?: number, maximum_roster_count?: number, lowerbound?: number, upperbound?: number, sort?: string, order?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/league/directory`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (search !== undefined) { - localVarQueryParameter['search'] = search; - } - - if (tag !== undefined) { - localVarQueryParameter['tag'] = tag; - } - - if (restrict_to_member !== undefined) { - localVarQueryParameter['restrict_to_member'] = restrict_to_member; - } - - if (restrict_to_recruiting !== undefined) { - localVarQueryParameter['restrict_to_recruiting'] = restrict_to_recruiting; - } - - if (restrict_to_friends !== undefined) { - localVarQueryParameter['restrict_to_friends'] = restrict_to_friends; - } - - if (restrict_to_watched !== undefined) { - localVarQueryParameter['restrict_to_watched'] = restrict_to_watched; - } - - if (minimum_roster_count !== undefined) { - localVarQueryParameter['minimum_roster_count'] = minimum_roster_count; - } - - if (maximum_roster_count !== undefined) { - localVarQueryParameter['maximum_roster_count'] = maximum_roster_count; - } - - if (lowerbound !== undefined) { - localVarQueryParameter['lowerbound'] = lowerbound; - } - - if (upperbound !== undefined) { - localVarQueryParameter['upperbound'] = upperbound; - } - - if (sort !== undefined) { - localVarQueryParameter['sort'] = sort; - } - - if (order !== undefined) { - localVarQueryParameter['order'] = order; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [cust_id] If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. - * @param {boolean} [include_league] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueMembership: async (cust_id?: number, include_league?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/league/membership`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (include_league !== undefined) { - localVarQueryParameter['include_league'] = include_league; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} league_id - * @param {number} [season_id] If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeaguePointsSystems: async (league_id: number, season_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'league_id' is not null or undefined - assertParamExists('getLeaguePointsSystems', 'league_id', league_id) - const localVarPath = `/data/league/get_points_systems`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} league_id - * @param {boolean} [include_licenses] For faster responses, only request when necessary. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueRoster: async (league_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'league_id' is not null or undefined - assertParamExists('getLeagueRoster', 'league_id', league_id) - const localVarPath = `/data/league/roster`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - if (include_licenses !== undefined) { - localVarQueryParameter['include_licenses'] = include_licenses; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} league_id - * @param {number} season_id - * @param {boolean} [results_only] If true include only sessions for which results are available. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonSessions: async (league_id: number, season_id: number, results_only?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'league_id' is not null or undefined - assertParamExists('getLeagueSeasonSessions', 'league_id', league_id) - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getLeagueSeasonSessions', 'season_id', season_id) - const localVarPath = `/data/league/season_sessions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (results_only !== undefined) { - localVarQueryParameter['results_only'] = results_only; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} league_id - * @param {number} season_id - * @param {number} [car_class_id] - * @param {number} [car_id] If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonStandings: async (league_id: number, season_id: number, car_class_id?: number, car_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'league_id' is not null or undefined - assertParamExists('getLeagueSeasonStandings', 'league_id', league_id) - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getLeagueSeasonStandings', 'season_id', season_id) - const localVarPath = `/data/league/season_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (car_class_id !== undefined) { - localVarQueryParameter['car_class_id'] = car_class_id; - } - - if (car_id !== undefined) { - localVarQueryParameter['car_id'] = car_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} league_id - * @param {boolean} [retired] If true include seasons which are no longer active. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasons: async (league_id: number, retired?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'league_id' is not null or undefined - assertParamExists('getLeagueSeasons', 'league_id', league_id) - const localVarPath = `/data/league/seasons`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - if (retired !== undefined) { - localVarQueryParameter['retired'] = retired; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * LeagueApi - functional programming interface - */ -export const LeagueApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = LeagueApiAxiosParamCreator(configuration) - return { - /** - * - * @param {number} league_id - * @param {boolean} [include_licenses] For faster responses, only request when necessary. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeague(league_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeague(league_id, include_licenses, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeague']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {boolean} [mine] If true, return only sessions created by this user. - * @param {number} [package_id] If set, return only sessions using this car or track package ID. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueCustomerLeagueSessions(mine?: boolean, package_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueCustomerLeagueSessions(mine, package_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueCustomerLeagueSessions']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {string} [search] Will search against league name, description, owner, and league ID. - * @param {string} [tag] One or more tags, comma-separated. - * @param {boolean} [restrict_to_member] If true include only leagues for which customer is a member. - * @param {boolean} [restrict_to_recruiting] If true include only leagues which are recruiting. - * @param {boolean} [restrict_to_friends] If true include only leagues owned by a friend. - * @param {boolean} [restrict_to_watched] If true include only leagues owned by a watched member. - * @param {number} [minimum_roster_count] If set include leagues with at least this number of members. - * @param {number} [maximum_roster_count] If set include leagues with no more than this number of members. - * @param {number} [lowerbound] First row of results to return. Defaults to 1. - * @param {number} [upperbound] Last row of results to return. Defaults to lowerbound + 39. - * @param {string} [sort] One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. - * @param {string} [order] One of asc or desc. Defaults to asc. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueDirectory(search?: string, tag?: string, restrict_to_member?: boolean, restrict_to_recruiting?: boolean, restrict_to_friends?: boolean, restrict_to_watched?: boolean, minimum_roster_count?: number, maximum_roster_count?: number, lowerbound?: number, upperbound?: number, sort?: string, order?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueDirectory(search, tag, restrict_to_member, restrict_to_recruiting, restrict_to_friends, restrict_to_watched, minimum_roster_count, maximum_roster_count, lowerbound, upperbound, sort, order, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueDirectory']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [cust_id] If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. - * @param {boolean} [include_league] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueMembership(cust_id?: number, include_league?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueMembership(cust_id, include_league, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueMembership']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} league_id - * @param {number} [season_id] If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeaguePointsSystems(league_id: number, season_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeaguePointsSystems(league_id, season_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeaguePointsSystems']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} league_id - * @param {boolean} [include_licenses] For faster responses, only request when necessary. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueRoster(league_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueRoster(league_id, include_licenses, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueRoster']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} league_id - * @param {number} season_id - * @param {boolean} [results_only] If true include only sessions for which results are available. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueSeasonSessions(league_id: number, season_id: number, results_only?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonSessions(league_id, season_id, results_only, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueSeasonSessions']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} league_id - * @param {number} season_id - * @param {number} [car_class_id] - * @param {number} [car_id] If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueSeasonStandings(league_id: number, season_id: number, car_class_id?: number, car_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasonStandings(league_id, season_id, car_class_id, car_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueSeasonStandings']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} league_id - * @param {boolean} [retired] If true include seasons which are no longer active. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLeagueSeasons(league_id: number, retired?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueSeasons(league_id, retired, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LeagueApi.getLeagueSeasons']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } + getTrackGetDocs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/doc/track/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** - * LeagueApi - factory interface - */ -export const LeagueApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = LeagueApiFp(configuration) - return { - /** - * - * @param {LeagueApiGetLeagueRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeague(requestParameters: LeagueApiGetLeagueRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeague(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeagueCustomerLeagueSessionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueCustomerLeagueSessions(requestParameters: LeagueApiGetLeagueCustomerLeagueSessionsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueCustomerLeagueSessions(requestParameters.mine, requestParameters.package_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeagueDirectoryRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueDirectory(requestParameters: LeagueApiGetLeagueDirectoryRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueDirectory(requestParameters.search, requestParameters.tag, requestParameters.restrict_to_member, requestParameters.restrict_to_recruiting, requestParameters.restrict_to_friends, requestParameters.restrict_to_watched, requestParameters.minimum_roster_count, requestParameters.maximum_roster_count, requestParameters.lowerbound, requestParameters.upperbound, requestParameters.sort, requestParameters.order, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeagueMembershipRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueMembership(requestParameters: LeagueApiGetLeagueMembershipRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueMembership(requestParameters.cust_id, requestParameters.include_league, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeaguePointsSystemsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeaguePointsSystems(requestParameters: LeagueApiGetLeaguePointsSystemsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeaguePointsSystems(requestParameters.league_id, requestParameters.season_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeagueRosterRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueRoster(requestParameters: LeagueApiGetLeagueRosterRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueRoster(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeagueSeasonSessionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonSessions(requestParameters: LeagueApiGetLeagueSeasonSessionsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueSeasonSessions(requestParameters.league_id, requestParameters.season_id, requestParameters.results_only, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeagueSeasonStandingsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasonStandings(requestParameters: LeagueApiGetLeagueSeasonStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueSeasonStandings(requestParameters.league_id, requestParameters.season_id, requestParameters.car_class_id, requestParameters.car_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LeagueApiGetLeagueSeasonsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLeagueSeasons(requestParameters: LeagueApiGetLeagueSeasonsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLeagueSeasons(requestParameters.league_id, requestParameters.retired, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for getLeague operation in LeagueApi. + * DocApi - functional programming interface */ -export interface LeagueApiGetLeagueRequest { - readonly league_id: number - +export const DocApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = DocApiAxiosParamCreator(configuration); + return { /** - * For faster responses, only request when necessary. + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly include_licenses?: boolean -} - -/** - * Request parameters for getLeagueCustomerLeagueSessions operation in LeagueApi. - */ -export interface LeagueApiGetLeagueCustomerLeagueSessionsRequest { - /** - * If true, return only sessions created by this user. + async getCarAssetsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getCarAssetsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getCarAssetsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly mine?: boolean - - /** - * If set, return only sessions using this car or track package ID. + async getCarClassDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getCarClassDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getCarClassDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly package_id?: number -} - -/** - * Request parameters for getLeagueDirectory operation in LeagueApi. - */ -export interface LeagueApiGetLeagueDirectoryRequest { - /** - * Will search against league name, description, owner, and league ID. + async getCarClassGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getCarClassGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getCarClassGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly search?: string - - /** - * One or more tags, comma-separated. + async getCarDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getCarDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getCarDocs"]?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly tag?: string - - /** - * If true include only leagues for which customer is a member. + async getCarGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getCarGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getCarGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly restrict_to_member?: boolean - - /** - * If true include only leagues which are recruiting. + async getConstantsCategoriesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getConstantsCategoriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getConstantsCategoriesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly restrict_to_recruiting?: boolean - - /** - * If true include only leagues owned by a friend. + async getConstantsDivisionsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getConstantsDivisionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getConstantsDivisionsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly restrict_to_friends?: boolean - - /** - * If true include only leagues owned by a watched member. + async getConstantsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getConstantsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getConstantsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly restrict_to_watched?: boolean - - /** - * If set include leagues with at least this number of members. + async getConstantsEventTypesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getConstantsEventTypesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getConstantsEventTypesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly minimum_roster_count?: number - - /** - * If set include leagues with no more than this number of members. + async getDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ + [key: string]: { [key: string]: IracingServiceMethodDocs }; + }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getDocs"]?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {IracingCategory} category Racing category. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly maximum_roster_count?: number - - /** - * First row of results to return. Defaults to 1. + async getDriverStatsByCategoryCategoryDocs( + category: IracingCategory, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getDriverStatsByCategoryCategoryDocs( + category, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getDriverStatsByCategoryCategoryDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly lowerbound?: number - - /** - * Last row of results to return. Defaults to lowerbound + 39. + async getDriverStatsByCategoryDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getDriverStatsByCategoryDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getDriverStatsByCategoryDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly upperbound?: number - - /** - * One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. + async getHostedCombinedSessionsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getHostedCombinedSessionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getHostedCombinedSessionsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sort?: string - - /** - * One of asc or desc. Defaults to asc. + async getHostedDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getHostedDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getHostedDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly order?: string -} - -/** - * Request parameters for getLeagueMembership operation in LeagueApi. - */ -export interface LeagueApiGetLeagueMembershipRequest { - /** - * If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + async getHostedSessionsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getHostedSessionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getHostedSessionsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly cust_id?: number - - readonly include_league?: boolean -} - -/** - * Request parameters for getLeaguePointsSystems operation in LeagueApi. - */ -export interface LeagueApiGetLeaguePointsSystemsRequest { - readonly league_id: number - - /** - * If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + async getLeagueCustomerLeagueSessionsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueCustomerLeagueSessionsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueCustomerLeagueSessionsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly season_id?: number -} - -/** - * Request parameters for getLeagueRoster operation in LeagueApi. - */ -export interface LeagueApiGetLeagueRosterRequest { - readonly league_id: number - + async getLeagueDirectoryDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueDirectoryDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueDirectoryDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueGetPointsSystemsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueGetPointsSystemsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueGetPointsSystemsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueMembershipDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueMembershipDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueMembershipDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueRosterDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueRosterDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueRosterDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonSessionsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueSeasonSessionsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueSeasonSessionsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonStandingsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueSeasonStandingsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueSeasonStandingsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueSeasonsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLeagueSeasonsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupCountriesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupCountriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLookupCountriesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLookupDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupDriversDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupDriversDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLookupDriversDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupFlairsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupFlairsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLookupFlairsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLookupGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupLicensesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupLicensesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getLookupLicensesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwardInstancesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberAwardInstancesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberAwardInstancesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwardsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberAwardsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberAwardsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberChartDataDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberChartDataDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberChartDataDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberInfoDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberInfoDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberInfoDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberParticipationCreditsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberParticipationCreditsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberParticipationCreditsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberProfileDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberProfileDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getMemberProfileDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsEventLogDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsEventLogDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsEventLogDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapChartDataDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsLapChartDataDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsLapChartDataDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapDataDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsLapDataDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsLapDataDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchHostedDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsSearchHostedDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsSearchHostedDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchSeriesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsSearchSeriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsSearchSeriesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSeasonResultsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsSeasonResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getResultsSeasonResultsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeasonDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonListDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonListDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeasonListDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonRaceGuideDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonRaceGuideDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeasonRaceGuideDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonSpectatorSubsessionIdsDetailDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDetailDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + "DocApi.getSeasonSpectatorSubsessionIdsDetailDocs" + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonSpectatorSubsessionIdsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeasonSpectatorSubsessionIdsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesAssetsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesAssetsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesAssetsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesPastSeasonsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesPastSeasonsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesPastSeasonsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonListDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesSeasonListDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesSeasonListDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonScheduleDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesSeasonScheduleDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesSeasonScheduleDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesSeasonsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesSeasonsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesStatsSeriesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesStatsSeriesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getSeriesStatsSeriesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberBestsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberBestsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsMemberBestsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberCareerDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberCareerDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsMemberCareerDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberDivisionDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberDivisionDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsMemberDivisionDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecapDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberRecapDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsMemberRecapDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecentRacesDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberRecentRacesDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsMemberRecentRacesDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberSummaryDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberSummaryDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsMemberSummaryDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberYearlyDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberYearlyDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsMemberYearlyDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonDriverStandingsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonDriverStandingsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsSeasonDriverStandingsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonQualifyResultsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonQualifyResultsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsSeasonQualifyResultsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonSupersessionStandingsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonSupersessionStandingsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsSeasonSupersessionStandingsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTTResultsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonTTResultsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsSeasonTTResultsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTTStandingsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonTTStandingsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsSeasonTTStandingsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTeamStandingsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonTeamStandingsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsSeasonTeamStandingsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsWorldRecordsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsWorldRecordsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getStatsWorldRecordsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeamDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTeamDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTeamDocs"]?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeamGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTeamGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTeamGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTeamMembershipDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTeamMembershipDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTeamMembershipDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTimeAttackDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTimeAttackDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTimeAttackDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTimeAttackMemberSeasonResultsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTimeAttackMemberSeasonResultsDocs( + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTimeAttackMemberSeasonResultsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackAssetsDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTrackAssetsDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTrackAssetsDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTrackDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTrackDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackGetDocs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTrackGetDocs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DocApi.getTrackGetDocs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * DocApi - factory interface + */ +export const DocApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = DocApiFp(configuration); + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarAssetsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getCarAssetsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClassDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getCarClassDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarClassGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getCarClassGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getCarDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCarGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getCarGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsCategoriesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getConstantsCategoriesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDivisionsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getConstantsDivisionsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getConstantsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getConstantsEventTypesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getConstantsEventTypesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ + [key: string]: { [key: string]: IracingServiceMethodDocs }; + }> { + return localVarFp + .getDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {DocApiGetDriverStatsByCategoryCategoryDocsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategoryCategoryDocs( + requestParameters: DocApiGetDriverStatsByCategoryCategoryDocsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getDriverStatsByCategoryCategoryDocs( + requestParameters.category, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategoryDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getDriverStatsByCategoryDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedCombinedSessionsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getHostedCombinedSessionsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getHostedDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedSessionsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getHostedSessionsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueCustomerLeagueSessionsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueCustomerLeagueSessionsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDirectoryDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueDirectoryDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getLeagueDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueGetPointsSystemsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueGetPointsSystemsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueMembershipDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueMembershipDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueRosterDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueRosterDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonSessionsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueSeasonSessionsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonStandingsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueSeasonStandingsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueSeasonsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupCountriesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupCountriesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getLookupDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDriversDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupDriversDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupFlairsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupFlairsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupLicensesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupLicensesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardInstancesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberAwardInstancesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberAwardsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberChartDataDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberChartDataDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getMemberDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberInfoDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberInfoDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberParticipationCreditsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberParticipationCreditsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberProfileDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberProfileDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getResultsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsEventLogDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsEventLogDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapChartDataDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsLapChartDataDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapDataDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsLapDataDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchHostedDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsSearchHostedDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchSeriesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsSearchSeriesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSeasonResultsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsSeasonResultsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getSeasonDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonListDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonListDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonRaceGuideDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonRaceGuideDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDetailDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonSpectatorSubsessionIdsDetailDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIdsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonSpectatorSubsessionIdsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesAssetsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesAssetsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getSeriesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesPastSeasonsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesPastSeasonsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonListDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesSeasonListDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonScheduleDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesSeasonScheduleDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesSeasonsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesStatsSeriesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesStatsSeriesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getStatsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberBestsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberBestsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberCareerDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberCareerDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberDivisionDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberDivisionDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecapDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberRecapDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecentRacesDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberRecentRacesDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberSummaryDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberSummaryDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberYearlyDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberYearlyDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonDriverStandingsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonDriverStandingsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonQualifyResultsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonQualifyResultsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonSupersessionStandingsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonSupersessionStandingsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTTResultsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonTTResultsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTTStandingsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonTTStandingsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTeamStandingsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonTeamStandingsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsWorldRecordsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsWorldRecordsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getTeamDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTeamGetDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTeamMembershipDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTeamMembershipDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getTimeAttackDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackMemberSeasonResultsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTimeAttackMemberSeasonResultsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackAssetsDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTrackAssetsDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise<{ [key: string]: IracingServiceMethodDocs }> { + return localVarFp + .getTrackDocs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackGetDocs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTrackGetDocs(options) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getDriverStatsByCategoryCategoryDocs operation in DocApi. + */ +export interface DocApiGetDriverStatsByCategoryCategoryDocsRequest { + /** + * Racing category. + */ + readonly category: IracingCategory; +} + +/** + * DocApi - object-oriented interface + */ +export class DocApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarAssetsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getCarAssetsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarClassDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getCarClassDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarClassGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getCarClassGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getCarDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getCarGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getCarGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsCategoriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getConstantsCategoriesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsDivisionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getConstantsDivisionsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getConstantsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getConstantsEventTypesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getConstantsEventTypesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {DocApiGetDriverStatsByCategoryCategoryDocsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDriverStatsByCategoryCategoryDocs( + requestParameters: DocApiGetDriverStatsByCategoryCategoryDocsRequest, + options?: RawAxiosRequestConfig, + ) { + return DocApiFp(this.configuration) + .getDriverStatsByCategoryCategoryDocs(requestParameters.category, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDriverStatsByCategoryDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getDriverStatsByCategoryDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedCombinedSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getHostedCombinedSessionsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getHostedDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getHostedSessionsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueCustomerLeagueSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueCustomerLeagueSessionsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueDirectoryDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueDirectoryDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueGetPointsSystemsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueGetPointsSystemsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueMembershipDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueMembershipDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueRosterDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueRosterDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonSessionsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueSeasonSessionsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueSeasonStandingsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLeagueSeasonsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupCountriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLookupCountriesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLookupDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupDriversDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLookupDriversDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupFlairsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLookupFlairsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLookupGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupLicensesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getLookupLicensesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwardInstancesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberAwardInstancesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwardsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberAwardsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberChartDataDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberChartDataDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberInfoDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberInfoDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberParticipationCreditsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberParticipationCreditsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberProfileDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getMemberProfileDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsEventLogDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsEventLogDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapChartDataDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsLapChartDataDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapDataDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsLapDataDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchHostedDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsSearchHostedDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchSeriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsSearchSeriesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSeasonResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getResultsSeasonResultsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeasonDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonListDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeasonListDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonRaceGuideDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeasonRaceGuideDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIdsDetailDocs( + options?: RawAxiosRequestConfig, + ) { + return DocApiFp(this.configuration) + .getSeasonSpectatorSubsessionIdsDetailDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIdsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeasonSpectatorSubsessionIdsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesAssetsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesAssetsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesPastSeasonsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesPastSeasonsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonListDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesSeasonListDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonScheduleDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesSeasonScheduleDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesSeasonsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesStatsSeriesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getSeriesStatsSeriesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberBestsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsMemberBestsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberCareerDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsMemberCareerDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberDivisionDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsMemberDivisionDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecapDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsMemberRecapDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecentRacesDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsMemberRecentRacesDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberSummaryDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsMemberSummaryDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberYearlyDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsMemberYearlyDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonDriverStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsSeasonDriverStandingsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonQualifyResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsSeasonQualifyResultsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonSupersessionStandingsDocs( + options?: RawAxiosRequestConfig, + ) { + return DocApiFp(this.configuration) + .getStatsSeasonSupersessionStandingsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTTResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsSeasonTTResultsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTTStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsSeasonTTStandingsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTeamStandingsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsSeasonTeamStandingsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsWorldRecordsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getStatsWorldRecordsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTeamDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTeamGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamMembershipDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTeamMembershipDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTimeAttackDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTimeAttackDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTimeAttackMemberSeasonResultsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTimeAttackMemberSeasonResultsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackAssetsDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTrackAssetsDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTrackDocs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackGetDocs(options?: RawAxiosRequestConfig) { + return DocApiFp(this.configuration) + .getTrackGetDocs(options) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * DriverStatsApi - axios parameter creator + */ +export const DriverStatsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {IracingCategory} category Racing category. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategory: async ( + category: IracingCategory, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'category' is not null or undefined + assertParamExists("getDriverStatsByCategory", "category", category); + const localVarPath = `/data/driver_stats_by_category/{category}`.replace( + `{${"category"}}`, + encodeURIComponent(String(category)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * DriverStatsApi - functional programming interface + */ +export const DriverStatsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + DriverStatsApiAxiosParamCreator(configuration); + return { + /** + * + * @param {IracingCategory} category Racing category. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDriverStatsByCategory( + category: IracingCategory, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getDriverStatsByCategory( + category, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["DriverStatsApi.getDriverStatsByCategory"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * DriverStatsApi - factory interface + */ +export const DriverStatsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = DriverStatsApiFp(configuration); + return { + /** + * + * @param {DriverStatsApiGetDriverStatsByCategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDriverStatsByCategory( + requestParameters: DriverStatsApiGetDriverStatsByCategoryRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getDriverStatsByCategory(requestParameters.category, options) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getDriverStatsByCategory operation in DriverStatsApi. + */ +export interface DriverStatsApiGetDriverStatsByCategoryRequest { + /** + * Racing category. + */ + readonly category: IracingCategory; +} + +/** + * DriverStatsApi - object-oriented interface + */ +export class DriverStatsApi extends BaseAPI { + /** + * + * @param {DriverStatsApiGetDriverStatsByCategoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getDriverStatsByCategory( + requestParameters: DriverStatsApiGetDriverStatsByCategoryRequest, + options?: RawAxiosRequestConfig, + ) { + return DriverStatsApiFp(this.configuration) + .getDriverStatsByCategory(requestParameters.category, options) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * HostedApi - axios parameter creator + */ +export const HostedApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedCombinedSessions: async ( + package_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/hosted/combined_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (package_id !== undefined) { + localVarQueryParameter["package_id"] = package_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedSessions: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/hosted/sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * HostedApi - functional programming interface + */ +export const HostedApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = HostedApiAxiosParamCreator(configuration); + return { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHostedCombinedSessions( + package_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getHostedCombinedSessions( + package_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["HostedApi.getHostedCombinedSessions"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getHostedSessions( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getHostedSessions(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["HostedApi.getHostedSessions"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * HostedApi - factory interface + */ +export const HostedApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = HostedApiFp(configuration); + return { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {HostedApiGetHostedCombinedSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedCombinedSessions( + requestParameters: HostedApiGetHostedCombinedSessionsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getHostedCombinedSessions(requestParameters.package_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getHostedSessions( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getHostedSessions(options) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getHostedCombinedSessions operation in HostedApi. + */ +export interface HostedApiGetHostedCombinedSessionsRequest { + /** + * If set, return only sessions using this car or track package ID. + */ + readonly package_id?: number; +} + +/** + * HostedApi - object-oriented interface + */ +export class HostedApi extends BaseAPI { + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + * @param {HostedApiGetHostedCombinedSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedCombinedSessions( + requestParameters: HostedApiGetHostedCombinedSessionsRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return HostedApiFp(this.configuration) + .getHostedCombinedSessions(requestParameters.package_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getHostedSessions(options?: RawAxiosRequestConfig) { + return HostedApiFp(this.configuration) + .getHostedSessions(options) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * LeagueApi - axios parameter creator + */ +export const LeagueApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeague: async ( + league_id: number, + include_licenses?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists("getLeague", "league_id", league_id); + const localVarPath = `/data/league/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter["include_licenses"] = include_licenses; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {boolean} [mine] If true, return only sessions created by this user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueCustomerLeagueSessions: async ( + mine?: boolean, + package_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/league/cust_league_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (mine !== undefined) { + localVarQueryParameter["mine"] = mine; + } + + if (package_id !== undefined) { + localVarQueryParameter["package_id"] = package_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} [search] Will search against league name, description, owner, and league ID. + * @param {string} [tag] One or more tags, comma-separated. + * @param {boolean} [restrict_to_member] If true include only leagues for which customer is a member. + * @param {boolean} [restrict_to_recruiting] If true include only leagues which are recruiting. + * @param {boolean} [restrict_to_friends] If true include only leagues owned by a friend. + * @param {boolean} [restrict_to_watched] If true include only leagues owned by a watched member. + * @param {number} [minimum_roster_count] If set include leagues with at least this number of members. + * @param {number} [maximum_roster_count] If set include leagues with no more than this number of members. + * @param {number} [lowerbound] First row of results to return. Defaults to 1. + * @param {number} [upperbound] Last row of results to return. Defaults to lowerbound + 39. + * @param {string} [sort] One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. + * @param {string} [order] One of asc or desc. Defaults to asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDirectory: async ( + search?: string, + tag?: string, + restrict_to_member?: boolean, + restrict_to_recruiting?: boolean, + restrict_to_friends?: boolean, + restrict_to_watched?: boolean, + minimum_roster_count?: number, + maximum_roster_count?: number, + lowerbound?: number, + upperbound?: number, + sort?: string, + order?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/league/directory`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (search !== undefined) { + localVarQueryParameter["search"] = search; + } + + if (tag !== undefined) { + localVarQueryParameter["tag"] = tag; + } + + if (restrict_to_member !== undefined) { + localVarQueryParameter["restrict_to_member"] = restrict_to_member; + } + + if (restrict_to_recruiting !== undefined) { + localVarQueryParameter["restrict_to_recruiting"] = + restrict_to_recruiting; + } + + if (restrict_to_friends !== undefined) { + localVarQueryParameter["restrict_to_friends"] = restrict_to_friends; + } + + if (restrict_to_watched !== undefined) { + localVarQueryParameter["restrict_to_watched"] = restrict_to_watched; + } + + if (minimum_roster_count !== undefined) { + localVarQueryParameter["minimum_roster_count"] = minimum_roster_count; + } + + if (maximum_roster_count !== undefined) { + localVarQueryParameter["maximum_roster_count"] = maximum_roster_count; + } + + if (lowerbound !== undefined) { + localVarQueryParameter["lowerbound"] = lowerbound; + } + + if (upperbound !== undefined) { + localVarQueryParameter["upperbound"] = upperbound; + } + + if (sort !== undefined) { + localVarQueryParameter["sort"] = sort; + } + + if (order !== undefined) { + localVarQueryParameter["order"] = order; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + * @param {boolean} [include_league] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueMembership: async ( + cust_id?: number, + include_league?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/league/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (include_league !== undefined) { + localVarQueryParameter["include_league"] = include_league; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {number} [season_id] If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeaguePointsSystems: async ( + league_id: number, + season_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists("getLeaguePointsSystems", "league_id", league_id); + const localVarPath = `/data/league/get_points_systems`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueRoster: async ( + league_id: number, + include_licenses?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists("getLeagueRoster", "league_id", league_id); + const localVarPath = `/data/league/roster`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter["include_licenses"] = include_licenses; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {boolean} [results_only] If true include only sessions for which results are available. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonSessions: async ( + league_id: number, + season_id: number, + results_only?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists("getLeagueSeasonSessions", "league_id", league_id); + // verify required parameter 'season_id' is not null or undefined + assertParamExists("getLeagueSeasonSessions", "season_id", season_id); + const localVarPath = `/data/league/season_sessions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (results_only !== undefined) { + localVarQueryParameter["results_only"] = results_only; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {number} [car_class_id] + * @param {number} [car_id] If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonStandings: async ( + league_id: number, + season_id: number, + car_class_id?: number, + car_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists("getLeagueSeasonStandings", "league_id", league_id); + // verify required parameter 'season_id' is not null or undefined + assertParamExists("getLeagueSeasonStandings", "season_id", season_id); + const localVarPath = `/data/league/season_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter["car_class_id"] = car_class_id; + } + + if (car_id !== undefined) { + localVarQueryParameter["car_id"] = car_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} league_id + * @param {boolean} [retired] If true include seasons which are no longer active. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasons: async ( + league_id: number, + retired?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'league_id' is not null or undefined + assertParamExists("getLeagueSeasons", "league_id", league_id); + const localVarPath = `/data/league/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + if (retired !== undefined) { + localVarQueryParameter["retired"] = retired; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; + +/** + * LeagueApi - functional programming interface + */ +export const LeagueApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = LeagueApiAxiosParamCreator(configuration); + return { /** - * For faster responses, only request when necessary. + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeague( + league_id: number, + include_licenses?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeague( + league_id, + include_licenses, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeague"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {boolean} [mine] If true, return only sessions created by this user. + * @param {number} [package_id] If set, return only sessions using this car or track package ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueCustomerLeagueSessions( + mine?: boolean, + package_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueCustomerLeagueSessions( + mine, + package_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeagueCustomerLeagueSessions"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} [search] Will search against league name, description, owner, and league ID. + * @param {string} [tag] One or more tags, comma-separated. + * @param {boolean} [restrict_to_member] If true include only leagues for which customer is a member. + * @param {boolean} [restrict_to_recruiting] If true include only leagues which are recruiting. + * @param {boolean} [restrict_to_friends] If true include only leagues owned by a friend. + * @param {boolean} [restrict_to_watched] If true include only leagues owned by a watched member. + * @param {number} [minimum_roster_count] If set include leagues with at least this number of members. + * @param {number} [maximum_roster_count] If set include leagues with no more than this number of members. + * @param {number} [lowerbound] First row of results to return. Defaults to 1. + * @param {number} [upperbound] Last row of results to return. Defaults to lowerbound + 39. + * @param {string} [sort] One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. + * @param {string} [order] One of asc or desc. Defaults to asc. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueDirectory( + search?: string, + tag?: string, + restrict_to_member?: boolean, + restrict_to_recruiting?: boolean, + restrict_to_friends?: boolean, + restrict_to_watched?: boolean, + minimum_roster_count?: number, + maximum_roster_count?: number, + lowerbound?: number, + upperbound?: number, + sort?: string, + order?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueDirectory( + search, + tag, + restrict_to_member, + restrict_to_recruiting, + restrict_to_friends, + restrict_to_watched, + minimum_roster_count, + maximum_roster_count, + lowerbound, + upperbound, + sort, + order, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeagueDirectory"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + * @param {boolean} [include_league] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueMembership( + cust_id?: number, + include_league?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueMembership( + cust_id, + include_league, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeagueMembership"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {number} [season_id] If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeaguePointsSystems( + league_id: number, + season_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeaguePointsSystems( + league_id, + season_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeaguePointsSystems"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueRoster( + league_id: number, + include_licenses?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLeagueRoster( + league_id, + include_licenses, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeagueRoster"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {boolean} [results_only] If true include only sessions for which results are available. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonSessions( + league_id: number, + season_id: number, + results_only?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueSeasonSessions( + league_id, + season_id, + results_only, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeagueSeasonSessions"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {number} season_id + * @param {number} [car_class_id] + * @param {number} [car_id] If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasonStandings( + league_id: number, + season_id: number, + car_class_id?: number, + car_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueSeasonStandings( + league_id, + season_id, + car_class_id, + car_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeagueSeasonStandings"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} league_id + * @param {boolean} [retired] If true include seasons which are no longer active. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLeagueSeasons( + league_id: number, + retired?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLeagueSeasons( + league_id, + retired, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LeagueApi.getLeagueSeasons"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * LeagueApi - factory interface + */ +export const LeagueApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = LeagueApiFp(configuration); + return { + /** + * + * @param {LeagueApiGetLeagueRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeague( + requestParameters: LeagueApiGetLeagueRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeague( + requestParameters.league_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueCustomerLeagueSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueCustomerLeagueSessions( + requestParameters: LeagueApiGetLeagueCustomerLeagueSessionsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueCustomerLeagueSessions( + requestParameters.mine, + requestParameters.package_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueDirectoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueDirectory( + requestParameters: LeagueApiGetLeagueDirectoryRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueDirectory( + requestParameters.search, + requestParameters.tag, + requestParameters.restrict_to_member, + requestParameters.restrict_to_recruiting, + requestParameters.restrict_to_friends, + requestParameters.restrict_to_watched, + requestParameters.minimum_roster_count, + requestParameters.maximum_roster_count, + requestParameters.lowerbound, + requestParameters.upperbound, + requestParameters.sort, + requestParameters.order, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueMembershipRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly include_licenses?: boolean + getLeagueMembership( + requestParameters: LeagueApiGetLeagueMembershipRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueMembership( + requestParameters.cust_id, + requestParameters.include_league, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeaguePointsSystemsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeaguePointsSystems( + requestParameters: LeagueApiGetLeaguePointsSystemsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeaguePointsSystems( + requestParameters.league_id, + requestParameters.season_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueRosterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueRoster( + requestParameters: LeagueApiGetLeagueRosterRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueRoster( + requestParameters.league_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueSeasonSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonSessions( + requestParameters: LeagueApiGetLeagueSeasonSessionsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueSeasonSessions( + requestParameters.league_id, + requestParameters.season_id, + requestParameters.results_only, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueSeasonStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasonStandings( + requestParameters: LeagueApiGetLeagueSeasonStandingsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueSeasonStandings( + requestParameters.league_id, + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.car_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LeagueApiGetLeagueSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLeagueSeasons( + requestParameters: LeagueApiGetLeagueSeasonsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLeagueSeasons( + requestParameters.league_id, + requestParameters.retired, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getLeague operation in LeagueApi. + */ +export interface LeagueApiGetLeagueRequest { + readonly league_id: number; + + /** + * For faster responses, only request when necessary. + */ + readonly include_licenses?: boolean; +} + +/** + * Request parameters for getLeagueCustomerLeagueSessions operation in LeagueApi. + */ +export interface LeagueApiGetLeagueCustomerLeagueSessionsRequest { + /** + * If true, return only sessions created by this user. + */ + readonly mine?: boolean; + + /** + * If set, return only sessions using this car or track package ID. + */ + readonly package_id?: number; +} + +/** + * Request parameters for getLeagueDirectory operation in LeagueApi. + */ +export interface LeagueApiGetLeagueDirectoryRequest { + /** + * Will search against league name, description, owner, and league ID. + */ + readonly search?: string; + + /** + * One or more tags, comma-separated. + */ + readonly tag?: string; + + /** + * If true include only leagues for which customer is a member. + */ + readonly restrict_to_member?: boolean; + + /** + * If true include only leagues which are recruiting. + */ + readonly restrict_to_recruiting?: boolean; + + /** + * If true include only leagues owned by a friend. + */ + readonly restrict_to_friends?: boolean; + + /** + * If true include only leagues owned by a watched member. + */ + readonly restrict_to_watched?: boolean; + + /** + * If set include leagues with at least this number of members. + */ + readonly minimum_roster_count?: number; + + /** + * If set include leagues with no more than this number of members. + */ + readonly maximum_roster_count?: number; + + /** + * First row of results to return. Defaults to 1. + */ + readonly lowerbound?: number; + + /** + * Last row of results to return. Defaults to lowerbound + 39. + */ + readonly upperbound?: number; + + /** + * One of relevance, leaguename, displayname, rostercount. displayname is owners\'s name. Defaults to relevance. + */ + readonly sort?: string; + + /** + * One of asc or desc. Defaults to asc. + */ + readonly order?: string; +} + +/** + * Request parameters for getLeagueMembership operation in LeagueApi. + */ +export interface LeagueApiGetLeagueMembershipRequest { + /** + * If different from the authenticated member, the following restrictions apply: - Caller cannot be on requested customer\'s block list or an empty list will result; - Requested customer cannot have their online activity preference set to hidden or an empty list will result; - Only leagues for which the requested customer is an admin and the league roster is not private are returned. + */ + readonly cust_id?: number; + + readonly include_league?: boolean; +} + +/** + * Request parameters for getLeaguePointsSystems operation in LeagueApi. + */ +export interface LeagueApiGetLeaguePointsSystemsRequest { + readonly league_id: number; + + /** + * If included and the season is using custom points (points_system_id:2) then the custom points option is included in the returned list. Otherwise the custom points option is not returned. + */ + readonly season_id?: number; +} + +/** + * Request parameters for getLeagueRoster operation in LeagueApi. + */ +export interface LeagueApiGetLeagueRosterRequest { + readonly league_id: number; + + /** + * For faster responses, only request when necessary. + */ + readonly include_licenses?: boolean; } /** * Request parameters for getLeagueSeasonSessions operation in LeagueApi. */ export interface LeagueApiGetLeagueSeasonSessionsRequest { - readonly league_id: number + readonly league_id: number; - readonly season_id: number + readonly season_id: number; - /** - * If true include only sessions for which results are available. - */ - readonly results_only?: boolean + /** + * If true include only sessions for which results are available. + */ + readonly results_only?: boolean; } /** * Request parameters for getLeagueSeasonStandings operation in LeagueApi. */ export interface LeagueApiGetLeagueSeasonStandingsRequest { - readonly league_id: number + readonly league_id: number; - readonly season_id: number + readonly season_id: number; - readonly car_class_id?: number + readonly car_class_id?: number; - /** - * If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. - */ - readonly car_id?: number + /** + * If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes. + */ + readonly car_id?: number; } /** * Request parameters for getLeagueSeasons operation in LeagueApi. */ export interface LeagueApiGetLeagueSeasonsRequest { - readonly league_id: number + readonly league_id: number; - /** - * If true include seasons which are no longer active. - */ - readonly retired?: boolean + /** + * If true include seasons which are no longer active. + */ + readonly retired?: boolean; } /** * LeagueApi - object-oriented interface */ export class LeagueApi extends BaseAPI { + /** + * + * @param {LeagueApiGetLeagueRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeague( + requestParameters: LeagueApiGetLeagueRequest, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeague( + requestParameters.league_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueCustomerLeagueSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueCustomerLeagueSessions( + requestParameters: LeagueApiGetLeagueCustomerLeagueSessionsRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeagueCustomerLeagueSessions( + requestParameters.mine, + requestParameters.package_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueDirectoryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueDirectory( + requestParameters: LeagueApiGetLeagueDirectoryRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeagueDirectory( + requestParameters.search, + requestParameters.tag, + requestParameters.restrict_to_member, + requestParameters.restrict_to_recruiting, + requestParameters.restrict_to_friends, + requestParameters.restrict_to_watched, + requestParameters.minimum_roster_count, + requestParameters.maximum_roster_count, + requestParameters.lowerbound, + requestParameters.upperbound, + requestParameters.sort, + requestParameters.order, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueMembershipRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueMembership( + requestParameters: LeagueApiGetLeagueMembershipRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeagueMembership( + requestParameters.cust_id, + requestParameters.include_league, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeaguePointsSystemsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeaguePointsSystems( + requestParameters: LeagueApiGetLeaguePointsSystemsRequest, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeaguePointsSystems( + requestParameters.league_id, + requestParameters.season_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueRosterRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueRoster( + requestParameters: LeagueApiGetLeagueRosterRequest, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeagueRoster( + requestParameters.league_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueSeasonSessionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonSessions( + requestParameters: LeagueApiGetLeagueSeasonSessionsRequest, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeagueSeasonSessions( + requestParameters.league_id, + requestParameters.season_id, + requestParameters.results_only, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueSeasonStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasonStandings( + requestParameters: LeagueApiGetLeagueSeasonStandingsRequest, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeagueSeasonStandings( + requestParameters.league_id, + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.car_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LeagueApiGetLeagueSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLeagueSeasons( + requestParameters: LeagueApiGetLeagueSeasonsRequest, + options?: RawAxiosRequestConfig, + ) { + return LeagueApiFp(this.configuration) + .getLeagueSeasons( + requestParameters.league_id, + requestParameters.retired, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * LookupApi - axios parameter creator + */ +export const LookupApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * - * @param {LeagueApiGetLeagueRequest} requestParameters Request parameters. + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeague(requestParameters: LeagueApiGetLeagueRequest, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeague(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LeagueApiGetLeagueCustomerLeagueSessionsRequest} requestParameters Request parameters. + getLookup: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/lookup/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueCustomerLeagueSessions(requestParameters: LeagueApiGetLeagueCustomerLeagueSessionsRequest = {}, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeagueCustomerLeagueSessions(requestParameters.mine, requestParameters.package_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LeagueApiGetLeagueDirectoryRequest} requestParameters Request parameters. + getLookupCountries: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/lookup/countries`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} search_term A cust_id or partial name for which to search. + * @param {number} [league_id] Narrow the search to the roster of the given league. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueDirectory(requestParameters: LeagueApiGetLeagueDirectoryRequest = {}, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeagueDirectory(requestParameters.search, requestParameters.tag, requestParameters.restrict_to_member, requestParameters.restrict_to_recruiting, requestParameters.restrict_to_friends, requestParameters.restrict_to_watched, requestParameters.minimum_roster_count, requestParameters.maximum_roster_count, requestParameters.lowerbound, requestParameters.upperbound, requestParameters.sort, requestParameters.order, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LeagueApiGetLeagueMembershipRequest} requestParameters Request parameters. + getLookupDrivers: async ( + search_term: string, + league_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'search_term' is not null or undefined + assertParamExists("getLookupDrivers", "search_term", search_term); + const localVarPath = `/data/lookup/drivers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (search_term !== undefined) { + localVarQueryParameter["search_term"] = search_term; + } + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueMembership(requestParameters: LeagueApiGetLeagueMembershipRequest = {}, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeagueMembership(requestParameters.cust_id, requestParameters.include_league, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LeagueApiGetLeaguePointsSystemsRequest} requestParameters Request parameters. + getLookupFlairs: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/lookup/flairs`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeaguePointsSystems(requestParameters: LeagueApiGetLeaguePointsSystemsRequest, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeaguePointsSystems(requestParameters.league_id, requestParameters.season_id, options).then((request) => request(this.axios, this.basePath)); - } + getLookupLicenses: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/lookup/licenses`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; +/** + * LookupApi - functional programming interface + */ +export const LookupApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = LookupApiAxiosParamCreator(configuration); + return { /** - * - * @param {LeagueApiGetLeagueRosterRequest} requestParameters Request parameters. + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueRoster(requestParameters: LeagueApiGetLeagueRosterRequest, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeagueRoster(requestParameters.league_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LeagueApiGetLeagueSeasonSessionsRequest} requestParameters Request parameters. + async getLookup( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookup(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LookupApi.getLookup"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueSeasonSessions(requestParameters: LeagueApiGetLeagueSeasonSessionsRequest, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeagueSeasonSessions(requestParameters.league_id, requestParameters.season_id, requestParameters.results_only, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LeagueApiGetLeagueSeasonStandingsRequest} requestParameters Request parameters. + async getLookupCountries( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupCountries(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LookupApi.getLookupCountries"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} search_term A cust_id or partial name for which to search. + * @param {number} [league_id] Narrow the search to the roster of the given league. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueSeasonStandings(requestParameters: LeagueApiGetLeagueSeasonStandingsRequest, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeagueSeasonStandings(requestParameters.league_id, requestParameters.season_id, requestParameters.car_class_id, requestParameters.car_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LeagueApiGetLeagueSeasonsRequest} requestParameters Request parameters. + async getLookupDrivers( + search_term: string, + league_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupDrivers( + search_term, + league_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LookupApi.getLookupDrivers"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLeagueSeasons(requestParameters: LeagueApiGetLeagueSeasonsRequest, options?: RawAxiosRequestConfig) { - return LeagueApiFp(this.configuration).getLeagueSeasons(requestParameters.league_id, requestParameters.retired, options).then((request) => request(this.axios, this.basePath)); - } -} - - + async getLookupFlairs( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupFlairs(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LookupApi.getLookupFlairs"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLookupLicenses( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getLookupLicenses(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["LookupApi.getLookupLicenses"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; /** - * LookupApi - axios parameter creator + * LookupApi - factory interface */ -export const LookupApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookup: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/lookup/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupCountries: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/lookup/countries`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {string} search_term A cust_id or partial name for which to search. - * @param {number} [league_id] Narrow the search to the roster of the given league. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupDrivers: async (search_term: string, league_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'search_term' is not null or undefined - assertParamExists('getLookupDrivers', 'search_term', search_term) - const localVarPath = `/data/lookup/drivers`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (search_term !== undefined) { - localVarQueryParameter['search_term'] = search_term; - } - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupFlairs: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/lookup/flairs`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupLicenses: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/lookup/licenses`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } +export const LookupApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = LookupApiFp(configuration); + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookup( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookup(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupCountries( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupCountries(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {LookupApiGetLookupDriversRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupDrivers( + requestParameters: LookupApiGetLookupDriversRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupDrivers( + requestParameters.search_term, + requestParameters.league_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupFlairs( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupFlairs(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLookupLicenses( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getLookupLicenses(options) + .then((request) => request(axios, basePath)); + }, + }; }; /** - * LookupApi - functional programming interface + * Request parameters for getLookupDrivers operation in LookupApi. */ -export const LookupApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = LookupApiAxiosParamCreator(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookup(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookup(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookup']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupCountries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupCountries(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupCountries']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {string} search_term A cust_id or partial name for which to search. - * @param {number} [league_id] Narrow the search to the roster of the given league. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupDrivers(search_term: string, league_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupDrivers(search_term, league_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupDrivers']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupFlairs(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupFlairs(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupFlairs']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getLookupLicenses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLookupLicenses(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['LookupApi.getLookupLicenses']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; +export interface LookupApiGetLookupDriversRequest { + /** + * A cust_id or partial name for which to search. + */ + readonly search_term: string; + + /** + * Narrow the search to the roster of the given league. + */ + readonly league_id?: number; +} /** - * LookupApi - factory interface + * LookupApi - object-oriented interface + */ +export class LookupApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookup(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration) + .getLookup(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupCountries(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration) + .getLookupCountries(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {LookupApiGetLookupDriversRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupDrivers( + requestParameters: LookupApiGetLookupDriversRequest, + options?: RawAxiosRequestConfig, + ) { + return LookupApiFp(this.configuration) + .getLookupDrivers( + requestParameters.search_term, + requestParameters.league_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupFlairs(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration) + .getLookupFlairs(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getLookupLicenses(options?: RawAxiosRequestConfig) { + return LookupApiFp(this.configuration) + .getLookupLicenses(options) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * MemberApi - axios parameter creator */ -export const LookupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = LookupApiFp(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookup(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookup(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupCountries(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupCountries(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {LookupApiGetLookupDriversRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupDrivers(requestParameters: LookupApiGetLookupDriversRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupDrivers(requestParameters.search_term, requestParameters.league_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupFlairs(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupFlairs(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getLookupLicenses(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getLookupLicenses(options).then((request) => request(axios, basePath)); - }, - }; +export const MemberApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {string} cust_ids Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + * @param {boolean} [include_licenses] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMember: async ( + cust_ids: string, + include_licenses?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'cust_ids' is not null or undefined + assertParamExists("getMember", "cust_ids", cust_ids); + const localVarPath = `/data/member/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_ids !== undefined) { + localVarQueryParameter["cust_ids"] = cust_ids; + } + + if (include_licenses !== undefined) { + localVarQueryParameter["include_licenses"] = include_licenses; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} award_id + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwardInstances: async ( + award_id: number, + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'award_id' is not null or undefined + assertParamExists("getMemberAwardInstances", "award_id", award_id); + const localVarPath = `/data/member/award_instances`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (award_id !== undefined) { + localVarQueryParameter["award_id"] = award_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberAwards: async ( + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/member/awards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} category_id 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + * @param {number} chart_type 1 - iRating; 2 - TT Rating; 3 - License/SR + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberChartData: async ( + category_id: number, + chart_type: number, + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'category_id' is not null or undefined + assertParamExists("getMemberChartData", "category_id", category_id); + // verify required parameter 'chart_type' is not null or undefined + assertParamExists("getMemberChartData", "chart_type", chart_type); + const localVarPath = `/data/member/chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (category_id !== undefined) { + localVarQueryParameter["category_id"] = category_id; + } + + if (chart_type !== undefined) { + localVarQueryParameter["chart_type"] = chart_type; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberInfo: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/member/info`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberParticipationCredits: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/member/participation_credits`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Gets a requested user\'s profile. + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMemberProfile: async ( + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/member/profile`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** - * Request parameters for getLookupDrivers operation in LookupApi. + * MemberApi - functional programming interface */ -export interface LookupApiGetLookupDriversRequest { +export const MemberApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = MemberApiAxiosParamCreator(configuration); + return { /** - * A cust_id or partial name for which to search. + * + * @param {string} cust_ids Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + * @param {boolean} [include_licenses] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMember( + cust_ids: string, + include_licenses?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMember( + cust_ids, + include_licenses, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["MemberApi.getMember"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} award_id + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwardInstances( + award_id: number, + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberAwardInstances( + award_id, + cust_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["MemberApi.getMemberAwardInstances"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberAwards( + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwards( + cust_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["MemberApi.getMemberAwards"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} category_id 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + * @param {number} chart_type 1 - iRating; 2 - TT Rating; 3 - License/SR + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberChartData( + category_id: number, + chart_type: number, + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberChartData( + category_id, + chart_type, + cust_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["MemberApi.getMemberChartData"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberInfo( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberInfo(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["MemberApi.getMemberInfo"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMemberParticipationCredits( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberParticipationCredits(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["MemberApi.getMemberParticipationCredits"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Gets a requested user\'s profile. + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly search_term: string + async getMemberProfile( + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getMemberProfile(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["MemberApi.getMemberProfile"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; - /** - * Narrow the search to the roster of the given league. +/** + * MemberApi - factory interface + */ +export const MemberApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = MemberApiFp(configuration); + return { + /** + * + * @param {MemberApiGetMemberRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMember( + requestParameters: MemberApiGetMemberRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMember( + requestParameters.cust_ids, + requestParameters.include_licenses, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {MemberApiGetMemberAwardInstancesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly league_id?: number -} - -/** - * LookupApi - object-oriented interface - */ -export class LookupApi extends BaseAPI { - /** - * + getMemberAwardInstances( + requestParameters: MemberApiGetMemberAwardInstancesRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberAwardInstances( + requestParameters.award_id, + requestParameters.cust_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {MemberApiGetMemberAwardsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookup(options?: RawAxiosRequestConfig) { - return LookupApiFp(this.configuration).getLookup(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberAwards( + requestParameters: MemberApiGetMemberAwardsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberAwards(requestParameters.cust_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {MemberApiGetMemberChartDataRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupCountries(options?: RawAxiosRequestConfig) { - return LookupApiFp(this.configuration).getLookupCountries(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {LookupApiGetLookupDriversRequest} requestParameters Request parameters. + getMemberChartData( + requestParameters: MemberApiGetMemberChartDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberChartData( + requestParameters.category_id, + requestParameters.chart_type, + requestParameters.cust_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupDrivers(requestParameters: LookupApiGetLookupDriversRequest, options?: RawAxiosRequestConfig) { - return LookupApiFp(this.configuration).getLookupDrivers(requestParameters.search_term, requestParameters.league_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberInfo( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberInfo(options) + .then((request) => request(axios, basePath)); + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupFlairs(options?: RawAxiosRequestConfig) { - return LookupApiFp(this.configuration).getLookupFlairs(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getMemberParticipationCredits( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberParticipationCredits(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @summary Gets a requested user\'s profile. + * @param {MemberApiGetMemberProfileRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getLookupLicenses(options?: RawAxiosRequestConfig) { - return LookupApiFp(this.configuration).getLookupLicenses(options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * MemberApi - axios parameter creator - */ -export const MemberApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {string} cust_ids Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 - * @param {boolean} [include_licenses] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember: async (cust_ids: string, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'cust_ids' is not null or undefined - assertParamExists('getMember', 'cust_ids', cust_ids) - const localVarPath = `/data/member/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_ids !== undefined) { - localVarQueryParameter['cust_ids'] = cust_ids; - } - - if (include_licenses !== undefined) { - localVarQueryParameter['include_licenses'] = include_licenses; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} award_id - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwardInstances: async (award_id: number, cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'award_id' is not null or undefined - assertParamExists('getMemberAwardInstances', 'award_id', award_id) - const localVarPath = `/data/member/award_instances`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (award_id !== undefined) { - localVarQueryParameter['award_id'] = award_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwards: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/member/awards`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} category_id 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road - * @param {number} chart_type 1 - iRating; 2 - TT Rating; 3 - License/SR - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberChartData: async (category_id: number, chart_type: number, cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'category_id' is not null or undefined - assertParamExists('getMemberChartData', 'category_id', category_id) - // verify required parameter 'chart_type' is not null or undefined - assertParamExists('getMemberChartData', 'chart_type', chart_type) - const localVarPath = `/data/member/chart_data`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (category_id !== undefined) { - localVarQueryParameter['category_id'] = category_id; - } - - if (chart_type !== undefined) { - localVarQueryParameter['chart_type'] = chart_type; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberInfo: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/member/info`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberParticipationCredits: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/member/participation_credits`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Gets a requested user\'s profile. - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberProfile: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/member/profile`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * MemberApi - functional programming interface - */ -export const MemberApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = MemberApiAxiosParamCreator(configuration) - return { - /** - * - * @param {string} cust_ids Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 - * @param {boolean} [include_licenses] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMember(cust_ids: string, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMember(cust_ids, include_licenses, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MemberApi.getMember']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} award_id - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberAwardInstances(award_id: number, cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwardInstances(award_id, cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberAwardInstances']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberAwards(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberAwards(cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberAwards']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} category_id 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road - * @param {number} chart_type 1 - iRating; 2 - TT Rating; 3 - License/SR - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberChartData(category_id: number, chart_type: number, cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberChartData(category_id, chart_type, cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberChartData']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberInfo(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberInfo(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberInfo']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberParticipationCredits(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberParticipationCredits(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberParticipationCredits']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Gets a requested user\'s profile. - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMemberProfile(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMemberProfile(cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['MemberApi.getMemberProfile']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * MemberApi - factory interface - */ -export const MemberApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = MemberApiFp(configuration) - return { - /** - * - * @param {MemberApiGetMemberRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember(requestParameters: MemberApiGetMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMember(requestParameters.cust_ids, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {MemberApiGetMemberAwardInstancesRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwardInstances(requestParameters: MemberApiGetMemberAwardInstancesRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberAwardInstances(requestParameters.award_id, requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {MemberApiGetMemberAwardsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberAwards(requestParameters: MemberApiGetMemberAwardsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberAwards(requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {MemberApiGetMemberChartDataRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberChartData(requestParameters: MemberApiGetMemberChartDataRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberChartData(requestParameters.category_id, requestParameters.chart_type, requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberInfo(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberInfo(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberParticipationCredits(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberParticipationCredits(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Gets a requested user\'s profile. - * @param {MemberApiGetMemberProfileRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMemberProfile(requestParameters: MemberApiGetMemberProfileRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getMemberProfile(requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - }; + getMemberProfile( + requestParameters: MemberApiGetMemberProfileRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getMemberProfile(requestParameters.cust_id, options) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for getMember operation in MemberApi. */ export interface MemberApiGetMemberRequest { - /** - * Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 - */ - readonly cust_ids: string + /** + * Comma-separated list of customer IDs. Example: ?cust_ids=2,3,4 + */ + readonly cust_ids: string; - readonly include_licenses?: boolean + readonly include_licenses?: boolean; } /** * Request parameters for getMemberAwardInstances operation in MemberApi. */ export interface MemberApiGetMemberAwardInstancesRequest { - readonly award_id: number + readonly award_id: number; - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * Request parameters for getMemberAwards operation in MemberApi. */ export interface MemberApiGetMemberAwardsRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * Request parameters for getMemberChartData operation in MemberApi. */ export interface MemberApiGetMemberChartDataRequest { - /** - * 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road - */ - readonly category_id: number - - /** - * 1 - iRating; 2 - TT Rating; 3 - License/SR - */ - readonly chart_type: number - - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * 1 - Oval; 2 - Road; 3 - Dirt oval; 4 - Dirt road + */ + readonly category_id: number; + + /** + * 1 - iRating; 2 - TT Rating; 3 - License/SR + */ + readonly chart_type: number; + + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * Request parameters for getMemberProfile operation in MemberApi. */ export interface MemberApiGetMemberProfileRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * MemberApi - object-oriented interface */ export class MemberApi extends BaseAPI { - /** - * - * @param {MemberApiGetMemberRequest} requestParameters Request parameters. + /** + * + * @param {MemberApiGetMemberRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMember( + requestParameters: MemberApiGetMemberRequest, + options?: RawAxiosRequestConfig, + ) { + return MemberApiFp(this.configuration) + .getMember( + requestParameters.cust_ids, + requestParameters.include_licenses, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {MemberApiGetMemberAwardInstancesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwardInstances( + requestParameters: MemberApiGetMemberAwardInstancesRequest, + options?: RawAxiosRequestConfig, + ) { + return MemberApiFp(this.configuration) + .getMemberAwardInstances( + requestParameters.award_id, + requestParameters.cust_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {MemberApiGetMemberAwardsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberAwards( + requestParameters: MemberApiGetMemberAwardsRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return MemberApiFp(this.configuration) + .getMemberAwards(requestParameters.cust_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {MemberApiGetMemberChartDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberChartData( + requestParameters: MemberApiGetMemberChartDataRequest, + options?: RawAxiosRequestConfig, + ) { + return MemberApiFp(this.configuration) + .getMemberChartData( + requestParameters.category_id, + requestParameters.chart_type, + requestParameters.cust_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberInfo(options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration) + .getMemberInfo(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberParticipationCredits(options?: RawAxiosRequestConfig) { + return MemberApiFp(this.configuration) + .getMemberParticipationCredits(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Gets a requested user\'s profile. + * @param {MemberApiGetMemberProfileRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getMemberProfile( + requestParameters: MemberApiGetMemberProfileRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return MemberApiFp(this.configuration) + .getMemberProfile(requestParameters.cust_id, options) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * ResultsApi - axios parameter creator + */ +export const ResultsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {number} subsession_id + * @param {boolean} [include_licenses] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMember(requestParameters: MemberApiGetMemberRequest, options?: RawAxiosRequestConfig) { - return MemberApiFp(this.configuration).getMember(requestParameters.cust_ids, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {MemberApiGetMemberAwardInstancesRequest} requestParameters Request parameters. + getResults: async ( + subsession_id: number, + include_licenses?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists("getResults", "subsession_id", subsession_id); + const localVarPath = `/data/results/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (subsession_id !== undefined) { + localVarQueryParameter["subsession_id"] = subsession_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter["include_licenses"] = include_licenses; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberAwardInstances(requestParameters: MemberApiGetMemberAwardInstancesRequest, options?: RawAxiosRequestConfig) { - return MemberApiFp(this.configuration).getMemberAwardInstances(requestParameters.award_id, requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {MemberApiGetMemberAwardsRequest} requestParameters Request parameters. + getResultsEventLog: async ( + subsession_id: number, + simsession_number: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists("getResultsEventLog", "subsession_id", subsession_id); + // verify required parameter 'simsession_number' is not null or undefined + assertParamExists( + "getResultsEventLog", + "simsession_number", + simsession_number, + ); + const localVarPath = `/data/results/event_log`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (subsession_id !== undefined) { + localVarQueryParameter["subsession_id"] = subsession_id; + } + + if (simsession_number !== undefined) { + localVarQueryParameter["simsession_number"] = simsession_number; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberAwards(requestParameters: MemberApiGetMemberAwardsRequest = {}, options?: RawAxiosRequestConfig) { - return MemberApiFp(this.configuration).getMemberAwards(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {MemberApiGetMemberChartDataRequest} requestParameters Request parameters. + getResultsLapChartData: async ( + subsession_id: number, + simsession_number: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists( + "getResultsLapChartData", + "subsession_id", + subsession_id, + ); + // verify required parameter 'simsession_number' is not null or undefined + assertParamExists( + "getResultsLapChartData", + "simsession_number", + simsession_number, + ); + const localVarPath = `/data/results/lap_chart_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (subsession_id !== undefined) { + localVarQueryParameter["subsession_id"] = subsession_id; + } + + if (simsession_number !== undefined) { + localVarQueryParameter["simsession_number"] = simsession_number; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {number} [cust_id] Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. + * @param {number} [team_id] Required if the subsession was a team event. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberChartData(requestParameters: MemberApiGetMemberChartDataRequest, options?: RawAxiosRequestConfig) { - return MemberApiFp(this.configuration).getMemberChartData(requestParameters.category_id, requestParameters.chart_type, requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsLapData: async ( + subsession_id: number, + simsession_number: number, + cust_id?: number, + team_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'subsession_id' is not null or undefined + assertParamExists("getResultsLapData", "subsession_id", subsession_id); + // verify required parameter 'simsession_number' is not null or undefined + assertParamExists( + "getResultsLapData", + "simsession_number", + simsession_number, + ); + const localVarPath = `/data/results/lap_data`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (subsession_id !== undefined) { + localVarQueryParameter["subsession_id"] = subsession_id; + } + + if (simsession_number !== undefined) { + localVarQueryParameter["simsession_number"] = simsession_number; + } + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (team_id !== undefined) { + localVarQueryParameter["team_id"] = team_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] The participant\'s customer ID. Ignored if team_id is supplied. + * @param {number} [team_id] The team ID to search for. Takes priority over cust_id if both are supplied. + * @param {number} [host_cust_id] The host\'s customer ID. + * @param {string} [session_name] Part or all of the session\'s name. + * @param {number} [league_id] Include only results for the league with this ID. + * @param {number} [league_season_id] Include only results for the league season with this ID. + * @param {number} [car_id] One of the cars used by the session. + * @param {number} [track_id] The ID of the track used by the session. + * @param {string} [category_ids] Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberInfo(options?: RawAxiosRequestConfig) { - return MemberApiFp(this.configuration).getMemberInfo(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getResultsSearchHosted: async ( + start_range_begin?: string, + start_range_end?: string, + finish_range_begin?: string, + finish_range_end?: string, + cust_id?: number, + team_id?: number, + host_cust_id?: number, + session_name?: string, + league_id?: number, + league_season_id?: number, + car_id?: number, + track_id?: number, + category_ids?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/results/search_hosted`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (start_range_begin !== undefined) { + localVarQueryParameter["start_range_begin"] = + (start_range_begin as any) instanceof Date + ? (start_range_begin as any).toISOString() + : start_range_begin; + } + + if (start_range_end !== undefined) { + localVarQueryParameter["start_range_end"] = + (start_range_end as any) instanceof Date + ? (start_range_end as any).toISOString() + : start_range_end; + } + + if (finish_range_begin !== undefined) { + localVarQueryParameter["finish_range_begin"] = + (finish_range_begin as any) instanceof Date + ? (finish_range_begin as any).toISOString() + : finish_range_begin; + } + + if (finish_range_end !== undefined) { + localVarQueryParameter["finish_range_end"] = + (finish_range_end as any) instanceof Date + ? (finish_range_end as any).toISOString() + : finish_range_end; + } + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (team_id !== undefined) { + localVarQueryParameter["team_id"] = team_id; + } + + if (host_cust_id !== undefined) { + localVarQueryParameter["host_cust_id"] = host_cust_id; + } + + if (session_name !== undefined) { + localVarQueryParameter["session_name"] = session_name; + } + + if (league_id !== undefined) { + localVarQueryParameter["league_id"] = league_id; + } + + if (league_season_id !== undefined) { + localVarQueryParameter["league_season_id"] = league_season_id; + } + + if (car_id !== undefined) { + localVarQueryParameter["car_id"] = car_id; + } + + if (track_id !== undefined) { + localVarQueryParameter["track_id"] = track_id; + } + + if (category_ids !== undefined) { + localVarQueryParameter["category_ids"] = category_ids; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [season_year] Required when using season_quarter. + * @param {number} [season_quarter] Required when using season_year. + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] Include only sessions in which this customer participated. Ignored if team_id is supplied. + * @param {number} [team_id] Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. + * @param {number} [series_id] Include only sessions for series with this ID. + * @param {number} [race_week_num] Include only sessions with this race week number. + * @param {boolean} [official_only] If true, include only sessions earning championship points. Defaults to all. + * @param {string} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {string} [category_ids] License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberParticipationCredits(options?: RawAxiosRequestConfig) { - return MemberApiFp(this.configuration).getMemberParticipationCredits(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Gets a requested user\'s profile. - * @param {MemberApiGetMemberProfileRequest} requestParameters Request parameters. + getResultsSearchSeries: async ( + season_year?: number, + season_quarter?: number, + start_range_begin?: string, + start_range_end?: string, + finish_range_begin?: string, + finish_range_end?: string, + cust_id?: number, + team_id?: number, + series_id?: number, + race_week_num?: number, + official_only?: boolean, + event_types?: string, + category_ids?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/results/search_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_year !== undefined) { + localVarQueryParameter["season_year"] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter["season_quarter"] = season_quarter; + } + + if (start_range_begin !== undefined) { + localVarQueryParameter["start_range_begin"] = + (start_range_begin as any) instanceof Date + ? (start_range_begin as any).toISOString() + : start_range_begin; + } + + if (start_range_end !== undefined) { + localVarQueryParameter["start_range_end"] = + (start_range_end as any) instanceof Date + ? (start_range_end as any).toISOString() + : start_range_end; + } + + if (finish_range_begin !== undefined) { + localVarQueryParameter["finish_range_begin"] = + (finish_range_begin as any) instanceof Date + ? (finish_range_begin as any).toISOString() + : finish_range_begin; + } + + if (finish_range_end !== undefined) { + localVarQueryParameter["finish_range_end"] = + (finish_range_end as any) instanceof Date + ? (finish_range_end as any).toISOString() + : finish_range_end; + } + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (team_id !== undefined) { + localVarQueryParameter["team_id"] = team_id; + } + + if (series_id !== undefined) { + localVarQueryParameter["series_id"] = series_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + if (official_only !== undefined) { + localVarQueryParameter["official_only"] = official_only; + } + + if (event_types !== undefined) { + localVarQueryParameter["event_types"] = event_types; + } + + if (category_ids !== undefined) { + localVarQueryParameter["category_ids"] = category_ids; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {IracingEventType} [event_type] Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race + * @param {number} [race_week_num] The first race week of a season is 0. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getMemberProfile(requestParameters: MemberApiGetMemberProfileRequest = {}, options?: RawAxiosRequestConfig) { - return MemberApiFp(this.configuration).getMemberProfile(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * ResultsApi - axios parameter creator - */ -export const ResultsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {number} subsession_id - * @param {boolean} [include_licenses] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResults: async (subsession_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'subsession_id' is not null or undefined - assertParamExists('getResults', 'subsession_id', subsession_id) - const localVarPath = `/data/results/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (subsession_id !== undefined) { - localVarQueryParameter['subsession_id'] = subsession_id; - } - - if (include_licenses !== undefined) { - localVarQueryParameter['include_licenses'] = include_licenses; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} subsession_id - * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsEventLog: async (subsession_id: number, simsession_number: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'subsession_id' is not null or undefined - assertParamExists('getResultsEventLog', 'subsession_id', subsession_id) - // verify required parameter 'simsession_number' is not null or undefined - assertParamExists('getResultsEventLog', 'simsession_number', simsession_number) - const localVarPath = `/data/results/event_log`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (subsession_id !== undefined) { - localVarQueryParameter['subsession_id'] = subsession_id; - } - - if (simsession_number !== undefined) { - localVarQueryParameter['simsession_number'] = simsession_number; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} subsession_id - * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapChartData: async (subsession_id: number, simsession_number: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'subsession_id' is not null or undefined - assertParamExists('getResultsLapChartData', 'subsession_id', subsession_id) - // verify required parameter 'simsession_number' is not null or undefined - assertParamExists('getResultsLapChartData', 'simsession_number', simsession_number) - const localVarPath = `/data/results/lap_chart_data`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (subsession_id !== undefined) { - localVarQueryParameter['subsession_id'] = subsession_id; - } - - if (simsession_number !== undefined) { - localVarQueryParameter['simsession_number'] = simsession_number; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} subsession_id - * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. - * @param {number} [cust_id] Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. - * @param {number} [team_id] Required if the subsession was a team event. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapData: async (subsession_id: number, simsession_number: number, cust_id?: number, team_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'subsession_id' is not null or undefined - assertParamExists('getResultsLapData', 'subsession_id', subsession_id) - // verify required parameter 'simsession_number' is not null or undefined - assertParamExists('getResultsLapData', 'simsession_number', simsession_number) - const localVarPath = `/data/results/lap_data`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (subsession_id !== undefined) { - localVarQueryParameter['subsession_id'] = subsession_id; - } - - if (simsession_number !== undefined) { - localVarQueryParameter['simsession_number'] = simsession_number; - } - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (team_id !== undefined) { - localVarQueryParameter['team_id'] = team_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. - * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. - * @param {number} [cust_id] The participant\'s customer ID. Ignored if team_id is supplied. - * @param {number} [team_id] The team ID to search for. Takes priority over cust_id if both are supplied. - * @param {number} [host_cust_id] The host\'s customer ID. - * @param {string} [session_name] Part or all of the session\'s name. - * @param {number} [league_id] Include only results for the league with this ID. - * @param {number} [league_season_id] Include only results for the league season with this ID. - * @param {number} [car_id] One of the cars used by the session. - * @param {number} [track_id] The ID of the track used by the session. - * @param {string} [category_ids] Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchHosted: async (start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, host_cust_id?: number, session_name?: string, league_id?: number, league_season_id?: number, car_id?: number, track_id?: number, category_ids?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/results/search_hosted`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (start_range_begin !== undefined) { - localVarQueryParameter['start_range_begin'] = (start_range_begin as any instanceof Date) ? - (start_range_begin as any).toISOString() : - start_range_begin; - } - - if (start_range_end !== undefined) { - localVarQueryParameter['start_range_end'] = (start_range_end as any instanceof Date) ? - (start_range_end as any).toISOString() : - start_range_end; - } - - if (finish_range_begin !== undefined) { - localVarQueryParameter['finish_range_begin'] = (finish_range_begin as any instanceof Date) ? - (finish_range_begin as any).toISOString() : - finish_range_begin; - } - - if (finish_range_end !== undefined) { - localVarQueryParameter['finish_range_end'] = (finish_range_end as any instanceof Date) ? - (finish_range_end as any).toISOString() : - finish_range_end; - } - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (team_id !== undefined) { - localVarQueryParameter['team_id'] = team_id; - } - - if (host_cust_id !== undefined) { - localVarQueryParameter['host_cust_id'] = host_cust_id; - } - - if (session_name !== undefined) { - localVarQueryParameter['session_name'] = session_name; - } - - if (league_id !== undefined) { - localVarQueryParameter['league_id'] = league_id; - } - - if (league_season_id !== undefined) { - localVarQueryParameter['league_season_id'] = league_season_id; - } - - if (car_id !== undefined) { - localVarQueryParameter['car_id'] = car_id; - } - - if (track_id !== undefined) { - localVarQueryParameter['track_id'] = track_id; - } - - if (category_ids !== undefined) { - localVarQueryParameter['category_ids'] = category_ids; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [season_year] Required when using season_quarter. - * @param {number} [season_quarter] Required when using season_year. - * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. - * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. - * @param {number} [cust_id] Include only sessions in which this customer participated. Ignored if team_id is supplied. - * @param {number} [team_id] Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. - * @param {number} [series_id] Include only sessions for series with this ID. - * @param {number} [race_week_num] Include only sessions with this race week number. - * @param {boolean} [official_only] If true, include only sessions earning championship points. Defaults to all. - * @param {string} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - * @param {string} [category_ids] License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchSeries: async (season_year?: number, season_quarter?: number, start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, series_id?: number, race_week_num?: number, official_only?: boolean, event_types?: string, category_ids?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/results/search_series`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_year !== undefined) { - localVarQueryParameter['season_year'] = season_year; - } - - if (season_quarter !== undefined) { - localVarQueryParameter['season_quarter'] = season_quarter; - } - - if (start_range_begin !== undefined) { - localVarQueryParameter['start_range_begin'] = (start_range_begin as any instanceof Date) ? - (start_range_begin as any).toISOString() : - start_range_begin; - } - - if (start_range_end !== undefined) { - localVarQueryParameter['start_range_end'] = (start_range_end as any instanceof Date) ? - (start_range_end as any).toISOString() : - start_range_end; - } - - if (finish_range_begin !== undefined) { - localVarQueryParameter['finish_range_begin'] = (finish_range_begin as any instanceof Date) ? - (finish_range_begin as any).toISOString() : - finish_range_begin; - } - - if (finish_range_end !== undefined) { - localVarQueryParameter['finish_range_end'] = (finish_range_end as any instanceof Date) ? - (finish_range_end as any).toISOString() : - finish_range_end; - } - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (team_id !== undefined) { - localVarQueryParameter['team_id'] = team_id; - } - - if (series_id !== undefined) { - localVarQueryParameter['series_id'] = series_id; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - if (official_only !== undefined) { - localVarQueryParameter['official_only'] = official_only; - } - - if (event_types !== undefined) { - localVarQueryParameter['event_types'] = event_types; - } - - if (category_ids !== undefined) { - localVarQueryParameter['category_ids'] = category_ids; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {IracingEventType} [event_type] Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSeasonResults: async (season_id: number, event_type?: IracingEventType, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getResultsSeasonResults', 'season_id', season_id) - const localVarPath = `/data/results/season_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (event_type !== undefined) { - localVarQueryParameter['event_type'] = event_type; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } + getResultsSeasonResults: async ( + season_id: number, + event_type?: IracingEventType, + race_week_num?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists("getResultsSeasonResults", "season_id", season_id); + const localVarPath = `/data/results/season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (event_type !== undefined) { + localVarQueryParameter["event_type"] = event_type; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** * ResultsApi - functional programming interface */ -export const ResultsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ResultsApiAxiosParamCreator(configuration) - return { - /** - * - * @param {number} subsession_id - * @param {boolean} [include_licenses] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResults(subsession_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResults(subsession_id, include_licenses, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResults']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} subsession_id - * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsEventLog(subsession_id: number, simsession_number: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsEventLog(subsession_id, simsession_number, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsEventLog']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} subsession_id - * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsLapChartData(subsession_id: number, simsession_number: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapChartData(subsession_id, simsession_number, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsLapChartData']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} subsession_id - * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. - * @param {number} [cust_id] Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. - * @param {number} [team_id] Required if the subsession was a team event. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsLapData(subsession_id: number, simsession_number: number, cust_id?: number, team_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsLapData(subsession_id, simsession_number, cust_id, team_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsLapData']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. - * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. - * @param {number} [cust_id] The participant\'s customer ID. Ignored if team_id is supplied. - * @param {number} [team_id] The team ID to search for. Takes priority over cust_id if both are supplied. - * @param {number} [host_cust_id] The host\'s customer ID. - * @param {string} [session_name] Part or all of the session\'s name. - * @param {number} [league_id] Include only results for the league with this ID. - * @param {number} [league_season_id] Include only results for the league season with this ID. - * @param {number} [car_id] One of the cars used by the session. - * @param {number} [track_id] The ID of the track used by the session. - * @param {string} [category_ids] Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsSearchHosted(start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, host_cust_id?: number, session_name?: string, league_id?: number, league_season_id?: number, car_id?: number, track_id?: number, category_ids?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchHosted(start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, host_cust_id, session_name, league_id, league_season_id, car_id, track_id, category_ids, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsSearchHosted']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [season_year] Required when using season_quarter. - * @param {number} [season_quarter] Required when using season_year. - * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. - * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. - * @param {number} [cust_id] Include only sessions in which this customer participated. Ignored if team_id is supplied. - * @param {number} [team_id] Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. - * @param {number} [series_id] Include only sessions for series with this ID. - * @param {number} [race_week_num] Include only sessions with this race week number. - * @param {boolean} [official_only] If true, include only sessions earning championship points. Defaults to all. - * @param {string} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - * @param {string} [category_ids] License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsSearchSeries(season_year?: number, season_quarter?: number, start_range_begin?: string, start_range_end?: string, finish_range_begin?: string, finish_range_end?: string, cust_id?: number, team_id?: number, series_id?: number, race_week_num?: number, official_only?: boolean, event_types?: string, category_ids?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSearchSeries(season_year, season_quarter, start_range_begin, start_range_end, finish_range_begin, finish_range_end, cust_id, team_id, series_id, race_week_num, official_only, event_types, category_ids, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsSearchSeries']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {IracingEventType} [event_type] Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getResultsSeasonResults(season_id: number, event_type?: IracingEventType, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getResultsSeasonResults(season_id, event_type, race_week_num, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ResultsApi.getResultsSeasonResults']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } +export const ResultsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ResultsApiAxiosParamCreator(configuration); + return { + /** + * + * @param {number} subsession_id + * @param {boolean} [include_licenses] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResults( + subsession_id: number, + include_licenses?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getResults( + subsession_id, + include_licenses, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ResultsApi.getResults"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsEventLog( + subsession_id: number, + simsession_number: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsEventLog( + subsession_id, + simsession_number, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ResultsApi.getResultsEventLog"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapChartData( + subsession_id: number, + simsession_number: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsLapChartData( + subsession_id, + simsession_number, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ResultsApi.getResultsLapChartData"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} subsession_id + * @param {number} simsession_number The main event is 0; the preceding event is -1, and so on. + * @param {number} [cust_id] Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. + * @param {number} [team_id] Required if the subsession was a team event. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsLapData( + subsession_id: number, + simsession_number: number, + cust_id?: number, + team_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsLapData( + subsession_id, + simsession_number, + cust_id, + team_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ResultsApi.getResultsLapData"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] The participant\'s customer ID. Ignored if team_id is supplied. + * @param {number} [team_id] The team ID to search for. Takes priority over cust_id if both are supplied. + * @param {number} [host_cust_id] The host\'s customer ID. + * @param {string} [session_name] Part or all of the session\'s name. + * @param {number} [league_id] Include only results for the league with this ID. + * @param {number} [league_season_id] Include only results for the league season with this ID. + * @param {number} [car_id] One of the cars used by the session. + * @param {number} [track_id] The ID of the track used by the session. + * @param {string} [category_ids] Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchHosted( + start_range_begin?: string, + start_range_end?: string, + finish_range_begin?: string, + finish_range_end?: string, + cust_id?: number, + team_id?: number, + host_cust_id?: number, + session_name?: string, + league_id?: number, + league_season_id?: number, + car_id?: number, + track_id?: number, + category_ids?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsSearchHosted( + start_range_begin, + start_range_end, + finish_range_begin, + finish_range_end, + cust_id, + team_id, + host_cust_id, + session_name, + league_id, + league_season_id, + car_id, + track_id, + category_ids, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ResultsApi.getResultsSearchHosted"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [season_year] Required when using season_quarter. + * @param {number} [season_quarter] Required when using season_year. + * @param {string} [start_range_begin] Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [start_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + * @param {string} [finish_range_begin] Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + * @param {string} [finish_range_end] ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + * @param {number} [cust_id] Include only sessions in which this customer participated. Ignored if team_id is supplied. + * @param {number} [team_id] Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. + * @param {number} [series_id] Include only sessions for series with this ID. + * @param {number} [race_week_num] Include only sessions with this race week number. + * @param {boolean} [official_only] If true, include only sessions earning championship points. Defaults to all. + * @param {string} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {string} [category_ids] License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSearchSeries( + season_year?: number, + season_quarter?: number, + start_range_begin?: string, + start_range_end?: string, + finish_range_begin?: string, + finish_range_end?: string, + cust_id?: number, + team_id?: number, + series_id?: number, + race_week_num?: number, + official_only?: boolean, + event_types?: string, + category_ids?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsSearchSeries( + season_year, + season_quarter, + start_range_begin, + start_range_end, + finish_range_begin, + finish_range_end, + cust_id, + team_id, + series_id, + race_week_num, + official_only, + event_types, + category_ids, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ResultsApi.getResultsSearchSeries"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {IracingEventType} [event_type] Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getResultsSeasonResults( + season_id: number, + event_type?: IracingEventType, + race_week_num?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getResultsSeasonResults( + season_id, + event_type, + race_week_num, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["ResultsApi.getResultsSeasonResults"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; }; /** * ResultsApi - factory interface */ -export const ResultsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ResultsApiFp(configuration) - return { - /** - * - * @param {ResultsApiGetResultsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResults(requestParameters: ResultsApiGetResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResults(requestParameters.subsession_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {ResultsApiGetResultsEventLogRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsEventLog(requestParameters: ResultsApiGetResultsEventLogRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsEventLog(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {ResultsApiGetResultsLapChartDataRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapChartData(requestParameters: ResultsApiGetResultsLapChartDataRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsLapChartData(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {ResultsApiGetResultsLapDataRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsLapData(requestParameters: ResultsApiGetResultsLapDataRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsLapData(requestParameters.subsession_id, requestParameters.simsession_number, requestParameters.cust_id, requestParameters.team_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {ResultsApiGetResultsSearchHostedRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchHosted(requestParameters: ResultsApiGetResultsSearchHostedRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsSearchHosted(requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.host_cust_id, requestParameters.session_name, requestParameters.league_id, requestParameters.league_season_id, requestParameters.car_id, requestParameters.track_id, requestParameters.category_ids, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {ResultsApiGetResultsSearchSeriesRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSearchSeries(requestParameters: ResultsApiGetResultsSearchSeriesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsSearchSeries(requestParameters.season_year, requestParameters.season_quarter, requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.series_id, requestParameters.race_week_num, requestParameters.official_only, requestParameters.event_types, requestParameters.category_ids, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {ResultsApiGetResultsSeasonResultsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getResultsSeasonResults(requestParameters: ResultsApiGetResultsSeasonResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getResultsSeasonResults(requestParameters.season_id, requestParameters.event_type, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); - }, - }; +export const ResultsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ResultsApiFp(configuration); + return { + /** + * + * @param {ResultsApiGetResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResults( + requestParameters: ResultsApiGetResultsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResults( + requestParameters.subsession_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsEventLogRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsEventLog( + requestParameters: ResultsApiGetResultsEventLogRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsEventLog( + requestParameters.subsession_id, + requestParameters.simsession_number, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsLapChartDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapChartData( + requestParameters: ResultsApiGetResultsLapChartDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsLapChartData( + requestParameters.subsession_id, + requestParameters.simsession_number, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsLapDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsLapData( + requestParameters: ResultsApiGetResultsLapDataRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsLapData( + requestParameters.subsession_id, + requestParameters.simsession_number, + requestParameters.cust_id, + requestParameters.team_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsSearchHostedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchHosted( + requestParameters: ResultsApiGetResultsSearchHostedRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsSearchHosted( + requestParameters.start_range_begin, + requestParameters.start_range_end, + requestParameters.finish_range_begin, + requestParameters.finish_range_end, + requestParameters.cust_id, + requestParameters.team_id, + requestParameters.host_cust_id, + requestParameters.session_name, + requestParameters.league_id, + requestParameters.league_season_id, + requestParameters.car_id, + requestParameters.track_id, + requestParameters.category_ids, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsSearchSeriesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSearchSeries( + requestParameters: ResultsApiGetResultsSearchSeriesRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsSearchSeries( + requestParameters.season_year, + requestParameters.season_quarter, + requestParameters.start_range_begin, + requestParameters.start_range_end, + requestParameters.finish_range_begin, + requestParameters.finish_range_end, + requestParameters.cust_id, + requestParameters.team_id, + requestParameters.series_id, + requestParameters.race_week_num, + requestParameters.official_only, + requestParameters.event_types, + requestParameters.category_ids, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {ResultsApiGetResultsSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getResultsSeasonResults( + requestParameters: ResultsApiGetResultsSeasonResultsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getResultsSeasonResults( + requestParameters.season_id, + requestParameters.event_type, + requestParameters.race_week_num, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for getResults operation in ResultsApi. */ export interface ResultsApiGetResultsRequest { - readonly subsession_id: number + readonly subsession_id: number; - readonly include_licenses?: boolean + readonly include_licenses?: boolean; } /** * Request parameters for getResultsEventLog operation in ResultsApi. */ export interface ResultsApiGetResultsEventLogRequest { - readonly subsession_id: number + readonly subsession_id: number; - /** - * The main event is 0; the preceding event is -1, and so on. - */ - readonly simsession_number: number + /** + * The main event is 0; the preceding event is -1, and so on. + */ + readonly simsession_number: number; } /** * Request parameters for getResultsLapChartData operation in ResultsApi. */ export interface ResultsApiGetResultsLapChartDataRequest { - readonly subsession_id: number + readonly subsession_id: number; - /** - * The main event is 0; the preceding event is -1, and so on. - */ - readonly simsession_number: number + /** + * The main event is 0; the preceding event is -1, and so on. + */ + readonly simsession_number: number; } /** * Request parameters for getResultsLapData operation in ResultsApi. */ export interface ResultsApiGetResultsLapDataRequest { - readonly subsession_id: number - - /** - * The main event is 0; the preceding event is -1, and so on. - */ - readonly simsession_number: number - - /** - * Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. - */ - readonly cust_id?: number - - /** - * Required if the subsession was a team event. - */ - readonly team_id?: number + readonly subsession_id: number; + + /** + * The main event is 0; the preceding event is -1, and so on. + */ + readonly simsession_number: number; + + /** + * Required if the subsession was a single-driver event. Optional for team events. If omitted for a team event then the laps driven by all the team\'s drivers will be included. + */ + readonly cust_id?: number; + + /** + * Required if the subsession was a team event. + */ + readonly team_id?: number; } /** * Request parameters for getResultsSearchHosted operation in ResultsApi. */ export interface ResultsApiGetResultsSearchHostedRequest { - /** - * Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - */ - readonly start_range_begin?: string - - /** - * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. - */ - readonly start_range_end?: string - - /** - * Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - */ - readonly finish_range_begin?: string - - /** - * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. - */ - readonly finish_range_end?: string - - /** - * The participant\'s customer ID. Ignored if team_id is supplied. - */ - readonly cust_id?: number - - /** - * The team ID to search for. Takes priority over cust_id if both are supplied. - */ - readonly team_id?: number - - /** - * The host\'s customer ID. - */ - readonly host_cust_id?: number - - /** - * Part or all of the session\'s name. - */ - readonly session_name?: string - - /** - * Include only results for the league with this ID. - */ - readonly league_id?: number - - /** - * Include only results for the league season with this ID. - */ - readonly league_season_id?: number - - /** - * One of the cars used by the session. - */ - readonly car_id?: number - - /** - * The ID of the track used by the session. - */ - readonly track_id?: number - - /** - * Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 - */ - readonly category_ids?: string + /** + * Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly start_range_begin?: string; + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + */ + readonly start_range_end?: string; + + /** + * Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly finish_range_begin?: string; + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + */ + readonly finish_range_end?: string; + + /** + * The participant\'s customer ID. Ignored if team_id is supplied. + */ + readonly cust_id?: number; + + /** + * The team ID to search for. Takes priority over cust_id if both are supplied. + */ + readonly team_id?: number; + + /** + * The host\'s customer ID. + */ + readonly host_cust_id?: number; + + /** + * Part or all of the session\'s name. + */ + readonly session_name?: string; + + /** + * Include only results for the league with this ID. + */ + readonly league_id?: number; + + /** + * Include only results for the league season with this ID. + */ + readonly league_season_id?: number; + + /** + * One of the cars used by the session. + */ + readonly car_id?: number; + + /** + * The ID of the track used by the session. + */ + readonly track_id?: number; + + /** + * Track categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + */ + readonly category_ids?: string; } /** * Request parameters for getResultsSearchSeries operation in ResultsApi. */ export interface ResultsApiGetResultsSearchSeriesRequest { - /** - * Required when using season_quarter. - */ - readonly season_year?: number - - /** - * Required when using season_year. - */ - readonly season_quarter?: number - - /** - * Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - */ - readonly start_range_begin?: string - - /** - * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. - */ - readonly start_range_end?: string - - /** - * Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". - */ - readonly finish_range_begin?: string - - /** - * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. - */ - readonly finish_range_end?: string - - /** - * Include only sessions in which this customer participated. Ignored if team_id is supplied. - */ - readonly cust_id?: number - - /** - * Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. - */ - readonly team_id?: number - - /** - * Include only sessions for series with this ID. - */ - readonly series_id?: number - - /** - * Include only sessions with this race week number. - */ - readonly race_week_num?: number - - /** - * If true, include only sessions earning championship points. Defaults to all. - */ - readonly official_only?: boolean - - /** - * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - */ - readonly event_types?: string - - /** - * License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 - */ - readonly category_ids?: string + /** + * Required when using season_quarter. + */ + readonly season_year?: number; + + /** + * Required when using season_year. + */ + readonly season_quarter?: number; + + /** + * Session start times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly start_range_begin?: string; + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if start_range_begin is less than 90 days in the past. + */ + readonly start_range_end?: string; + + /** + * Session finish times. ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". + */ + readonly finish_range_begin?: string; + + /** + * ISO-8601 UTC time zero offset: \"2022-04-01T15:45Z\". Exclusive. May be omitted if finish_range_begin is less than 90 days in the past. + */ + readonly finish_range_end?: string; + + /** + * Include only sessions in which this customer participated. Ignored if team_id is supplied. + */ + readonly cust_id?: number; + + /** + * Include only sessions in which this team participated. Takes priority over cust_id if both are supplied. + */ + readonly team_id?: number; + + /** + * Include only sessions for series with this ID. + */ + readonly series_id?: number; + + /** + * Include only sessions with this race week number. + */ + readonly race_week_num?: number; + + /** + * If true, include only sessions earning championship points. Defaults to all. + */ + readonly official_only?: boolean; + + /** + * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + */ + readonly event_types?: string; + + /** + * License categories to include in the search. Defaults to all. ?category_ids=1,2,3,4 + */ + readonly category_ids?: string; } /** * Request parameters for getResultsSeasonResults operation in ResultsApi. */ export interface ResultsApiGetResultsSeasonResultsRequest { - readonly season_id: number + readonly season_id: number; - /** - * Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race - */ - readonly event_type?: IracingEventType + /** + * Retrict to one event type: 2 - Practice; 3 - Qualify; 4 - Time Trial; 5 - Race + */ + readonly event_type?: IracingEventType; - /** - * The first race week of a season is 0. - */ - readonly race_week_num?: number + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number; } /** * ResultsApi - object-oriented interface */ export class ResultsApi extends BaseAPI { - /** - * - * @param {ResultsApiGetResultsRequest} requestParameters Request parameters. + /** + * + * @param {ResultsApiGetResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResults( + requestParameters: ResultsApiGetResultsRequest, + options?: RawAxiosRequestConfig, + ) { + return ResultsApiFp(this.configuration) + .getResults( + requestParameters.subsession_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsEventLogRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsEventLog( + requestParameters: ResultsApiGetResultsEventLogRequest, + options?: RawAxiosRequestConfig, + ) { + return ResultsApiFp(this.configuration) + .getResultsEventLog( + requestParameters.subsession_id, + requestParameters.simsession_number, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsLapChartDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapChartData( + requestParameters: ResultsApiGetResultsLapChartDataRequest, + options?: RawAxiosRequestConfig, + ) { + return ResultsApiFp(this.configuration) + .getResultsLapChartData( + requestParameters.subsession_id, + requestParameters.simsession_number, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsLapDataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsLapData( + requestParameters: ResultsApiGetResultsLapDataRequest, + options?: RawAxiosRequestConfig, + ) { + return ResultsApiFp(this.configuration) + .getResultsLapData( + requestParameters.subsession_id, + requestParameters.simsession_number, + requestParameters.cust_id, + requestParameters.team_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsSearchHostedRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchHosted( + requestParameters: ResultsApiGetResultsSearchHostedRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ResultsApiFp(this.configuration) + .getResultsSearchHosted( + requestParameters.start_range_begin, + requestParameters.start_range_end, + requestParameters.finish_range_begin, + requestParameters.finish_range_end, + requestParameters.cust_id, + requestParameters.team_id, + requestParameters.host_cust_id, + requestParameters.session_name, + requestParameters.league_id, + requestParameters.league_season_id, + requestParameters.car_id, + requestParameters.track_id, + requestParameters.category_ids, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsSearchSeriesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSearchSeries( + requestParameters: ResultsApiGetResultsSearchSeriesRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ResultsApiFp(this.configuration) + .getResultsSearchSeries( + requestParameters.season_year, + requestParameters.season_quarter, + requestParameters.start_range_begin, + requestParameters.start_range_end, + requestParameters.finish_range_begin, + requestParameters.finish_range_end, + requestParameters.cust_id, + requestParameters.team_id, + requestParameters.series_id, + requestParameters.race_week_num, + requestParameters.official_only, + requestParameters.event_types, + requestParameters.category_ids, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {ResultsApiGetResultsSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getResultsSeasonResults( + requestParameters: ResultsApiGetResultsSeasonResultsRequest, + options?: RawAxiosRequestConfig, + ) { + return ResultsApiFp(this.configuration) + .getResultsSeasonResults( + requestParameters.season_id, + requestParameters.event_type, + requestParameters.race_week_num, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * SeasonApi - axios parameter creator + */ +export const SeasonApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {number} season_year + * @param {number} season_quarter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonList: async ( + season_year: number, + season_quarter: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_year' is not null or undefined + assertParamExists("getSeasonList", "season_year", season_year); + // verify required parameter 'season_quarter' is not null or undefined + assertParamExists("getSeasonList", "season_quarter", season_quarter); + const localVarPath = `/data/season/list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_year !== undefined) { + localVarQueryParameter["season_year"] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter["season_quarter"] = season_quarter; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {string} [from] ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. + * @param {boolean} [include_end_after_from] Include sessions which start before \'from\' but end after. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonRaceGuide: async ( + from?: string, + include_end_after_from?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/season/race_guide`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (from !== undefined) { + localVarQueryParameter["from"] = + (from as any) instanceof Date ? (from as any).toISOString() : from; + } + + if (include_end_after_from !== undefined) { + localVarQueryParameter["include_end_after_from"] = + include_end_after_from; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeasonSpectatorSubsessionIds: async ( + event_types?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/season/spectator_subsessionids`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (event_types) { + localVarQueryParameter["event_types"] = event_types; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {Array} [season_ids] Seasons to include in the search. Defaults to all. ?season_ids=513,937 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResults(requestParameters: ResultsApiGetResultsRequest, options?: RawAxiosRequestConfig) { - return ResultsApiFp(this.configuration).getResults(requestParameters.subsession_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); - } + getSeasonSpectatorSubsessionIdsDetail: async ( + event_types?: Array, + season_ids?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/season/spectator_subsessionids_detail`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (event_types) { + localVarQueryParameter["event_types"] = event_types; + } + + if (season_ids) { + localVarQueryParameter["season_ids"] = season_ids; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; +/** + * SeasonApi - functional programming interface + */ +export const SeasonApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = SeasonApiAxiosParamCreator(configuration); + return { /** - * - * @param {ResultsApiGetResultsEventLogRequest} requestParameters Request parameters. + * + * @param {number} season_year + * @param {number} season_quarter + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonList( + season_year: number, + season_quarter: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonList( + season_year, + season_quarter, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeasonApi.getSeasonList"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {string} [from] ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. + * @param {boolean} [include_end_after_from] Include sessions which start before \'from\' but end after. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeasonRaceGuide( + from?: string, + include_end_after_from?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonRaceGuide( + from, + include_end_after_from, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeasonApi.getSeasonRaceGuide"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsEventLog(requestParameters: ResultsApiGetResultsEventLogRequest, options?: RawAxiosRequestConfig) { - return ResultsApiFp(this.configuration).getResultsEventLog(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {ResultsApiGetResultsLapChartDataRequest} requestParameters Request parameters. + async getSeasonSpectatorSubsessionIds( + event_types?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIds( + event_types, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeasonApi.getSeasonSpectatorSubsessionIds"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + * @param {Array} [season_ids] Seasons to include in the search. Defaults to all. ?season_ids=513,937 * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsLapChartData(requestParameters: ResultsApiGetResultsLapChartDataRequest, options?: RawAxiosRequestConfig) { - return ResultsApiFp(this.configuration).getResultsLapChartData(requestParameters.subsession_id, requestParameters.simsession_number, options).then((request) => request(this.axios, this.basePath)); - } + async getSeasonSpectatorSubsessionIdsDetail( + event_types?: Array, + season_ids?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDetail( + event_types, + season_ids, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeasonApi.getSeasonSpectatorSubsessionIdsDetail"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; - /** - * - * @param {ResultsApiGetResultsLapDataRequest} requestParameters Request parameters. +/** + * SeasonApi - factory interface + */ +export const SeasonApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = SeasonApiFp(configuration); + return { + /** + * + * @param {SeasonApiGetSeasonListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsLapData(requestParameters: ResultsApiGetResultsLapDataRequest, options?: RawAxiosRequestConfig) { - return ResultsApiFp(this.configuration).getResultsLapData(requestParameters.subsession_id, requestParameters.simsession_number, requestParameters.cust_id, requestParameters.team_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {ResultsApiGetResultsSearchHostedRequest} requestParameters Request parameters. + getSeasonList( + requestParameters: SeasonApiGetSeasonListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonList( + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeasonApiGetSeasonRaceGuideRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsSearchHosted(requestParameters: ResultsApiGetResultsSearchHostedRequest = {}, options?: RawAxiosRequestConfig) { - return ResultsApiFp(this.configuration).getResultsSearchHosted(requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.host_cust_id, requestParameters.session_name, requestParameters.league_id, requestParameters.league_season_id, requestParameters.car_id, requestParameters.track_id, requestParameters.category_ids, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {ResultsApiGetResultsSearchSeriesRequest} requestParameters Request parameters. + getSeasonRaceGuide( + requestParameters: SeasonApiGetSeasonRaceGuideRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonRaceGuide( + requestParameters.from, + requestParameters.include_end_after_from, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsSearchSeries(requestParameters: ResultsApiGetResultsSearchSeriesRequest = {}, options?: RawAxiosRequestConfig) { - return ResultsApiFp(this.configuration).getResultsSearchSeries(requestParameters.season_year, requestParameters.season_quarter, requestParameters.start_range_begin, requestParameters.start_range_end, requestParameters.finish_range_begin, requestParameters.finish_range_end, requestParameters.cust_id, requestParameters.team_id, requestParameters.series_id, requestParameters.race_week_num, requestParameters.official_only, requestParameters.event_types, requestParameters.category_ids, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {ResultsApiGetResultsSeasonResultsRequest} requestParameters Request parameters. + getSeasonSpectatorSubsessionIds( + requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonSpectatorSubsessionIds(requestParameters.event_types, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getResultsSeasonResults(requestParameters: ResultsApiGetResultsSeasonResultsRequest, options?: RawAxiosRequestConfig) { - return ResultsApiFp(this.configuration).getResultsSeasonResults(requestParameters.season_id, requestParameters.event_type, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * SeasonApi - axios parameter creator - */ -export const SeasonApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {number} season_year - * @param {number} season_quarter - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonList: async (season_year: number, season_quarter: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_year' is not null or undefined - assertParamExists('getSeasonList', 'season_year', season_year) - // verify required parameter 'season_quarter' is not null or undefined - assertParamExists('getSeasonList', 'season_quarter', season_quarter) - const localVarPath = `/data/season/list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_year !== undefined) { - localVarQueryParameter['season_year'] = season_year; - } - - if (season_quarter !== undefined) { - localVarQueryParameter['season_quarter'] = season_quarter; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {string} [from] ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. - * @param {boolean} [include_end_after_from] Include sessions which start before \'from\' but end after. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonRaceGuide: async (from?: string, include_end_after_from?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/season/race_guide`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (from !== undefined) { - localVarQueryParameter['from'] = (from as any instanceof Date) ? - (from as any).toISOString() : - from; - } - - if (include_end_after_from !== undefined) { - localVarQueryParameter['include_end_after_from'] = include_end_after_from; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIds: async (event_types?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/season/spectator_subsessionids`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (event_types) { - localVarQueryParameter['event_types'] = event_types; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - * @param {Array} [season_ids] Seasons to include in the search. Defaults to all. ?season_ids=513,937 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIdsDetail: async (event_types?: Array, season_ids?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/season/spectator_subsessionids_detail`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (event_types) { - localVarQueryParameter['event_types'] = event_types; - } - - if (season_ids) { - localVarQueryParameter['season_ids'] = season_ids; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * SeasonApi - functional programming interface - */ -export const SeasonApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = SeasonApiAxiosParamCreator(configuration) - return { - /** - * - * @param {number} season_year - * @param {number} season_quarter - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonList(season_year: number, season_quarter: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonList(season_year, season_quarter, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {string} [from] ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. - * @param {boolean} [include_end_after_from] Include sessions which start before \'from\' but end after. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonRaceGuide(from?: string, include_end_after_from?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonRaceGuide(from, include_end_after_from, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonRaceGuide']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonSpectatorSubsessionIds(event_types?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIds(event_types, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonSpectatorSubsessionIds']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {Array} [event_types] Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - * @param {Array} [season_ids] Seasons to include in the search. Defaults to all. ?season_ids=513,937 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeasonSpectatorSubsessionIdsDetail(event_types?: Array, season_ids?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeasonSpectatorSubsessionIdsDetail(event_types, season_ids, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeasonApi.getSeasonSpectatorSubsessionIdsDetail']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * SeasonApi - factory interface - */ -export const SeasonApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = SeasonApiFp(configuration) - return { - /** - * - * @param {SeasonApiGetSeasonListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonList(requestParameters: SeasonApiGetSeasonListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonList(requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {SeasonApiGetSeasonRaceGuideRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonRaceGuide(requestParameters: SeasonApiGetSeasonRaceGuideRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonRaceGuide(requestParameters.from, requestParameters.include_end_after_from, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {SeasonApiGetSeasonSpectatorSubsessionIdsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIds(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonSpectatorSubsessionIds(requestParameters.event_types, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeasonSpectatorSubsessionIdsDetail(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeasonSpectatorSubsessionIdsDetail(requestParameters.event_types, requestParameters.season_ids, options).then((request) => request(axios, basePath)); - }, - }; + getSeasonSpectatorSubsessionIdsDetail( + requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeasonSpectatorSubsessionIdsDetail( + requestParameters.event_types, + requestParameters.season_ids, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for getSeasonList operation in SeasonApi. */ export interface SeasonApiGetSeasonListRequest { - readonly season_year: number + readonly season_year: number; - readonly season_quarter: number + readonly season_quarter: number; } /** * Request parameters for getSeasonRaceGuide operation in SeasonApi. */ export interface SeasonApiGetSeasonRaceGuideRequest { - /** - * ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. - */ - readonly from?: string - - /** - * Include sessions which start before \'from\' but end after. - */ - readonly include_end_after_from?: boolean + /** + * ISO-8601 offset format. Defaults to the current time. Include sessions with start times up to 3 hours after this time. Times in the past will be rewritten to the current time. + */ + readonly from?: string; + + /** + * Include sessions which start before \'from\' but end after. + */ + readonly include_end_after_from?: boolean; } /** * Request parameters for getSeasonSpectatorSubsessionIds operation in SeasonApi. */ export interface SeasonApiGetSeasonSpectatorSubsessionIdsRequest { - /** - * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - */ - readonly event_types?: Array + /** + * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + */ + readonly event_types?: Array; } /** * Request parameters for getSeasonSpectatorSubsessionIdsDetail operation in SeasonApi. */ export interface SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest { - /** - * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 - */ - readonly event_types?: Array - - /** - * Seasons to include in the search. Defaults to all. ?season_ids=513,937 - */ - readonly season_ids?: Array + /** + * Types of events to include in the search. Defaults to all. ?event_types=2,3,4,5 + */ + readonly event_types?: Array; + + /** + * Seasons to include in the search. Defaults to all. ?season_ids=513,937 + */ + readonly season_ids?: Array; } /** * SeasonApi - object-oriented interface */ export class SeasonApi extends BaseAPI { + /** + * + * @param {SeasonApiGetSeasonListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonList( + requestParameters: SeasonApiGetSeasonListRequest, + options?: RawAxiosRequestConfig, + ) { + return SeasonApiFp(this.configuration) + .getSeasonList( + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeasonApiGetSeasonRaceGuideRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonRaceGuide( + requestParameters: SeasonApiGetSeasonRaceGuideRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return SeasonApiFp(this.configuration) + .getSeasonRaceGuide( + requestParameters.from, + requestParameters.include_end_after_from, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIds( + requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return SeasonApiFp(this.configuration) + .getSeasonSpectatorSubsessionIds(requestParameters.event_types, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeasonSpectatorSubsessionIdsDetail( + requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return SeasonApiFp(this.configuration) + .getSeasonSpectatorSubsessionIdsDetail( + requestParameters.event_types, + requestParameters.season_ids, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * SeriesApi - axios parameter creator + */ +export const SeriesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * - * @param {SeasonApiGetSeasonListRequest} requestParameters Request parameters. + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonList(requestParameters: SeasonApiGetSeasonListRequest, options?: RawAxiosRequestConfig) { - return SeasonApiFp(this.configuration).getSeasonList(requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {SeasonApiGetSeasonRaceGuideRequest} requestParameters Request parameters. + getSeries: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/series/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonRaceGuide(requestParameters: SeasonApiGetSeasonRaceGuideRequest = {}, options?: RawAxiosRequestConfig) { - return SeasonApiFp(this.configuration).getSeasonRaceGuide(requestParameters.from, requestParameters.include_end_after_from, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {SeasonApiGetSeasonSpectatorSubsessionIdsRequest} requestParameters Request parameters. + getSeriesAssets: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/series/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} series_id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonSpectatorSubsessionIds(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsRequest = {}, options?: RawAxiosRequestConfig) { - return SeasonApiFp(this.configuration).getSeasonSpectatorSubsessionIds(requestParameters.event_types, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest} requestParameters Request parameters. + getSeriesPastSeasons: async ( + series_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'series_id' is not null or undefined + assertParamExists("getSeriesPastSeasons", "series_id", series_id); + const localVarPath = `/data/series/past_seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (series_id !== undefined) { + localVarQueryParameter["series_id"] = series_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] + * @param {number} [season_quarter] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeasonSpectatorSubsessionIdsDetail(requestParameters: SeasonApiGetSeasonSpectatorSubsessionIdsDetailRequest = {}, options?: RawAxiosRequestConfig) { - return SeasonApiFp(this.configuration).getSeasonSpectatorSubsessionIdsDetail(requestParameters.event_types, requestParameters.season_ids, options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * SeriesApi - axios parameter creator - */ -export const SeriesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeries: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/series/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesAssets: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/series/assets`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} series_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesPastSeasons: async (series_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'series_id' is not null or undefined - assertParamExists('getSeriesPastSeasons', 'series_id', series_id) - const localVarPath = `/data/series/past_seasons`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (series_id !== undefined) { - localVarQueryParameter['series_id'] = series_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {boolean} [include_series] - * @param {number} [season_year] - * @param {number} [season_quarter] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonList: async (include_series?: boolean, season_year?: number, season_quarter?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/series/season_list`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (include_series !== undefined) { - localVarQueryParameter['include_series'] = include_series; - } - - if (season_year !== undefined) { - localVarQueryParameter['season_year'] = season_year; - } - - if (season_quarter !== undefined) { - localVarQueryParameter['season_quarter'] = season_quarter; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonSchedule: async (season_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getSeriesSeasonSchedule', 'season_id', season_id) - const localVarPath = `/data/series/season_schedule`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {boolean} [include_series] - * @param {number} [season_year] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. - * @param {number} [season_quarter] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasons: async (include_series?: boolean, season_year?: number, season_quarter?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/series/seasons`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (include_series !== undefined) { - localVarQueryParameter['include_series'] = include_series; - } - - if (season_year !== undefined) { - localVarQueryParameter['season_year'] = season_year; - } - - if (season_quarter !== undefined) { - localVarQueryParameter['season_quarter'] = season_quarter; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesStatsSeries: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/series/stats_series`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } + getSeriesSeasonList: async ( + include_series?: boolean, + season_year?: number, + season_quarter?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/series/season_list`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (include_series !== undefined) { + localVarQueryParameter["include_series"] = include_series; + } + + if (season_year !== undefined) { + localVarQueryParameter["season_year"] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter["season_quarter"] = season_quarter; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonSchedule: async ( + season_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists("getSeriesSeasonSchedule", "season_id", season_id); + const localVarPath = `/data/series/season_schedule`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {number} [season_quarter] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasons: async ( + include_series?: boolean, + season_year?: number, + season_quarter?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/series/seasons`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (include_series !== undefined) { + localVarQueryParameter["include_series"] = include_series; + } + + if (season_year !== undefined) { + localVarQueryParameter["season_year"] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter["season_quarter"] = season_quarter; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesStatsSeries: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/series/stats_series`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** * SeriesApi - functional programming interface */ -export const SeriesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = SeriesApiAxiosParamCreator(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeries(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeries']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesAssets(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesAssets(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesAssets']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} series_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesPastSeasons(series_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesPastSeasons(series_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesPastSeasons']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {boolean} [include_series] - * @param {number} [season_year] - * @param {number} [season_quarter] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesSeasonList(include_series?: boolean, season_year?: number, season_quarter?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonList(include_series, season_year, season_quarter, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesSeasonList']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesSeasonSchedule(season_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasonSchedule(season_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesSeasonSchedule']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {boolean} [include_series] - * @param {number} [season_year] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. - * @param {number} [season_quarter] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesSeasons(include_series?: boolean, season_year?: number, season_quarter?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesSeasons(include_series, season_year, season_quarter, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesSeasons']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSeriesStatsSeries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSeriesStatsSeries(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SeriesApi.getSeriesStatsSeries']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } +export const SeriesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = SeriesApiAxiosParamCreator(configuration); + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeries( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeries(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeriesApi.getSeries"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesAssets( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesAssets(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeriesApi.getSeriesAssets"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} series_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesPastSeasons( + series_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesPastSeasons( + series_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeriesApi.getSeriesPastSeasons"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] + * @param {number} [season_quarter] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonList( + include_series?: boolean, + season_year?: number, + season_quarter?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesSeasonList( + include_series, + season_year, + season_quarter, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeriesApi.getSeriesSeasonList"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasonSchedule( + season_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesSeasonSchedule( + season_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeriesApi.getSeriesSeasonSchedule"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {boolean} [include_series] + * @param {number} [season_year] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {number} [season_quarter] To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesSeasons( + include_series?: boolean, + season_year?: number, + season_quarter?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesSeasons( + include_series, + season_year, + season_quarter, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeriesApi.getSeriesSeasons"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSeriesStatsSeries( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getSeriesStatsSeries(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["SeriesApi.getSeriesStatsSeries"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; }; /** * SeriesApi - factory interface */ -export const SeriesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = SeriesApiFp(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeries(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeries(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesAssets(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesAssets(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {SeriesApiGetSeriesPastSeasonsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesPastSeasons(requestParameters: SeriesApiGetSeriesPastSeasonsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesPastSeasons(requestParameters.series_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {SeriesApiGetSeriesSeasonListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonList(requestParameters: SeriesApiGetSeriesSeasonListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesSeasonList(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {SeriesApiGetSeriesSeasonScheduleRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasonSchedule(requestParameters: SeriesApiGetSeriesSeasonScheduleRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesSeasonSchedule(requestParameters.season_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {SeriesApiGetSeriesSeasonsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesSeasons(requestParameters: SeriesApiGetSeriesSeasonsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesSeasons(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSeriesStatsSeries(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSeriesStatsSeries(options).then((request) => request(axios, basePath)); - }, - }; +export const SeriesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = SeriesApiFp(configuration); + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeries( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeries(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesAssets( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesAssets(options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesPastSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesPastSeasons( + requestParameters: SeriesApiGetSeriesPastSeasonsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesPastSeasons(requestParameters.series_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesSeasonListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonList( + requestParameters: SeriesApiGetSeriesSeasonListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesSeasonList( + requestParameters.include_series, + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesSeasonScheduleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasonSchedule( + requestParameters: SeriesApiGetSeriesSeasonScheduleRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesSeasonSchedule(requestParameters.season_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {SeriesApiGetSeriesSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesSeasons( + requestParameters: SeriesApiGetSeriesSeasonsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesSeasons( + requestParameters.include_series, + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSeriesStatsSeries( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getSeriesStatsSeries(options) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for getSeriesPastSeasons operation in SeriesApi. */ export interface SeriesApiGetSeriesPastSeasonsRequest { - readonly series_id: number + readonly series_id: number; } /** * Request parameters for getSeriesSeasonList operation in SeriesApi. */ export interface SeriesApiGetSeriesSeasonListRequest { - readonly include_series?: boolean + readonly include_series?: boolean; - readonly season_year?: number + readonly season_year?: number; - readonly season_quarter?: number + readonly season_quarter?: number; } /** * Request parameters for getSeriesSeasonSchedule operation in SeriesApi. */ export interface SeriesApiGetSeriesSeasonScheduleRequest { - readonly season_id: number + readonly season_id: number; } /** * Request parameters for getSeriesSeasons operation in SeriesApi. */ export interface SeriesApiGetSeriesSeasonsRequest { - readonly include_series?: boolean + readonly include_series?: boolean; + + /** + * To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + */ + readonly season_year?: number; + + /** + * To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + */ + readonly season_quarter?: number; +} + +/** + * SeriesApi - object-oriented interface + */ +export class SeriesApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeries(options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration) + .getSeries(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesAssets(options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration) + .getSeriesAssets(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesPastSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesPastSeasons( + requestParameters: SeriesApiGetSeriesPastSeasonsRequest, + options?: RawAxiosRequestConfig, + ) { + return SeriesApiFp(this.configuration) + .getSeriesPastSeasons(requestParameters.series_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesSeasonListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonList( + requestParameters: SeriesApiGetSeriesSeasonListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return SeriesApiFp(this.configuration) + .getSeriesSeasonList( + requestParameters.include_series, + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesSeasonScheduleRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasonSchedule( + requestParameters: SeriesApiGetSeriesSeasonScheduleRequest, + options?: RawAxiosRequestConfig, + ) { + return SeriesApiFp(this.configuration) + .getSeriesSeasonSchedule(requestParameters.season_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {SeriesApiGetSeriesSeasonsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesSeasons( + requestParameters: SeriesApiGetSeriesSeasonsRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return SeriesApiFp(this.configuration) + .getSeriesSeasons( + requestParameters.include_series, + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSeriesStatsSeries(options?: RawAxiosRequestConfig) { + return SeriesApiFp(this.configuration) + .getSeriesStatsSeries(options) + .then((request) => request(this.axios, this.basePath)); + } +} + +/** + * StatsApi - axios parameter creator + */ +export const StatsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {number} [car_id] First call should exclude car_id; use cars_driven list in return for subsequent calls. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberBests: async ( + cust_id?: number, + car_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/stats/member_bests`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (car_id !== undefined) { + localVarQueryParameter["car_id"] = car_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberCareer: async ( + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/stats/member_career`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {GetStatsMemberDivisionEventTypeEnum} event_type The event type code for the division type: 4 - Time Trial; 5 - Race + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberDivision: async ( + season_id: number, + event_type: GetStatsMemberDivisionEventTypeEnum, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists("getStatsMemberDivision", "season_id", season_id); + // verify required parameter 'event_type' is not null or undefined + assertParamExists("getStatsMemberDivision", "event_type", event_type); + const localVarPath = `/data/stats/member_division`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (event_type !== undefined) { + localVarQueryParameter["event_type"] = event_type; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {GetStatsMemberRecapYearEnum} [year] Season year; if not supplied the current calendar year (UTC) is used. + * @param {number} [season] Season (quarter) within the year; if not supplied the recap will be for the entire year. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecap: async ( + cust_id?: number, + year?: GetStatsMemberRecapYearEnum, + season?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/stats/member_recap`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + if (year !== undefined) { + localVarQueryParameter["year"] = year; + } + + if (season !== undefined) { + localVarQueryParameter["season"] = season; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecentRaces: async ( + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/stats/member_recent_races`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberSummary: async ( + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/stats/member_summary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberYearly: async ( + cust_id?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/stats/member_yearly`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (cust_id !== undefined) { + localVarQueryParameter["cust_id"] = cust_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonDriverStandings: async ( + season_id: number, + car_class_id: number, + division?: IracingDivision, + race_week_num?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists( + "getStatsSeasonDriverStandings", + "season_id", + season_id, + ); + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists( + "getStatsSeasonDriverStandings", + "car_class_id", + car_class_id, + ); + const localVarPath = `/data/stats/season_driver_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter["car_class_id"] = car_class_id; + } + + if (division !== undefined) { + localVarQueryParameter["division"] = division; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonQualifyResults: async ( + season_id: number, + car_class_id: number, + race_week_num: number, + division?: IracingDivision, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists("getStatsSeasonQualifyResults", "season_id", season_id); + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists( + "getStatsSeasonQualifyResults", + "car_class_id", + car_class_id, + ); + // verify required parameter 'race_week_num' is not null or undefined + assertParamExists( + "getStatsSeasonQualifyResults", + "race_week_num", + race_week_num, + ); + const localVarPath = `/data/stats/season_qualify_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter["car_class_id"] = car_class_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + if (division !== undefined) { + localVarQueryParameter["division"] = division; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonSupersessionStandings: async ( + season_id: number, + car_class_id: number, + division?: IracingDivision, + race_week_num?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists( + "getStatsSeasonSupersessionStandings", + "season_id", + season_id, + ); + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists( + "getStatsSeasonSupersessionStandings", + "car_class_id", + car_class_id, + ); + const localVarPath = `/data/stats/season_supersession_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter["car_class_id"] = car_class_id; + } + + if (division !== undefined) { + localVarQueryParameter["division"] = division; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTeamStandings: async ( + season_id: number, + car_class_id: number, + race_week_num?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists("getStatsSeasonTeamStandings", "season_id", season_id); + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists( + "getStatsSeasonTeamStandings", + "car_class_id", + car_class_id, + ); + const localVarPath = `/data/stats/season_team_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter["car_class_id"] = car_class_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTimeTrialResults: async ( + season_id: number, + car_class_id: number, + race_week_num: number, + division?: IracingDivision, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists( + "getStatsSeasonTimeTrialResults", + "season_id", + season_id, + ); + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists( + "getStatsSeasonTimeTrialResults", + "car_class_id", + car_class_id, + ); + // verify required parameter 'race_week_num' is not null or undefined + assertParamExists( + "getStatsSeasonTimeTrialResults", + "race_week_num", + race_week_num, + ); + const localVarPath = `/data/stats/season_time_trial_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter["car_class_id"] = car_class_id; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + if (division !== undefined) { + localVarQueryParameter["division"] = division; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsSeasonTimeTrialStandings: async ( + season_id: number, + car_class_id: number, + division?: IracingDivision, + race_week_num?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'season_id' is not null or undefined + assertParamExists( + "getStatsSeasonTimeTrialStandings", + "season_id", + season_id, + ); + // verify required parameter 'car_class_id' is not null or undefined + assertParamExists( + "getStatsSeasonTimeTrialStandings", + "car_class_id", + car_class_id, + ); + const localVarPath = `/data/stats/season_time_trial_standings`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (season_id !== undefined) { + localVarQueryParameter["season_id"] = season_id; + } + + if (car_class_id !== undefined) { + localVarQueryParameter["car_class_id"] = car_class_id; + } + + if (division !== undefined) { + localVarQueryParameter["division"] = division; + } + + if (race_week_num !== undefined) { + localVarQueryParameter["race_week_num"] = race_week_num; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {number} car_id + * @param {number} track_id + * @param {number} [season_year] Limit best times to a given year. + * @param {number} [season_quarter] Limit best times to a given quarter; only applicable when year is used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsWorldRecords: async ( + car_id: number, + track_id: number, + season_year?: number, + season_quarter?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'car_id' is not null or undefined + assertParamExists("getStatsWorldRecords", "car_id", car_id); + // verify required parameter 'track_id' is not null or undefined + assertParamExists("getStatsWorldRecords", "track_id", track_id); + const localVarPath = `/data/stats/world_records`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (car_id !== undefined) { + localVarQueryParameter["car_id"] = car_id; + } + + if (track_id !== undefined) { + localVarQueryParameter["track_id"] = track_id; + } + + if (season_year !== undefined) { + localVarQueryParameter["season_year"] = season_year; + } + + if (season_quarter !== undefined) { + localVarQueryParameter["season_quarter"] = season_quarter; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; +/** + * StatsApi - functional programming interface + */ +export const StatsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = StatsApiAxiosParamCreator(configuration); + return { /** - * To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {number} [car_id] First call should exclude car_id; use cars_driven list in return for subsequent calls. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberBests( + cust_id?: number, + car_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberBests( + cust_id, + car_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsMemberBests"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberCareer( + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberCareer(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsMemberCareer"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {GetStatsMemberDivisionEventTypeEnum} event_type The event type code for the division type: 4 - Time Trial; 5 - Race + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberDivision( + season_id: number, + event_type: GetStatsMemberDivisionEventTypeEnum, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberDivision( + season_id, + event_type, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsMemberDivision"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {GetStatsMemberRecapYearEnum} [year] Season year; if not supplied the current calendar year (UTC) is used. + * @param {number} [season] Season (quarter) within the year; if not supplied the recap will be for the entire year. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecap( + cust_id?: number, + year?: GetStatsMemberRecapYearEnum, + season?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberRecap( + cust_id, + year, + season, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsMemberRecap"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberRecentRaces( + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberRecentRaces( + cust_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsMemberRecentRaces"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberSummary( + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberSummary(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsMemberSummary"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} [cust_id] Defaults to the authenticated member. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsMemberYearly( + cust_id?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsMemberYearly(cust_id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsMemberYearly"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonDriverStandings( + season_id: number, + car_class_id: number, + division?: IracingDivision, + race_week_num?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonDriverStandings( + season_id, + car_class_id, + division, + race_week_num, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsSeasonDriverStandings"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonQualifyResults( + season_id: number, + car_class_id: number, + race_week_num: number, + division?: IracingDivision, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonQualifyResults( + season_id, + car_class_id, + race_week_num, + division, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsSeasonQualifyResults"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonSupersessionStandings( + season_id: number, + car_class_id: number, + division?: IracingDivision, + race_week_num?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonSupersessionStandings( + season_id, + car_class_id, + division, + race_week_num, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsSeasonSupersessionStandings"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTeamStandings( + season_id: number, + car_class_id: number, + race_week_num?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonTeamStandings( + season_id, + car_class_id, + race_week_num, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsSeasonTeamStandings"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {number} race_week_num The first race week of a season is 0. + * @param {IracingDivision} [division] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTimeTrialResults( + season_id: number, + car_class_id: number, + race_week_num: number, + division?: IracingDivision, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonTimeTrialResults( + season_id, + car_class_id, + race_week_num, + division, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsSeasonTimeTrialResults"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} season_id + * @param {number} car_class_id + * @param {IracingDivision} [division] + * @param {number} [race_week_num] The first race week of a season is 0. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsSeasonTimeTrialStandings( + season_id: number, + car_class_id: number, + division?: IracingDivision, + race_week_num?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsSeasonTimeTrialStandings( + season_id, + car_class_id, + division, + race_week_num, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsSeasonTimeTrialStandings"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {number} car_id + * @param {number} track_id + * @param {number} [season_year] Limit best times to a given year. + * @param {number} [season_quarter] Limit best times to a given quarter; only applicable when year is used. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getStatsWorldRecords( + car_id: number, + track_id: number, + season_year?: number, + season_quarter?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getStatsWorldRecords( + car_id, + track_id, + season_year, + season_quarter, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["StatsApi.getStatsWorldRecords"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; + +/** + * StatsApi - factory interface + */ +export const StatsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = StatsApiFp(configuration); + return { + /** + * + * @param {StatsApiGetStatsMemberBestsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberBests( + requestParameters: StatsApiGetStatsMemberBestsRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberBests( + requestParameters.cust_id, + requestParameters.car_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberCareerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberCareer( + requestParameters: StatsApiGetStatsMemberCareerRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberCareer(requestParameters.cust_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberDivisionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberDivision( + requestParameters: StatsApiGetStatsMemberDivisionRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberDivision( + requestParameters.season_id, + requestParameters.event_type, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberRecapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecap( + requestParameters: StatsApiGetStatsMemberRecapRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberRecap( + requestParameters.cust_id, + requestParameters.year, + requestParameters.season, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberRecentRacesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getStatsMemberRecentRaces( + requestParameters: StatsApiGetStatsMemberRecentRacesRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberRecentRaces(requestParameters.cust_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberSummaryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly season_year?: number - - /** - * To look up past seasons use both a season_year and season_quarter. Without both, the active seasons are returned. + getStatsMemberSummary( + requestParameters: StatsApiGetStatsMemberSummaryRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberSummary(requestParameters.cust_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsMemberYearlyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly season_quarter?: number -} - -/** - * SeriesApi - object-oriented interface - */ -export class SeriesApi extends BaseAPI { - /** - * + getStatsMemberYearly( + requestParameters: StatsApiGetStatsMemberYearlyRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsMemberYearly(requestParameters.cust_id, options) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonDriverStandingsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeries(options?: RawAxiosRequestConfig) { - return SeriesApiFp(this.configuration).getSeries(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonDriverStandings( + requestParameters: StatsApiGetStatsSeasonDriverStandingsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonDriverStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.division, + requestParameters.race_week_num, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonQualifyResultsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesAssets(options?: RawAxiosRequestConfig) { - return SeriesApiFp(this.configuration).getSeriesAssets(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {SeriesApiGetSeriesPastSeasonsRequest} requestParameters Request parameters. + getStatsSeasonQualifyResults( + requestParameters: StatsApiGetStatsSeasonQualifyResultsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonQualifyResults( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.race_week_num, + requestParameters.division, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonSupersessionStandingsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesPastSeasons(requestParameters: SeriesApiGetSeriesPastSeasonsRequest, options?: RawAxiosRequestConfig) { - return SeriesApiFp(this.configuration).getSeriesPastSeasons(requestParameters.series_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {SeriesApiGetSeriesSeasonListRequest} requestParameters Request parameters. + getStatsSeasonSupersessionStandings( + requestParameters: StatsApiGetStatsSeasonSupersessionStandingsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonSupersessionStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.division, + requestParameters.race_week_num, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonTeamStandingsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesSeasonList(requestParameters: SeriesApiGetSeriesSeasonListRequest = {}, options?: RawAxiosRequestConfig) { - return SeriesApiFp(this.configuration).getSeriesSeasonList(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {SeriesApiGetSeriesSeasonScheduleRequest} requestParameters Request parameters. + getStatsSeasonTeamStandings( + requestParameters: StatsApiGetStatsSeasonTeamStandingsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonTeamStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.race_week_num, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialResultsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesSeasonSchedule(requestParameters: SeriesApiGetSeriesSeasonScheduleRequest, options?: RawAxiosRequestConfig) { - return SeriesApiFp(this.configuration).getSeriesSeasonSchedule(requestParameters.season_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {SeriesApiGetSeriesSeasonsRequest} requestParameters Request parameters. + getStatsSeasonTimeTrialResults( + requestParameters: StatsApiGetStatsSeasonTimeTrialResultsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonTimeTrialResults( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.race_week_num, + requestParameters.division, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialStandingsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesSeasons(requestParameters: SeriesApiGetSeriesSeasonsRequest = {}, options?: RawAxiosRequestConfig) { - return SeriesApiFp(this.configuration).getSeriesSeasons(requestParameters.include_series, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getStatsSeasonTimeTrialStandings( + requestParameters: StatsApiGetStatsSeasonTimeTrialStandingsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsSeasonTimeTrialStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.division, + requestParameters.race_week_num, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * + * @param {StatsApiGetStatsWorldRecordsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSeriesStatsSeries(options?: RawAxiosRequestConfig) { - return SeriesApiFp(this.configuration).getSeriesStatsSeries(options).then((request) => request(this.axios, this.basePath)); - } -} - - - -/** - * StatsApi - axios parameter creator - */ -export const StatsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {number} [car_id] First call should exclude car_id; use cars_driven list in return for subsequent calls. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberBests: async (cust_id?: number, car_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/stats/member_bests`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (car_id !== undefined) { - localVarQueryParameter['car_id'] = car_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberCareer: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/stats/member_career`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {GetStatsMemberDivisionEventTypeEnum} event_type The event type code for the division type: 4 - Time Trial; 5 - Race - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberDivision: async (season_id: number, event_type: GetStatsMemberDivisionEventTypeEnum, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getStatsMemberDivision', 'season_id', season_id) - // verify required parameter 'event_type' is not null or undefined - assertParamExists('getStatsMemberDivision', 'event_type', event_type) - const localVarPath = `/data/stats/member_division`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (event_type !== undefined) { - localVarQueryParameter['event_type'] = event_type; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {GetStatsMemberRecapYearEnum} [year] Season year; if not supplied the current calendar year (UTC) is used. - * @param {number} [season] Season (quarter) within the year; if not supplied the recap will be for the entire year. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecap: async (cust_id?: number, year?: GetStatsMemberRecapYearEnum, season?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/stats/member_recap`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - if (year !== undefined) { - localVarQueryParameter['year'] = year; - } - - if (season !== undefined) { - localVarQueryParameter['season'] = season; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecentRaces: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/stats/member_recent_races`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberSummary: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/stats/member_summary`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberYearly: async (cust_id?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/stats/member_yearly`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (cust_id !== undefined) { - localVarQueryParameter['cust_id'] = cust_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {IracingDivision} [division] - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonDriverStandings: async (season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getStatsSeasonDriverStandings', 'season_id', season_id) - // verify required parameter 'car_class_id' is not null or undefined - assertParamExists('getStatsSeasonDriverStandings', 'car_class_id', car_class_id) - const localVarPath = `/data/stats/season_driver_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (car_class_id !== undefined) { - localVarQueryParameter['car_class_id'] = car_class_id; - } - - if (division !== undefined) { - localVarQueryParameter['division'] = division; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {number} race_week_num The first race week of a season is 0. - * @param {IracingDivision} [division] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonQualifyResults: async (season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getStatsSeasonQualifyResults', 'season_id', season_id) - // verify required parameter 'car_class_id' is not null or undefined - assertParamExists('getStatsSeasonQualifyResults', 'car_class_id', car_class_id) - // verify required parameter 'race_week_num' is not null or undefined - assertParamExists('getStatsSeasonQualifyResults', 'race_week_num', race_week_num) - const localVarPath = `/data/stats/season_qualify_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (car_class_id !== undefined) { - localVarQueryParameter['car_class_id'] = car_class_id; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - if (division !== undefined) { - localVarQueryParameter['division'] = division; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {IracingDivision} [division] - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonSupersessionStandings: async (season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getStatsSeasonSupersessionStandings', 'season_id', season_id) - // verify required parameter 'car_class_id' is not null or undefined - assertParamExists('getStatsSeasonSupersessionStandings', 'car_class_id', car_class_id) - const localVarPath = `/data/stats/season_supersession_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (car_class_id !== undefined) { - localVarQueryParameter['car_class_id'] = car_class_id; - } - - if (division !== undefined) { - localVarQueryParameter['division'] = division; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTeamStandings: async (season_id: number, car_class_id: number, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getStatsSeasonTeamStandings', 'season_id', season_id) - // verify required parameter 'car_class_id' is not null or undefined - assertParamExists('getStatsSeasonTeamStandings', 'car_class_id', car_class_id) - const localVarPath = `/data/stats/season_team_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (car_class_id !== undefined) { - localVarQueryParameter['car_class_id'] = car_class_id; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {number} race_week_num The first race week of a season is 0. - * @param {IracingDivision} [division] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTimeTrialResults: async (season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getStatsSeasonTimeTrialResults', 'season_id', season_id) - // verify required parameter 'car_class_id' is not null or undefined - assertParamExists('getStatsSeasonTimeTrialResults', 'car_class_id', car_class_id) - // verify required parameter 'race_week_num' is not null or undefined - assertParamExists('getStatsSeasonTimeTrialResults', 'race_week_num', race_week_num) - const localVarPath = `/data/stats/season_time_trial_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (car_class_id !== undefined) { - localVarQueryParameter['car_class_id'] = car_class_id; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - if (division !== undefined) { - localVarQueryParameter['division'] = division; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {IracingDivision} [division] - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTimeTrialStandings: async (season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'season_id' is not null or undefined - assertParamExists('getStatsSeasonTimeTrialStandings', 'season_id', season_id) - // verify required parameter 'car_class_id' is not null or undefined - assertParamExists('getStatsSeasonTimeTrialStandings', 'car_class_id', car_class_id) - const localVarPath = `/data/stats/season_time_trial_standings`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (season_id !== undefined) { - localVarQueryParameter['season_id'] = season_id; - } - - if (car_class_id !== undefined) { - localVarQueryParameter['car_class_id'] = car_class_id; - } - - if (division !== undefined) { - localVarQueryParameter['division'] = division; - } - - if (race_week_num !== undefined) { - localVarQueryParameter['race_week_num'] = race_week_num; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {number} car_id - * @param {number} track_id - * @param {number} [season_year] Limit best times to a given year. - * @param {number} [season_quarter] Limit best times to a given quarter; only applicable when year is used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsWorldRecords: async (car_id: number, track_id: number, season_year?: number, season_quarter?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'car_id' is not null or undefined - assertParamExists('getStatsWorldRecords', 'car_id', car_id) - // verify required parameter 'track_id' is not null or undefined - assertParamExists('getStatsWorldRecords', 'track_id', track_id) - const localVarPath = `/data/stats/world_records`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (car_id !== undefined) { - localVarQueryParameter['car_id'] = car_id; - } - - if (track_id !== undefined) { - localVarQueryParameter['track_id'] = track_id; - } - - if (season_year !== undefined) { - localVarQueryParameter['season_year'] = season_year; - } - - if (season_quarter !== undefined) { - localVarQueryParameter['season_quarter'] = season_quarter; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * StatsApi - functional programming interface - */ -export const StatsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = StatsApiAxiosParamCreator(configuration) - return { - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {number} [car_id] First call should exclude car_id; use cars_driven list in return for subsequent calls. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberBests(cust_id?: number, car_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberBests(cust_id, car_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberBests']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberCareer(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberCareer(cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberCareer']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {GetStatsMemberDivisionEventTypeEnum} event_type The event type code for the division type: 4 - Time Trial; 5 - Race - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberDivision(season_id: number, event_type: GetStatsMemberDivisionEventTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberDivision(season_id, event_type, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberDivision']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {GetStatsMemberRecapYearEnum} [year] Season year; if not supplied the current calendar year (UTC) is used. - * @param {number} [season] Season (quarter) within the year; if not supplied the recap will be for the entire year. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberRecap(cust_id?: number, year?: GetStatsMemberRecapYearEnum, season?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecap(cust_id, year, season, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberRecap']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberRecentRaces(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberRecentRaces(cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberRecentRaces']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberSummary(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberSummary(cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberSummary']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} [cust_id] Defaults to the authenticated member. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsMemberYearly(cust_id?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsMemberYearly(cust_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsMemberYearly']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {IracingDivision} [division] - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonDriverStandings(season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonDriverStandings(season_id, car_class_id, division, race_week_num, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonDriverStandings']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {number} race_week_num The first race week of a season is 0. - * @param {IracingDivision} [division] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonQualifyResults(season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonQualifyResults(season_id, car_class_id, race_week_num, division, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonQualifyResults']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {IracingDivision} [division] - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonSupersessionStandings(season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonSupersessionStandings(season_id, car_class_id, division, race_week_num, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonSupersessionStandings']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonTeamStandings(season_id: number, car_class_id: number, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTeamStandings(season_id, car_class_id, race_week_num, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonTeamStandings']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {number} race_week_num The first race week of a season is 0. - * @param {IracingDivision} [division] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonTimeTrialResults(season_id: number, car_class_id: number, race_week_num: number, division?: IracingDivision, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTimeTrialResults(season_id, car_class_id, race_week_num, division, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonTimeTrialResults']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} season_id - * @param {number} car_class_id - * @param {IracingDivision} [division] - * @param {number} [race_week_num] The first race week of a season is 0. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsSeasonTimeTrialStandings(season_id: number, car_class_id: number, division?: IracingDivision, race_week_num?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsSeasonTimeTrialStandings(season_id, car_class_id, division, race_week_num, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsSeasonTimeTrialStandings']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {number} car_id - * @param {number} track_id - * @param {number} [season_year] Limit best times to a given year. - * @param {number} [season_quarter] Limit best times to a given quarter; only applicable when year is used. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStatsWorldRecords(car_id: number, track_id: number, season_year?: number, season_quarter?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStatsWorldRecords(car_id, track_id, season_year, season_quarter, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['StatsApi.getStatsWorldRecords']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * StatsApi - factory interface - */ -export const StatsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = StatsApiFp(configuration) - return { - /** - * - * @param {StatsApiGetStatsMemberBestsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberBests(requestParameters: StatsApiGetStatsMemberBestsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberBests(requestParameters.cust_id, requestParameters.car_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsMemberCareerRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberCareer(requestParameters: StatsApiGetStatsMemberCareerRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberCareer(requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsMemberDivisionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberDivision(requestParameters: StatsApiGetStatsMemberDivisionRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberDivision(requestParameters.season_id, requestParameters.event_type, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsMemberRecapRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecap(requestParameters: StatsApiGetStatsMemberRecapRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberRecap(requestParameters.cust_id, requestParameters.year, requestParameters.season, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsMemberRecentRacesRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberRecentRaces(requestParameters: StatsApiGetStatsMemberRecentRacesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberRecentRaces(requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsMemberSummaryRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberSummary(requestParameters: StatsApiGetStatsMemberSummaryRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberSummary(requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsMemberYearlyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsMemberYearly(requestParameters: StatsApiGetStatsMemberYearlyRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsMemberYearly(requestParameters.cust_id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsSeasonDriverStandingsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonDriverStandings(requestParameters: StatsApiGetStatsSeasonDriverStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonDriverStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsSeasonQualifyResultsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonQualifyResults(requestParameters: StatsApiGetStatsSeasonQualifyResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonQualifyResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsSeasonSupersessionStandingsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonSupersessionStandings(requestParameters: StatsApiGetStatsSeasonSupersessionStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonSupersessionStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsSeasonTeamStandingsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTeamStandings(requestParameters: StatsApiGetStatsSeasonTeamStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonTeamStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsSeasonTimeTrialResultsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTimeTrialResults(requestParameters: StatsApiGetStatsSeasonTimeTrialResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonTimeTrialResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsSeasonTimeTrialStandingsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsSeasonTimeTrialStandings(requestParameters: StatsApiGetStatsSeasonTimeTrialStandingsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsSeasonTimeTrialStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {StatsApiGetStatsWorldRecordsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStatsWorldRecords(requestParameters: StatsApiGetStatsWorldRecordsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getStatsWorldRecords(requestParameters.car_id, requestParameters.track_id, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(axios, basePath)); - }, - }; + getStatsWorldRecords( + requestParameters: StatsApiGetStatsWorldRecordsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getStatsWorldRecords( + requestParameters.car_id, + requestParameters.track_id, + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for getStatsMemberBests operation in StatsApi. */ export interface StatsApiGetStatsMemberBestsRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number - - /** - * First call should exclude car_id; use cars_driven list in return for subsequent calls. - */ - readonly car_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; + + /** + * First call should exclude car_id; use cars_driven list in return for subsequent calls. + */ + readonly car_id?: number; } /** * Request parameters for getStatsMemberCareer operation in StatsApi. */ export interface StatsApiGetStatsMemberCareerRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * Request parameters for getStatsMemberDivision operation in StatsApi. */ export interface StatsApiGetStatsMemberDivisionRequest { - readonly season_id: number + readonly season_id: number; - /** - * The event type code for the division type: 4 - Time Trial; 5 - Race - */ - readonly event_type: GetStatsMemberDivisionEventTypeEnum + /** + * The event type code for the division type: 4 - Time Trial; 5 - Race + */ + readonly event_type: GetStatsMemberDivisionEventTypeEnum; } /** * Request parameters for getStatsMemberRecap operation in StatsApi. */ export interface StatsApiGetStatsMemberRecapRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number - - /** - * Season year; if not supplied the current calendar year (UTC) is used. - */ - readonly year?: GetStatsMemberRecapYearEnum - - /** - * Season (quarter) within the year; if not supplied the recap will be for the entire year. - */ - readonly season?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; + + /** + * Season year; if not supplied the current calendar year (UTC) is used. + */ + readonly year?: GetStatsMemberRecapYearEnum; + + /** + * Season (quarter) within the year; if not supplied the recap will be for the entire year. + */ + readonly season?: number; } /** * Request parameters for getStatsMemberRecentRaces operation in StatsApi. */ export interface StatsApiGetStatsMemberRecentRacesRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * Request parameters for getStatsMemberSummary operation in StatsApi. */ export interface StatsApiGetStatsMemberSummaryRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * Request parameters for getStatsMemberYearly operation in StatsApi. */ export interface StatsApiGetStatsMemberYearlyRequest { - /** - * Defaults to the authenticated member. - */ - readonly cust_id?: number + /** + * Defaults to the authenticated member. + */ + readonly cust_id?: number; } /** * Request parameters for getStatsSeasonDriverStandings operation in StatsApi. */ export interface StatsApiGetStatsSeasonDriverStandingsRequest { - readonly season_id: number + readonly season_id: number; - readonly car_class_id: number + readonly car_class_id: number; - readonly division?: IracingDivision + readonly division?: IracingDivision; - /** - * The first race week of a season is 0. - */ - readonly race_week_num?: number + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number; } /** * Request parameters for getStatsSeasonQualifyResults operation in StatsApi. */ export interface StatsApiGetStatsSeasonQualifyResultsRequest { - readonly season_id: number + readonly season_id: number; - readonly car_class_id: number + readonly car_class_id: number; - /** - * The first race week of a season is 0. - */ - readonly race_week_num: number + /** + * The first race week of a season is 0. + */ + readonly race_week_num: number; - readonly division?: IracingDivision + readonly division?: IracingDivision; } /** * Request parameters for getStatsSeasonSupersessionStandings operation in StatsApi. */ export interface StatsApiGetStatsSeasonSupersessionStandingsRequest { - readonly season_id: number + readonly season_id: number; - readonly car_class_id: number + readonly car_class_id: number; - readonly division?: IracingDivision + readonly division?: IracingDivision; - /** - * The first race week of a season is 0. - */ - readonly race_week_num?: number + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number; } /** * Request parameters for getStatsSeasonTeamStandings operation in StatsApi. */ export interface StatsApiGetStatsSeasonTeamStandingsRequest { - readonly season_id: number + readonly season_id: number; - readonly car_class_id: number + readonly car_class_id: number; - /** - * The first race week of a season is 0. - */ - readonly race_week_num?: number + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number; } /** * Request parameters for getStatsSeasonTimeTrialResults operation in StatsApi. */ export interface StatsApiGetStatsSeasonTimeTrialResultsRequest { - readonly season_id: number + readonly season_id: number; - readonly car_class_id: number + readonly car_class_id: number; - /** - * The first race week of a season is 0. - */ - readonly race_week_num: number + /** + * The first race week of a season is 0. + */ + readonly race_week_num: number; - readonly division?: IracingDivision + readonly division?: IracingDivision; } /** * Request parameters for getStatsSeasonTimeTrialStandings operation in StatsApi. */ export interface StatsApiGetStatsSeasonTimeTrialStandingsRequest { - readonly season_id: number + readonly season_id: number; - readonly car_class_id: number + readonly car_class_id: number; - readonly division?: IracingDivision + readonly division?: IracingDivision; - /** - * The first race week of a season is 0. - */ - readonly race_week_num?: number + /** + * The first race week of a season is 0. + */ + readonly race_week_num?: number; } /** * Request parameters for getStatsWorldRecords operation in StatsApi. */ export interface StatsApiGetStatsWorldRecordsRequest { - readonly car_id: number + readonly car_id: number; - readonly track_id: number + readonly track_id: number; - /** - * Limit best times to a given year. - */ - readonly season_year?: number + /** + * Limit best times to a given year. + */ + readonly season_year?: number; - /** - * Limit best times to a given quarter; only applicable when year is used. - */ - readonly season_quarter?: number + /** + * Limit best times to a given quarter; only applicable when year is used. + */ + readonly season_quarter?: number; } /** * StatsApi - object-oriented interface */ export class StatsApi extends BaseAPI { - /** - * - * @param {StatsApiGetStatsMemberBestsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsMemberBests(requestParameters: StatsApiGetStatsMemberBestsRequest = {}, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsMemberBests(requestParameters.cust_id, requestParameters.car_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsMemberCareerRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsMemberCareer(requestParameters: StatsApiGetStatsMemberCareerRequest = {}, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsMemberCareer(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsMemberDivisionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsMemberDivision(requestParameters: StatsApiGetStatsMemberDivisionRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsMemberDivision(requestParameters.season_id, requestParameters.event_type, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsMemberRecapRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsMemberRecap(requestParameters: StatsApiGetStatsMemberRecapRequest = {}, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsMemberRecap(requestParameters.cust_id, requestParameters.year, requestParameters.season, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsMemberRecentRacesRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsMemberRecentRaces(requestParameters: StatsApiGetStatsMemberRecentRacesRequest = {}, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsMemberRecentRaces(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsMemberSummaryRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsMemberSummary(requestParameters: StatsApiGetStatsMemberSummaryRequest = {}, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsMemberSummary(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsMemberYearlyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsMemberYearly(requestParameters: StatsApiGetStatsMemberYearlyRequest = {}, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsMemberYearly(requestParameters.cust_id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * + * @param {StatsApiGetStatsMemberBestsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberBests( + requestParameters: StatsApiGetStatsMemberBestsRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsMemberBests( + requestParameters.cust_id, + requestParameters.car_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberCareerRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberCareer( + requestParameters: StatsApiGetStatsMemberCareerRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsMemberCareer(requestParameters.cust_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberDivisionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberDivision( + requestParameters: StatsApiGetStatsMemberDivisionRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsMemberDivision( + requestParameters.season_id, + requestParameters.event_type, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberRecapRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecap( + requestParameters: StatsApiGetStatsMemberRecapRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsMemberRecap( + requestParameters.cust_id, + requestParameters.year, + requestParameters.season, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberRecentRacesRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberRecentRaces( + requestParameters: StatsApiGetStatsMemberRecentRacesRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsMemberRecentRaces(requestParameters.cust_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberSummaryRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberSummary( + requestParameters: StatsApiGetStatsMemberSummaryRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsMemberSummary(requestParameters.cust_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsMemberYearlyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsMemberYearly( + requestParameters: StatsApiGetStatsMemberYearlyRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsMemberYearly(requestParameters.cust_id, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonDriverStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonDriverStandings( + requestParameters: StatsApiGetStatsSeasonDriverStandingsRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsSeasonDriverStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.division, + requestParameters.race_week_num, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonQualifyResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonQualifyResults( + requestParameters: StatsApiGetStatsSeasonQualifyResultsRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsSeasonQualifyResults( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.race_week_num, + requestParameters.division, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonSupersessionStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonSupersessionStandings( + requestParameters: StatsApiGetStatsSeasonSupersessionStandingsRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsSeasonSupersessionStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.division, + requestParameters.race_week_num, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonTeamStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTeamStandings( + requestParameters: StatsApiGetStatsSeasonTeamStandingsRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsSeasonTeamStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.race_week_num, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTimeTrialResults( + requestParameters: StatsApiGetStatsSeasonTimeTrialResultsRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsSeasonTimeTrialResults( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.race_week_num, + requestParameters.division, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsSeasonTimeTrialStandingsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsSeasonTimeTrialStandings( + requestParameters: StatsApiGetStatsSeasonTimeTrialStandingsRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsSeasonTimeTrialStandings( + requestParameters.season_id, + requestParameters.car_class_id, + requestParameters.division, + requestParameters.race_week_num, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {StatsApiGetStatsWorldRecordsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getStatsWorldRecords( + requestParameters: StatsApiGetStatsWorldRecordsRequest, + options?: RawAxiosRequestConfig, + ) { + return StatsApiFp(this.configuration) + .getStatsWorldRecords( + requestParameters.car_id, + requestParameters.track_id, + requestParameters.season_year, + requestParameters.season_quarter, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } +} - /** - * - * @param {StatsApiGetStatsSeasonDriverStandingsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStatsSeasonDriverStandings(requestParameters: StatsApiGetStatsSeasonDriverStandingsRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsSeasonDriverStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); - } +export const GetStatsMemberDivisionEventTypeEnum = { + NUMBER_4: 4, + NUMBER_5: 5, +} as const; +export type GetStatsMemberDivisionEventTypeEnum = + (typeof GetStatsMemberDivisionEventTypeEnum)[keyof typeof GetStatsMemberDivisionEventTypeEnum]; +export const GetStatsMemberRecapYearEnum = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4, +} as const; +export type GetStatsMemberRecapYearEnum = + (typeof GetStatsMemberRecapYearEnum)[keyof typeof GetStatsMemberRecapYearEnum]; - /** - * - * @param {StatsApiGetStatsSeasonQualifyResultsRequest} requestParameters Request parameters. +/** + * TeamApi - axios parameter creator + */ +export const TeamApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {number} team_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonQualifyResults(requestParameters: StatsApiGetStatsSeasonQualifyResultsRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsSeasonQualifyResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsSeasonSupersessionStandingsRequest} requestParameters Request parameters. + getTeam: async ( + team_id: number, + include_licenses?: boolean, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'team_id' is not null or undefined + assertParamExists("getTeam", "team_id", team_id); + const localVarPath = `/data/team/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (team_id !== undefined) { + localVarQueryParameter["team_id"] = team_id; + } + + if (include_licenses !== undefined) { + localVarQueryParameter["include_licenses"] = include_licenses; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonSupersessionStandings(requestParameters: StatsApiGetStatsSeasonSupersessionStandingsRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsSeasonSupersessionStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); - } + getTeamMembership: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/team/membership`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; +}; +/** + * TeamApi - functional programming interface + */ +export const TeamApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = TeamApiAxiosParamCreator(configuration); + return { /** - * - * @param {StatsApiGetStatsSeasonTeamStandingsRequest} requestParameters Request parameters. + * + * @param {number} team_id + * @param {boolean} [include_licenses] For faster responses, only request when necessary. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonTeamStandings(requestParameters: StatsApiGetStatsSeasonTeamStandingsRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsSeasonTeamStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsSeasonTimeTrialResultsRequest} requestParameters Request parameters. + async getTeam( + team_id: number, + include_licenses?: boolean, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTeam( + team_id, + include_licenses, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["TeamApi.getTeam"]?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonTimeTrialResults(requestParameters: StatsApiGetStatsSeasonTimeTrialResultsRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsSeasonTimeTrialResults(requestParameters.season_id, requestParameters.car_class_id, requestParameters.race_week_num, requestParameters.division, options).then((request) => request(this.axios, this.basePath)); - } + async getTeamMembership( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTeamMembership(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["TeamApi.getTeamMembership"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; +}; - /** - * - * @param {StatsApiGetStatsSeasonTimeTrialStandingsRequest} requestParameters Request parameters. +/** + * TeamApi - factory interface + */ +export const TeamApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = TeamApiFp(configuration); + return { + /** + * + * @param {TeamApiGetTeamRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsSeasonTimeTrialStandings(requestParameters: StatsApiGetStatsSeasonTimeTrialStandingsRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsSeasonTimeTrialStandings(requestParameters.season_id, requestParameters.car_class_id, requestParameters.division, requestParameters.race_week_num, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {StatsApiGetStatsWorldRecordsRequest} requestParameters Request parameters. + getTeam( + requestParameters: TeamApiGetTeamRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTeam( + requestParameters.team_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(axios, basePath)); + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getStatsWorldRecords(requestParameters: StatsApiGetStatsWorldRecordsRequest, options?: RawAxiosRequestConfig) { - return StatsApiFp(this.configuration).getStatsWorldRecords(requestParameters.car_id, requestParameters.track_id, requestParameters.season_year, requestParameters.season_quarter, options).then((request) => request(this.axios, this.basePath)); - } -} - -export const GetStatsMemberDivisionEventTypeEnum = { - NUMBER_4: 4, - NUMBER_5: 5 -} as const; -export type GetStatsMemberDivisionEventTypeEnum = typeof GetStatsMemberDivisionEventTypeEnum[keyof typeof GetStatsMemberDivisionEventTypeEnum]; -export const GetStatsMemberRecapYearEnum = { - NUMBER_1: 1, - NUMBER_2: 2, - NUMBER_3: 3, - NUMBER_4: 4 -} as const; -export type GetStatsMemberRecapYearEnum = typeof GetStatsMemberRecapYearEnum[keyof typeof GetStatsMemberRecapYearEnum]; - - -/** - * TeamApi - axios parameter creator - */ -export const TeamApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {number} team_id - * @param {boolean} [include_licenses] For faster responses, only request when necessary. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeam: async (team_id: number, include_licenses?: boolean, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'team_id' is not null or undefined - assertParamExists('getTeam', 'team_id', team_id) - const localVarPath = `/data/team/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (team_id !== undefined) { - localVarQueryParameter['team_id'] = team_id; - } - - if (include_licenses !== undefined) { - localVarQueryParameter['include_licenses'] = include_licenses; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamMembership: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/team/membership`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * TeamApi - functional programming interface - */ -export const TeamApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TeamApiAxiosParamCreator(configuration) - return { - /** - * - * @param {number} team_id - * @param {boolean} [include_licenses] For faster responses, only request when necessary. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTeam(team_id: number, include_licenses?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTeam(team_id, include_licenses, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TeamApi.getTeam']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTeamMembership(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamMembership(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TeamApi.getTeamMembership']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } -}; - -/** - * TeamApi - factory interface - */ -export const TeamApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TeamApiFp(configuration) - return { - /** - * - * @param {TeamApiGetTeamRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeam(requestParameters: TeamApiGetTeamRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTeam(requestParameters.team_id, requestParameters.include_licenses, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTeamMembership(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTeamMembership(options).then((request) => request(axios, basePath)); - }, - }; + getTeamMembership( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTeamMembership(options) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for getTeam operation in TeamApi. */ export interface TeamApiGetTeamRequest { - readonly team_id: number + readonly team_id: number; - /** - * For faster responses, only request when necessary. - */ - readonly include_licenses?: boolean + /** + * For faster responses, only request when necessary. + */ + readonly include_licenses?: boolean; } /** * TeamApi - object-oriented interface */ export class TeamApi extends BaseAPI { - /** - * - * @param {TeamApiGetTeamRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getTeam(requestParameters: TeamApiGetTeamRequest, options?: RawAxiosRequestConfig) { - return TeamApiFp(this.configuration).getTeam(requestParameters.team_id, requestParameters.include_licenses, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getTeamMembership(options?: RawAxiosRequestConfig) { - return TeamApiFp(this.configuration).getTeamMembership(options).then((request) => request(this.axios, this.basePath)); - } + /** + * + * @param {TeamApiGetTeamRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeam( + requestParameters: TeamApiGetTeamRequest, + options?: RawAxiosRequestConfig, + ) { + return TeamApiFp(this.configuration) + .getTeam( + requestParameters.team_id, + requestParameters.include_licenses, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTeamMembership(options?: RawAxiosRequestConfig) { + return TeamApiFp(this.configuration) + .getTeamMembership(options) + .then((request) => request(this.axios, this.basePath)); + } } - - /** * TimeAttackApi - axios parameter creator */ -export const TimeAttackApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {number} ta_comp_season_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTimeAttackMemberSeasonResults: async (ta_comp_season_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'ta_comp_season_id' is not null or undefined - assertParamExists('getTimeAttackMemberSeasonResults', 'ta_comp_season_id', ta_comp_season_id) - const localVarPath = `/data/time_attack/member_season_results`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (ta_comp_season_id !== undefined) { - localVarQueryParameter['ta_comp_season_id'] = ta_comp_season_id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } +export const TimeAttackApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {number} ta_comp_season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackMemberSeasonResults: async ( + ta_comp_season_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'ta_comp_season_id' is not null or undefined + assertParamExists( + "getTimeAttackMemberSeasonResults", + "ta_comp_season_id", + ta_comp_season_id, + ); + const localVarPath = `/data/time_attack/member_season_results`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + if (ta_comp_season_id !== undefined) { + localVarQueryParameter["ta_comp_season_id"] = ta_comp_season_id; + } + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** * TimeAttackApi - functional programming interface */ -export const TimeAttackApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TimeAttackApiAxiosParamCreator(configuration) - return { - /** - * - * @param {number} ta_comp_season_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTimeAttackMemberSeasonResults(ta_comp_season_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTimeAttackMemberSeasonResults(ta_comp_season_id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TimeAttackApi.getTimeAttackMemberSeasonResults']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } +export const TimeAttackApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + TimeAttackApiAxiosParamCreator(configuration); + return { + /** + * + * @param {number} ta_comp_season_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTimeAttackMemberSeasonResults( + ta_comp_season_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTimeAttackMemberSeasonResults( + ta_comp_season_id, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["TimeAttackApi.getTimeAttackMemberSeasonResults"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; }; /** * TimeAttackApi - factory interface */ -export const TimeAttackApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TimeAttackApiFp(configuration) - return { - /** - * - * @param {TimeAttackApiGetTimeAttackMemberSeasonResultsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTimeAttackMemberSeasonResults(requestParameters: TimeAttackApiGetTimeAttackMemberSeasonResultsRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTimeAttackMemberSeasonResults(requestParameters.ta_comp_season_id, options).then((request) => request(axios, basePath)); - }, - }; +export const TimeAttackApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = TimeAttackApiFp(configuration); + return { + /** + * + * @param {TimeAttackApiGetTimeAttackMemberSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTimeAttackMemberSeasonResults( + requestParameters: TimeAttackApiGetTimeAttackMemberSeasonResultsRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTimeAttackMemberSeasonResults( + requestParameters.ta_comp_season_id, + options, + ) + .then((request) => request(axios, basePath)); + }, + }; }; /** * Request parameters for getTimeAttackMemberSeasonResults operation in TimeAttackApi. */ export interface TimeAttackApiGetTimeAttackMemberSeasonResultsRequest { - readonly ta_comp_season_id: number + readonly ta_comp_season_id: number; } /** * TimeAttackApi - object-oriented interface */ export class TimeAttackApi extends BaseAPI { - /** - * - * @param {TimeAttackApiGetTimeAttackMemberSeasonResultsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getTimeAttackMemberSeasonResults(requestParameters: TimeAttackApiGetTimeAttackMemberSeasonResultsRequest, options?: RawAxiosRequestConfig) { - return TimeAttackApiFp(this.configuration).getTimeAttackMemberSeasonResults(requestParameters.ta_comp_season_id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * + * @param {TimeAttackApiGetTimeAttackMemberSeasonResultsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTimeAttackMemberSeasonResults( + requestParameters: TimeAttackApiGetTimeAttackMemberSeasonResultsRequest, + options?: RawAxiosRequestConfig, + ) { + return TimeAttackApiFp(this.configuration) + .getTimeAttackMemberSeasonResults( + requestParameters.ta_comp_season_id, + options, + ) + .then((request) => request(this.axios, this.basePath)); + } } - - /** * TrackApi - axios parameter creator */ -export const TrackApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrack: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/track/get`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackAssets: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/data/track/assets`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication bearerAuth required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } +export const TrackApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrack: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/track/get`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrackAssets: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/data/track/assets`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: "GET", + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + }; }; /** * TrackApi - functional programming interface */ -export const TrackApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TrackApiAxiosParamCreator(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTrack(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrack(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TrackApi.getTrack']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getTrackAssets(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrackAssets(options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['TrackApi.getTrackAssets']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - } +export const TrackApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = TrackApiAxiosParamCreator(configuration); + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrack( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTrack(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["TrackApi.getTrack"]?.[localVarOperationServerIndex] + ?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTrackAssets( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getTrackAssets(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap["TrackApi.getTrackAssets"]?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + }; }; /** * TrackApi - factory interface */ -export const TrackApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TrackApiFp(configuration) - return { - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrack(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTrack(options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getTrackAssets(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getTrackAssets(options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * TrackApi - object-oriented interface - */ -export class TrackApi extends BaseAPI { - /** - * +export const TrackApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = TrackApiFp(configuration); + return { + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTrack(options?: RawAxiosRequestConfig) { - return TrackApiFp(this.configuration).getTrack(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * + getTrack( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTrack(options) + .then((request) => request(axios, basePath)); + }, + /** + * * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getTrackAssets(options?: RawAxiosRequestConfig) { - return TrackApiFp(this.configuration).getTrackAssets(options).then((request) => request(this.axios, this.basePath)); - } -} - - + getTrackAssets( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .getTrackAssets(options) + .then((request) => request(axios, basePath)); + }, + }; +}; +/** + * TrackApi - object-oriented interface + */ +export class TrackApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrack(options?: RawAxiosRequestConfig) { + return TrackApiFp(this.configuration) + .getTrack(options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getTrackAssets(options?: RawAxiosRequestConfig) { + return TrackApiFp(this.configuration) + .getTrackAssets(options) + .then((request) => request(this.axios, this.basePath)); + } +} diff --git a/packages/api/client/axios/base.ts b/packages/api/client/axios/base.ts index 8826154f..3609163a 100644 --- a/packages/api/client/axios/base.ts +++ b/packages/api/client/axios/base.ts @@ -5,58 +5,63 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from './configuration'; +import type { Configuration } from "./configuration"; // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios"; +import globalAxios from "axios"; export const BASE_PATH = "https://members-ng.iracing.com".replace(/\/+$/, ""); export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; export interface RequestArgs { - url: string; - options: RawAxiosRequestConfig; + url: string; + options: RawAxiosRequestConfig; } export class BaseAPI { - protected configuration: Configuration | undefined; + protected configuration: Configuration | undefined; - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath ?? basePath; - } + constructor( + configuration?: Configuration, + protected basePath: string = BASE_PATH, + protected axios: AxiosInstance = globalAxios, + ) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; } -}; + } +} export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } + constructor( + public field: string, + msg?: string, + ) { + super(msg); + this.name = "RequiredError"; + } } interface ServerMap { - [key: string]: { - url: string, - description: string, - }[]; + [key: string]: { + url: string; + description: string; + }[]; } -export const operationServerMap: ServerMap = { -} +export const operationServerMap: ServerMap = {}; diff --git a/packages/api/client/axios/common.ts b/packages/api/client/axios/common.ts index b3e29b66..ef06c84c 100644 --- a/packages/api/client/axios/common.ts +++ b/packages/api/client/axios/common.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,100 +14,152 @@ import type { Configuration } from "./configuration"; import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; +import type { AxiosInstance, AxiosResponse } from "axios"; import { RequiredError } from "./base"; -export const DUMMY_BASE_URL = 'https://example.com' +export const DUMMY_BASE_URL = "https://example.com"; /** * * @throws {RequiredError} */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -} +export const assertParamExists = function ( + functionName: string, + paramName: string, + paramValue: unknown, +) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError( + paramName, + `Required parameter ${paramName} was null or undefined when calling ${functionName}.`, + ); + } +}; -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } -} +export const setApiKeyToObject = async function ( + object: any, + keyParamName: string, + configuration?: Configuration, +) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = + typeof configuration.apiKey === "function" + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +}; -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -} - -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } -} +export const setBasicAuthToObject = function ( + object: any, + configuration?: Configuration, +) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { + username: configuration.username, + password: configuration.password, + }; + } +}; -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } -} +export const setBearerAuthToObject = async function ( + object: any, + configuration?: Configuration, +) { + if (configuration && configuration.accessToken) { + const accessToken = + typeof configuration.accessToken === "function" + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +}; +export const setOAuthToObject = async function ( + object: any, + name: string, + scopes: string[], + configuration?: Configuration, +) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = + typeof configuration.accessToken === "function" + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +}; -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } +function setFlattenedQueryParams( + urlSearchParams: URLSearchParams, + parameter: any, + key: string = "", +): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach((item) => + setFlattenedQueryParams(urlSearchParams, item, key), + ); + } else { + Object.keys(parameter).forEach((currentKey) => + setFlattenedQueryParams( + urlSearchParams, + parameter[currentKey], + `${key}${key !== "" ? "." : ""}${currentKey}`, + ), + ); } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } + } else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } else { + urlSearchParams.set(key, parameter); } + } } export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -} + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +}; -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -} +export const serializeDataIfNeeded = function ( + value: any, + requestOptions: any, + configuration?: Configuration, +) { + const nonString = typeof value !== "string"; + const needsSerialization = + nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : value || ""; +}; export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash -} + return url.pathname + url.search + url.hash; +}; -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); +export const createRequestFunction = function ( + axiosArgs: RequestArgs, + globalAxios: AxiosInstance, + BASE_PATH: string, + configuration?: Configuration, +) { + return >( + axios: AxiosInstance = globalAxios, + basePath: string = BASE_PATH, + ) => { + const axiosRequestArgs = { + ...axiosArgs.options, + url: + (axios.defaults.baseURL ? "" : (configuration?.basePath ?? basePath)) + + axiosArgs.url, }; -} + return axios.request(axiosRequestArgs); + }; +}; diff --git a/packages/api/client/axios/configuration.ts b/packages/api/client/axios/configuration.ts index 8b733e81..81871858 100644 --- a/packages/api/client/axios/configuration.ts +++ b/packages/api/client/axios/configuration.ts @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,109 +13,132 @@ interface AWSv4Configuration { options?: { - region?: string - service?: string - } + region?: string; + service?: string; + }; credentials?: { - accessKeyId?: string - secretAccessKey?: string, - sessionToken?: string - } + accessKeyId?: string; + secretAccessKey?: string; + sessionToken?: string; + }; } export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - awsv4?: AWSv4Configuration; - basePath?: string; - serverIndex?: number; - baseOptions?: any; - formDataCtor?: new () => any; + apiKey?: + | string + | Promise + | ((name: string) => string) + | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise); + awsv4?: AWSv4Configuration; + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; } export class Configuration { - /** - * parameter for apiKey security - * @param name security name - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - */ - username?: string; - /** - * parameter for basic security - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * parameter for aws4 signature security - * @param {Object} AWS4Signature - AWS4 Signature security - * @param {string} options.region - aws region - * @param {string} options.service - name of the service. - * @param {string} credentials.accessKeyId - aws access key id - * @param {string} credentials.secretAccessKey - aws access key - * @param {string} credentials.sessionToken - aws session token - * @memberof Configuration - */ - awsv4?: AWSv4Configuration; - /** - * override base path - */ - basePath?: string; - /** - * override server index - */ - serverIndex?: number; - /** - * base options for axios calls - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; + /** + * parameter for apiKey security + * @param name security name + */ + apiKey?: + | string + | Promise + | ((name: string) => string) + | ((name: string) => Promise); + /** + * parameter for basic security + */ + username?: string; + /** + * parameter for basic security + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + */ + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; + /** + * override base path + */ + basePath?: string; + /** + * override server index + */ + serverIndex?: number; + /** + * base options for axios calls + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.awsv4 = param.awsv4; - this.basePath = param.basePath; - this.serverIndex = param.serverIndex; - this.baseOptions = { - ...param.baseOptions, - headers: { - ...param.baseOptions?.headers, - }, - }; - this.formDataCtor = param.formDataCtor; - } + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = { + ...param.baseOptions, + headers: { + ...param.baseOptions?.headers, + }, + }; + this.formDataCtor = param.formDataCtor; + } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp( + "^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$", + "i", + ); + return ( + mime !== null && + (jsonMime.test(mime) || + mime.toLowerCase() === "application/json-patch+json") + ); + } } diff --git a/packages/api/client/axios/index.ts b/packages/api/client/axios/index.ts index 4a5a14db..99560f12 100644 --- a/packages/api/client/axios/index.ts +++ b/packages/api/client/axios/index.ts @@ -5,14 +5,12 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export * from "./api"; export * from "./configuration"; - diff --git a/packages/api/client/axios/package.json b/packages/api/client/axios/package.json index 447d3521..7ce779cc 100644 --- a/packages/api/client/axios/package.json +++ b/packages/api/client/axios/package.json @@ -1,30 +1,22 @@ { "name": "@iracing-data/api-client-axios", - "version": "0.0.1-alpha.0", - "description": "Axios-based TypeScript client for the iRacing /data API, generated from the OpenAPI spec.", + "version": "0.0.1", + "description": "OpenAPI client for @iracing-data/api-client-axios", "author": "OpenAPI-Generator Contributors", "repository": { "type": "git", - "url": "https://github.com/racedirector/iracing-data-api.git", - "directory": "packages/api/client/axios" + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" }, "keywords": [ "axios", "typescript", "openapi-client", "openapi-generator", - "iracing" + "@iracing-data/api-client-axios" ], "license": "Unlicense", "main": "./dist/index.js", "typings": "./dist/index.d.ts", - "files": [ - "dist", - "README.md" - ], - "publishConfig": { - "access": "public" - }, "scripts": { "build": "tsc", "prepare": "npm run build" @@ -36,4 +28,4 @@ "@types/node": "12.11.5 - 12.20.42", "typescript": "^4.0 || ^5.0" } -} \ No newline at end of file +} diff --git a/packages/api/client/fetch/package.json b/packages/api/client/fetch/package.json index cf3fd87e..00f7ae2d 100644 --- a/packages/api/client/fetch/package.json +++ b/packages/api/client/fetch/package.json @@ -1,23 +1,14 @@ { "name": "@iracing-data/api-client-fetch", - "version": "0.0.1-beta.0", - "description": "Fetch-based TypeScript client for the iRacing /data API, generated from the OpenAPI spec.", + "version": "0.0.1", + "description": "OpenAPI client for @iracing-data/api-client-fetch", "author": "OpenAPI-Generator", - "license": "ISC", "repository": { "type": "git", - "url": "https://github.com/racedirector/iracing-data-api.git", - "directory": "packages/api/client/fetch" + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" }, "main": "./dist/index.js", "types": "./dist/index.d.ts", - "files": [ - "dist", - "README.md" - ], - "publishConfig": { - "access": "public" - }, "scripts": { "build": "tsc", "prepare": "npm run build" diff --git a/packages/api/client/fetch/src/apis/AuthApi.ts b/packages/api/client/fetch/src/apis/AuthApi.ts index 38e76c36..10718b98 100644 --- a/packages/api/client/fetch/src/apis/AuthApi.ts +++ b/packages/api/client/fetch/src/apis/AuthApi.ts @@ -5,67 +5,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - PostAuthRequest, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { PostAuthRequest } from "../models/index"; import { - PostAuthRequestFromJSON, - PostAuthRequestToJSON, -} from '../models/index'; + PostAuthRequestFromJSON, + PostAuthRequestToJSON, +} from "../models/index"; export interface PostAuthOperationRequest { - post_auth_request?: PostAuthRequest; + post_auth_request?: PostAuthRequest; } /** - * + * */ export class AuthApi extends runtime.BaseAPI { + /** + */ + async postAuthRaw( + requestParameters: PostAuthOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; - /** - */ - async postAuthRaw(requestParameters: PostAuthOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; + headerParameters["Content-Type"] = "application/json"; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/auth`; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: PostAuthRequestToJSON(requestParameters['post_auth_request']), - }, initOverrides); + let urlPath = `/auth`; - return new runtime.VoidApiResponse(response); - } + const response = await this.request( + { + path: urlPath, + method: "POST", + headers: headerParameters, + query: queryParameters, + body: PostAuthRequestToJSON(requestParameters["post_auth_request"]), + }, + initOverrides, + ); - /** - */ - async postAuth(requestParameters: PostAuthOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.postAuthRaw(requestParameters, initOverrides); - } + return new runtime.VoidApiResponse(response); + } + /** + */ + async postAuth( + requestParameters: PostAuthOperationRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.postAuthRaw(requestParameters, initOverrides); + } } diff --git a/packages/api/client/fetch/src/apis/CarApi.ts b/packages/api/client/fetch/src/apis/CarApi.ts index fb9b42db..0c507398 100644 --- a/packages/api/client/fetch/src/apis/CarApi.ts +++ b/packages/api/client/fetch/src/apis/CarApi.ts @@ -5,101 +5,113 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; /** - * + * */ export class CarApi extends runtime.BaseAPI { - - /** - */ - async getCarRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/car/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getCar(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCarRaw(initOverrides); - return await response.value(); - } - - /** - * image paths are relative to https://images-static.iracing.com/ - */ - async getCarAssetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/car/assets`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + /** + */ + async getCarRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - * image paths are relative to https://images-static.iracing.com/ - */ - async getCarAssets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCarAssetsRaw(initOverrides); - return await response.value(); + let urlPath = `/data/car/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getCar( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getCarRaw(initOverrides); + return await response.value(); + } + + /** + * image paths are relative to https://images-static.iracing.com/ + */ + async getCarAssetsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/car/assets`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + * image paths are relative to https://images-static.iracing.com/ + */ + async getCarAssets( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getCarAssetsRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/CarclassApi.ts b/packages/api/client/fetch/src/apis/CarclassApi.ts index fe207fd8..7facdbaa 100644 --- a/packages/api/client/fetch/src/apis/CarclassApi.ts +++ b/packages/api/client/fetch/src/apis/CarclassApi.ts @@ -5,66 +5,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; /** - * + * */ export class CarclassApi extends runtime.BaseAPI { + /** + * Gets car classes. + */ + async getCarClassRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; - /** - * Gets car classes. - */ - async getCarClassRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/carclass/get`; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + let urlPath = `/data/carclass/get`; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); - /** - * Gets car classes. - */ - async getCarClass(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCarClassRaw(initOverrides); - return await response.value(); - } + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + /** + * Gets car classes. + */ + async getCarClass( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getCarClassRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/ConstantsApi.ts b/packages/api/client/fetch/src/apis/ConstantsApi.ts index 25450329..711fd237 100644 --- a/packages/api/client/fetch/src/apis/ConstantsApi.ts +++ b/packages/api/client/fetch/src/apis/ConstantsApi.ts @@ -5,140 +5,161 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; /** - * + * */ export class ConstantsApi extends runtime.BaseAPI { - - /** - * Constant; returned directly as an array of objects - */ - async getConstantsCategoriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/constants/categories`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - * Constant; returned directly as an array of objects - */ - async getConstantsCategories(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConstantsCategoriesRaw(initOverrides); - return await response.value(); - } - - /** - * Constant; returned directly as an array of objects - */ - async getConstantsDivisionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/constants/divisions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - * Constant; returned directly as an array of objects - */ - async getConstantsDivisions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConstantsDivisionsRaw(initOverrides); - return await response.value(); + /** + * Constant; returned directly as an array of objects + */ + async getConstantsCategoriesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - * Constant; returned directly as an array of objects - */ - async getConstantsEventTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/constants/event_types`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + let urlPath = `/data/constants/categories`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsCategories( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getConstantsCategoriesRaw(initOverrides); + return await response.value(); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsDivisionsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - * Constant; returned directly as an array of objects - */ - async getConstantsEventTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConstantsEventTypesRaw(initOverrides); - return await response.value(); + let urlPath = `/data/constants/divisions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsDivisions( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getConstantsDivisionsRaw(initOverrides); + return await response.value(); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsEventTypesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/constants/event_types`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + * Constant; returned directly as an array of objects + */ + async getConstantsEventTypes( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getConstantsEventTypesRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/DocApi.ts b/packages/api/client/fetch/src/apis/DocApi.ts index 79d31919..ab8d8ab4 100644 --- a/packages/api/client/fetch/src/apis/DocApi.ts +++ b/packages/api/client/fetch/src/apis/DocApi.ts @@ -5,2949 +5,3712 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, IracingCategory, IracingServiceMethodDocs, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingCategoryFromJSON, - IracingCategoryToJSON, - IracingServiceMethodDocsFromJSON, - IracingServiceMethodDocsToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingCategoryFromJSON, + IracingCategoryToJSON, + IracingServiceMethodDocsFromJSON, + IracingServiceMethodDocsToJSON, +} from "../models/index"; export interface GetDriverStatsByCategoryCategoryDocsRequest { - category: IracingCategory; + category: IracingCategory; } /** - * + * */ export class DocApi extends runtime.BaseAPI { - - /** - */ - async getCarAssetsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/car/assets`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getCarAssetsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCarAssetsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getCarClassDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/carclass`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getCarClassDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getCarClassDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getCarClassGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/carclass/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getCarClassGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCarClassGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getCarDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/car`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getCarDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getCarDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getCarGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/car/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getCarGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCarGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getConstantsCategoriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/constants/categories`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getConstantsCategoriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConstantsCategoriesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getConstantsDivisionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/constants/divisions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getConstantsDivisionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConstantsDivisionsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getConstantsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/constants`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getConstantsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getConstantsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getConstantsEventTypesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/constants/event_types`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getConstantsEventTypesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConstantsEventTypesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - */ - async getDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: IracingServiceMethodDocs; }; }> { - const response = await this.getDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getDriverStatsByCategoryCategoryDocsRaw(requestParameters: GetDriverStatsByCategoryCategoryDocsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['category'] == null) { - throw new runtime.RequiredError( - 'category', - 'Required parameter "category" was null or undefined when calling getDriverStatsByCategoryCategoryDocs().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/driver_stats_by_category/{category}`; - urlPath = urlPath.replace(`{${"category"}}`, encodeURIComponent(String(requestParameters['category']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getDriverStatsByCategoryCategoryDocs(requestParameters: GetDriverStatsByCategoryCategoryDocsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDriverStatsByCategoryCategoryDocsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async getDriverStatsByCategoryDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/driver_stats_by_category`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getDriverStatsByCategoryDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getDriverStatsByCategoryDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getHostedCombinedSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/hosted/combined_sessions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getHostedCombinedSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getHostedCombinedSessionsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getHostedDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/hosted`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getHostedDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getHostedDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getHostedSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/hosted/sessions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getHostedSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getHostedSessionsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueCustomerLeagueSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/cust_league_sessions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueCustomerLeagueSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueCustomerLeagueSessionsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueDirectoryDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/directory`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueDirectoryDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueDirectoryDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getLeagueDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getLeagueDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueGetPointsSystemsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/get_points_systems`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueGetPointsSystemsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueGetPointsSystemsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueMembershipDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/membership`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueMembershipDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueMembershipDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueRosterDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/roster`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueRosterDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueRosterDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueSeasonSessionsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/season_sessions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueSeasonSessionsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueSeasonSessionsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueSeasonStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/season_standings`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueSeasonStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueSeasonStandingsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLeagueSeasonsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/league/seasons`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLeagueSeasonsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueSeasonsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLookupCountriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/lookup/countries`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLookupCountriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupCountriesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLookupDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/lookup`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getLookupDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getLookupDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLookupDriversDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/lookup/drivers`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLookupDriversDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupDriversDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLookupFlairsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/lookup/flairs`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLookupFlairsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupFlairsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLookupGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/lookup/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLookupGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getLookupLicensesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/lookup/licenses`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getLookupLicensesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupLicensesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberAwardInstancesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member/award_instances`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getMemberAwardInstancesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberAwardInstancesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberAwardsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member/awards`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getMemberAwardsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberAwardsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberChartDataDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member/chart_data`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getMemberChartDataDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberChartDataDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getMemberDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getMemberDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getMemberGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberInfoDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member/info`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getMemberInfoDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberInfoDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberParticipationCreditsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member/participation_credits`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getMemberParticipationCreditsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberParticipationCreditsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getMemberProfileDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/member/profile`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getMemberProfileDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberProfileDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getResultsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsEventLogDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results/event_log`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getResultsEventLogDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsEventLogDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getResultsGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsLapChartDataDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results/lap_chart_data`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getResultsLapChartDataDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsLapChartDataDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsLapDataDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results/lap_data`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getResultsLapDataDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsLapDataDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsSearchHostedDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results/search_hosted`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getResultsSearchHostedDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsSearchHostedDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsSearchSeriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results/search_series`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getResultsSearchSeriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsSearchSeriesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getResultsSeasonResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/results/season_results`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getResultsSeasonResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsSeasonResultsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeasonDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/season`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getSeasonDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getSeasonDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeasonListDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/season/list`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeasonListDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonListDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeasonRaceGuideDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/season/race_guide`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeasonRaceGuideDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonRaceGuideDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeasonSpectatorSubsessionIdsDetailDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/season/spectator_subsessionids_detail`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeasonSpectatorSubsessionIdsDetailDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonSpectatorSubsessionIdsDetailDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeasonSpectatorSubsessionIdsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/season/spectator_subsessionids`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeasonSpectatorSubsessionIdsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonSpectatorSubsessionIdsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesAssetsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series/assets`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeriesAssetsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesAssetsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getSeriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getSeriesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeriesGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesPastSeasonsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series/past_seasons`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeriesPastSeasonsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesPastSeasonsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesSeasonListDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series/season_list`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeriesSeasonListDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesSeasonListDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesSeasonScheduleDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series/season_schedule`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeriesSeasonScheduleDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesSeasonScheduleDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesSeasonsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series/seasons`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeriesSeasonsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesSeasonsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getSeriesStatsSeriesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/series/stats_series`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getSeriesStatsSeriesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesStatsSeriesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getStatsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getStatsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsMemberBestsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/member_bests`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsMemberBestsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberBestsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsMemberCareerDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/member_career`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsMemberCareerDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberCareerDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsMemberDivisionDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/member_division`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsMemberDivisionDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberDivisionDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsMemberRecapDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/member_recap`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsMemberRecapDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberRecapDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsMemberRecentRacesDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/member_recent_races`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsMemberRecentRacesDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberRecentRacesDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsMemberSummaryDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/member_summary`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsMemberSummaryDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberSummaryDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsMemberYearlyDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/member_yearly`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsMemberYearlyDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberYearlyDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonDriverStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/season_driver_standings`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonDriverStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonDriverStandingsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonQualifyResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/season_qualify_results`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonQualifyResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonQualifyResultsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonSupersessionStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/season_supersession_standings`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonSupersessionStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonSupersessionStandingsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonTTResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/season_tt_results`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonTTResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonTTResultsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonTTStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/season_tt_standings`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonTTStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonTTStandingsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonTeamStandingsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/season_team_standings`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonTeamStandingsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonTeamStandingsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getStatsWorldRecordsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/stats/world_records`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getStatsWorldRecordsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsWorldRecordsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTeamDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/team`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getTeamDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getTeamDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTeamGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/team/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getTeamGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTeamGetDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTeamMembershipDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/team/membership`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getTeamMembershipDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTeamMembershipDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTimeAttackDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/time_attack`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getTimeAttackDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getTimeAttackDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTimeAttackMemberSeasonResultsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/time_attack/member_season_results`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getTimeAttackMemberSeasonResultsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTimeAttackMemberSeasonResultsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTrackAssetsDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/track/assets`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getTrackAssetsDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackAssetsDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTrackDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/track`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON)); - } - - /** - */ - async getTrackDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: IracingServiceMethodDocs; }> { - const response = await this.getTrackDocsRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTrackGetDocsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/doc/track/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingServiceMethodDocsFromJSON(jsonValue)); - } - - /** - */ - async getTrackGetDocs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackGetDocsRaw(initOverrides); - return await response.value(); - } - + /** + */ + async getCarAssetsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/car/assets`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getCarAssetsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getCarAssetsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarClassDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/carclass`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getCarClassDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getCarClassDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarClassGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/carclass/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getCarClassGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getCarClassGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/car`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getCarDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getCarDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getCarGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/car/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getCarGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getCarGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsCategoriesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants/categories`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getConstantsCategoriesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getConstantsCategoriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsDivisionsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants/divisions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getConstantsDivisionsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getConstantsDivisionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getConstantsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getConstantsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getConstantsEventTypesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/constants/event_types`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getConstantsEventTypesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getConstantsEventTypesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise< + runtime.ApiResponse<{ + [key: string]: { [key: string]: IracingServiceMethodDocs }; + }> + > { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response); + } + + /** + */ + async getDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: { [key: string]: IracingServiceMethodDocs } }> { + const response = await this.getDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getDriverStatsByCategoryCategoryDocsRaw( + requestParameters: GetDriverStatsByCategoryCategoryDocsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["category"] == null) { + throw new runtime.RequiredError( + "category", + 'Required parameter "category" was null or undefined when calling getDriverStatsByCategoryCategoryDocs().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/driver_stats_by_category/{category}`; + urlPath = urlPath.replace( + `{${"category"}}`, + encodeURIComponent(String(requestParameters["category"])), + ); + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getDriverStatsByCategoryCategoryDocs( + requestParameters: GetDriverStatsByCategoryCategoryDocsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getDriverStatsByCategoryCategoryDocsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getDriverStatsByCategoryDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/driver_stats_by_category`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getDriverStatsByCategoryDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getDriverStatsByCategoryDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getHostedCombinedSessionsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/hosted/combined_sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getHostedCombinedSessionsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getHostedCombinedSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getHostedDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/hosted`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getHostedDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getHostedDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getHostedSessionsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/hosted/sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getHostedSessionsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getHostedSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueCustomerLeagueSessionsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/cust_league_sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueCustomerLeagueSessionsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getLeagueCustomerLeagueSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueDirectoryDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/directory`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueDirectoryDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueDirectoryDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getLeagueDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getLeagueDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueGetPointsSystemsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/get_points_systems`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueGetPointsSystemsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueGetPointsSystemsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueMembershipDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/membership`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueMembershipDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueMembershipDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueRosterDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/roster`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueRosterDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueRosterDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonSessionsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/season_sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueSeasonSessionsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueSeasonSessionsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonStandingsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/season_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueSeasonStandingsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueSeasonStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueSeasonsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/league/seasons`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueSeasonsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueSeasonsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupCountriesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/countries`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupCountriesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupCountriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getLookupDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getLookupDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupDriversDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/drivers`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupDriversDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupDriversDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupFlairsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/flairs`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupFlairsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupFlairsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupLicensesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/lookup/licenses`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupLicensesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupLicensesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberAwardInstancesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/award_instances`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberAwardInstancesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberAwardInstancesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberAwardsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/awards`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberAwardsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberAwardsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberChartDataDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/chart_data`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberChartDataDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberChartDataDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getMemberDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getMemberDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberInfoDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/info`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberInfoDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberInfoDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberParticipationCreditsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/participation_credits`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberParticipationCreditsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getMemberParticipationCreditsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberProfileDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/member/profile`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberProfileDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberProfileDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getResultsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsEventLogDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/event_log`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsEventLogDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsEventLogDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsLapChartDataDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/lap_chart_data`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsLapChartDataDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsLapChartDataDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsLapDataDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/lap_data`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsLapDataDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsLapDataDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSearchHostedDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/search_hosted`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsSearchHostedDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsSearchHostedDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSearchSeriesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/search_series`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsSearchSeriesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsSearchSeriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getResultsSeasonResultsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/results/season_results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsSeasonResultsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsSeasonResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getSeasonDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getSeasonDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonListDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/list`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonListDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeasonListDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonRaceGuideDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/race_guide`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonRaceGuideDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeasonRaceGuideDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetailDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/spectator_subsessionids_detail`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetailDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getSeasonSpectatorSubsessionIdsDetailDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/season/spectator_subsessionids`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getSeasonSpectatorSubsessionIdsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesAssetsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/assets`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesAssetsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesAssetsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getSeriesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getSeriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesPastSeasonsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/past_seasons`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesPastSeasonsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesPastSeasonsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonListDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/season_list`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesSeasonListDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesSeasonListDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonScheduleDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/season_schedule`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesSeasonScheduleDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesSeasonScheduleDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesSeasonsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/seasons`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesSeasonsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesSeasonsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesStatsSeriesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/series/stats_series`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesStatsSeriesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesStatsSeriesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getStatsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getStatsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberBestsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_bests`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberBestsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberBestsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberCareerDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_career`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberCareerDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberCareerDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberDivisionDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_division`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberDivisionDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberDivisionDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberRecapDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_recap`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberRecapDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberRecapDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberRecentRacesDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_recent_races`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberRecentRacesDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberRecentRacesDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberSummaryDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_summary`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberSummaryDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberSummaryDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsMemberYearlyDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/member_yearly`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberYearlyDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberYearlyDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonDriverStandingsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_driver_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonDriverStandingsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getStatsSeasonDriverStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonQualifyResultsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_qualify_results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonQualifyResultsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getStatsSeasonQualifyResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonSupersessionStandingsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_supersession_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonSupersessionStandingsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getStatsSeasonSupersessionStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTTResultsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_tt_results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonTTResultsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonTTResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTTStandingsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_tt_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonTTStandingsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonTTStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsSeasonTeamStandingsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/season_team_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonTeamStandingsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getStatsSeasonTeamStandingsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getStatsWorldRecordsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/stats/world_records`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsWorldRecordsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsWorldRecordsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTeamDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/team`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getTeamDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getTeamDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTeamGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/team/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getTeamGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTeamGetDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTeamMembershipDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/team/membership`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getTeamMembershipDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTeamMembershipDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTimeAttackDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/time_attack`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getTimeAttackDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getTimeAttackDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTimeAttackMemberSeasonResultsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/time_attack/member_season_results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getTimeAttackMemberSeasonResultsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = + await this.getTimeAttackMemberSeasonResultsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackAssetsDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/track/assets`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getTrackAssetsDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTrackAssetsDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/track`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + runtime.mapValues(jsonValue, IracingServiceMethodDocsFromJSON), + ); + } + + /** + */ + async getTrackDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise<{ [key: string]: IracingServiceMethodDocs }> { + const response = await this.getTrackDocsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackGetDocsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/data/doc/track/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingServiceMethodDocsFromJSON(jsonValue), + ); + } + + /** + */ + async getTrackGetDocs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTrackGetDocsRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/DriverStatsApi.ts b/packages/api/client/fetch/src/apis/DriverStatsApi.ts index 78c9145e..1b8b2abf 100644 --- a/packages/api/client/fetch/src/apis/DriverStatsApi.ts +++ b/packages/api/client/fetch/src/apis/DriverStatsApi.ts @@ -5,79 +5,93 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, IracingAPIResponse, IracingCategory, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, - IracingCategoryFromJSON, - IracingCategoryToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingCategoryFromJSON, + IracingCategoryToJSON, +} from "../models/index"; export interface GetDriverStatsByCategoryRequest { - category: IracingCategory; + category: IracingCategory; } /** - * + * */ export class DriverStatsApi extends runtime.BaseAPI { + /** + */ + async getDriverStatsByCategoryRaw( + requestParameters: GetDriverStatsByCategoryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["category"] == null) { + throw new runtime.RequiredError( + "category", + 'Required parameter "category" was null or undefined when calling getDriverStatsByCategory().', + ); + } - /** - */ - async getDriverStatsByCategoryRaw(requestParameters: GetDriverStatsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['category'] == null) { - throw new runtime.RequiredError( - 'category', - 'Required parameter "category" was null or undefined when calling getDriverStatsByCategory().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const headerParameters: runtime.HTTPHeaders = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - let urlPath = `/data/driver_stats_by_category/{category}`; - urlPath = urlPath.replace(`{${"category"}}`, encodeURIComponent(String(requestParameters['category']))); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + let urlPath = `/data/driver_stats_by_category/{category}`; + urlPath = urlPath.replace( + `{${"category"}}`, + encodeURIComponent(String(requestParameters["category"])), + ); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); - /** - */ - async getDriverStatsByCategory(requestParameters: GetDriverStatsByCategoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDriverStatsByCategoryRaw(requestParameters, initOverrides); - return await response.value(); - } + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + /** + */ + async getDriverStatsByCategory( + requestParameters: GetDriverStatsByCategoryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getDriverStatsByCategoryRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/HostedApi.ts b/packages/api/client/fetch/src/apis/HostedApi.ts index 208cab2d..10d23c1f 100644 --- a/packages/api/client/fetch/src/apis/HostedApi.ts +++ b/packages/api/client/fetch/src/apis/HostedApi.ts @@ -5,111 +5,128 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; export interface GetHostedCombinedSessionsRequest { - package_id?: number; + package_id?: number; } /** - * + * */ export class HostedApi extends runtime.BaseAPI { - - /** - * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. - */ - async getHostedCombinedSessionsRaw(requestParameters: GetHostedCombinedSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['package_id'] != null) { - queryParameters['package_id'] = requestParameters['package_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/hosted/combined_sessions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. - */ - async getHostedCombinedSessions(requestParameters: GetHostedCombinedSessionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getHostedCombinedSessionsRaw(requestParameters, initOverrides); - return await response.value(); + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + */ + async getHostedCombinedSessionsRaw( + requestParameters: GetHostedCombinedSessionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["package_id"] != null) { + queryParameters["package_id"] = requestParameters["package_id"]; } - /** - * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. - */ - async getHostedSessionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/hosted/sessions`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. - */ - async getHostedSessions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getHostedSessionsRaw(initOverrides); - return await response.value(); + let urlPath = `/data/hosted/combined_sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + * Sessions that can be joined as a driver or spectator, and also includes non-league pending sessions for the user. + */ + async getHostedCombinedSessions( + requestParameters: GetHostedCombinedSessionsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getHostedCombinedSessionsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + */ + async getHostedSessionsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/hosted/sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + * Sessions that can be joined as a driver. Without spectator and non-league pending sessions for the user. + */ + async getHostedSessions( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getHostedSessionsRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/LeagueApi.ts b/packages/api/client/fetch/src/apis/LeagueApi.ts index 3d970a67..a46e93b8 100644 --- a/packages/api/client/fetch/src/apis/LeagueApi.ts +++ b/packages/api/client/fetch/src/apis/LeagueApi.ts @@ -5,582 +5,707 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; export interface GetLeagueRequest { - league_id: number; - include_licenses?: boolean; + league_id: number; + include_licenses?: boolean; } export interface GetLeagueCustomerLeagueSessionsRequest { - mine?: boolean; - package_id?: number; + mine?: boolean; + package_id?: number; } export interface GetLeagueDirectoryRequest { - search?: string; - tag?: string; - restrict_to_member?: boolean; - restrict_to_recruiting?: boolean; - restrict_to_friends?: boolean; - restrict_to_watched?: boolean; - minimum_roster_count?: number; - maximum_roster_count?: number; - lowerbound?: number; - upperbound?: number; - sort?: string; - order?: string; + search?: string; + tag?: string; + restrict_to_member?: boolean; + restrict_to_recruiting?: boolean; + restrict_to_friends?: boolean; + restrict_to_watched?: boolean; + minimum_roster_count?: number; + maximum_roster_count?: number; + lowerbound?: number; + upperbound?: number; + sort?: string; + order?: string; } export interface GetLeagueMembershipRequest { - cust_id?: number; - include_league?: boolean; + cust_id?: number; + include_league?: boolean; } export interface GetLeaguePointsSystemsRequest { - league_id: number; - season_id?: number; + league_id: number; + season_id?: number; } export interface GetLeagueRosterRequest { - league_id: number; - include_licenses?: boolean; + league_id: number; + include_licenses?: boolean; } export interface GetLeagueSeasonSessionsRequest { - league_id: number; - season_id: number; - results_only?: boolean; + league_id: number; + season_id: number; + results_only?: boolean; } export interface GetLeagueSeasonStandingsRequest { - league_id: number; - season_id: number; - car_class_id?: number; - car_id?: number; + league_id: number; + season_id: number; + car_class_id?: number; + car_id?: number; } export interface GetLeagueSeasonsRequest { - league_id: number; - retired?: boolean; + league_id: number; + retired?: boolean; } /** - * + * */ export class LeagueApi extends runtime.BaseAPI { + /** + */ + async getLeagueRaw( + requestParameters: GetLeagueRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["league_id"] == null) { + throw new runtime.RequiredError( + "league_id", + 'Required parameter "league_id" was null or undefined when calling getLeague().', + ); + } - /** - */ - async getLeagueRaw(requestParameters: GetLeagueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['league_id'] == null) { - throw new runtime.RequiredError( - 'league_id', - 'Required parameter "league_id" was null or undefined when calling getLeague().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } - - if (requestParameters['include_licenses'] != null) { - queryParameters['include_licenses'] = requestParameters['include_licenses']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/league/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; } - /** - */ - async getLeague(requestParameters: GetLeagueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["include_licenses"] != null) { + queryParameters["include_licenses"] = + requestParameters["include_licenses"]; } - /** - */ - async getLeagueCustomerLeagueSessionsRaw(requestParameters: GetLeagueCustomerLeagueSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['mine'] != null) { - queryParameters['mine'] = requestParameters['mine']; - } - - if (requestParameters['package_id'] != null) { - queryParameters['package_id'] = requestParameters['package_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/league/cust_league_sessions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLeagueCustomerLeagueSessions(requestParameters: GetLeagueCustomerLeagueSessionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueCustomerLeagueSessionsRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/league/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeague( + requestParameters: GetLeagueRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getLeagueCustomerLeagueSessionsRaw( + requestParameters: GetLeagueCustomerLeagueSessionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["mine"] != null) { + queryParameters["mine"] = requestParameters["mine"]; } - /** - */ - async getLeagueDirectoryRaw(requestParameters: GetLeagueDirectoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['search'] != null) { - queryParameters['search'] = requestParameters['search']; - } - - if (requestParameters['tag'] != null) { - queryParameters['tag'] = requestParameters['tag']; - } - - if (requestParameters['restrict_to_member'] != null) { - queryParameters['restrict_to_member'] = requestParameters['restrict_to_member']; - } - - if (requestParameters['restrict_to_recruiting'] != null) { - queryParameters['restrict_to_recruiting'] = requestParameters['restrict_to_recruiting']; - } - - if (requestParameters['restrict_to_friends'] != null) { - queryParameters['restrict_to_friends'] = requestParameters['restrict_to_friends']; - } - - if (requestParameters['restrict_to_watched'] != null) { - queryParameters['restrict_to_watched'] = requestParameters['restrict_to_watched']; - } - - if (requestParameters['minimum_roster_count'] != null) { - queryParameters['minimum_roster_count'] = requestParameters['minimum_roster_count']; - } - - if (requestParameters['maximum_roster_count'] != null) { - queryParameters['maximum_roster_count'] = requestParameters['maximum_roster_count']; - } - - if (requestParameters['lowerbound'] != null) { - queryParameters['lowerbound'] = requestParameters['lowerbound']; - } - - if (requestParameters['upperbound'] != null) { - queryParameters['upperbound'] = requestParameters['upperbound']; - } - - if (requestParameters['sort'] != null) { - queryParameters['sort'] = requestParameters['sort']; - } - - if (requestParameters['order'] != null) { - queryParameters['order'] = requestParameters['order']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["package_id"] != null) { + queryParameters["package_id"] = requestParameters["package_id"]; + } - let urlPath = `/data/league/directory`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLeagueDirectory(requestParameters: GetLeagueDirectoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueDirectoryRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/league/cust_league_sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueCustomerLeagueSessions( + requestParameters: GetLeagueCustomerLeagueSessionsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueCustomerLeagueSessionsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLeagueDirectoryRaw( + requestParameters: GetLeagueDirectoryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["search"] != null) { + queryParameters["search"] = requestParameters["search"]; } - /** - */ - async getLeagueMembershipRaw(requestParameters: GetLeagueMembershipRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } - - if (requestParameters['include_league'] != null) { - queryParameters['include_league'] = requestParameters['include_league']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/league/membership`; + if (requestParameters["tag"] != null) { + queryParameters["tag"] = requestParameters["tag"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["restrict_to_member"] != null) { + queryParameters["restrict_to_member"] = + requestParameters["restrict_to_member"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["restrict_to_recruiting"] != null) { + queryParameters["restrict_to_recruiting"] = + requestParameters["restrict_to_recruiting"]; } - /** - */ - async getLeagueMembership(requestParameters: GetLeagueMembershipRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueMembershipRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["restrict_to_friends"] != null) { + queryParameters["restrict_to_friends"] = + requestParameters["restrict_to_friends"]; } - /** - */ - async getLeaguePointsSystemsRaw(requestParameters: GetLeaguePointsSystemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['league_id'] == null) { - throw new runtime.RequiredError( - 'league_id', - 'Required parameter "league_id" was null or undefined when calling getLeaguePointsSystems().' - ); - } + if (requestParameters["restrict_to_watched"] != null) { + queryParameters["restrict_to_watched"] = + requestParameters["restrict_to_watched"]; + } - const queryParameters: any = {}; + if (requestParameters["minimum_roster_count"] != null) { + queryParameters["minimum_roster_count"] = + requestParameters["minimum_roster_count"]; + } - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } + if (requestParameters["maximum_roster_count"] != null) { + queryParameters["maximum_roster_count"] = + requestParameters["maximum_roster_count"]; + } - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } + if (requestParameters["lowerbound"] != null) { + queryParameters["lowerbound"] = requestParameters["lowerbound"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["upperbound"] != null) { + queryParameters["upperbound"] = requestParameters["upperbound"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["sort"] != null) { + queryParameters["sort"] = requestParameters["sort"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["order"] != null) { + queryParameters["order"] = requestParameters["order"]; + } - let urlPath = `/data/league/get_points_systems`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLeaguePointsSystems(requestParameters: GetLeaguePointsSystemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeaguePointsSystemsRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/league/directory`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueDirectory( + requestParameters: GetLeagueDirectoryRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueDirectoryRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLeagueMembershipRaw( + requestParameters: GetLeagueMembershipRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; } - /** - */ - async getLeagueRosterRaw(requestParameters: GetLeagueRosterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['league_id'] == null) { - throw new runtime.RequiredError( - 'league_id', - 'Required parameter "league_id" was null or undefined when calling getLeagueRoster().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } - - if (requestParameters['include_licenses'] != null) { - queryParameters['include_licenses'] = requestParameters['include_licenses']; - } + if (requestParameters["include_league"] != null) { + queryParameters["include_league"] = requestParameters["include_league"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - let urlPath = `/data/league/roster`; + let urlPath = `/data/league/membership`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueMembership( + requestParameters: GetLeagueMembershipRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueMembershipRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLeaguePointsSystemsRaw( + requestParameters: GetLeaguePointsSystemsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["league_id"] == null) { + throw new runtime.RequiredError( + "league_id", + 'Required parameter "league_id" was null or undefined when calling getLeaguePointsSystems().', + ); + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; } - /** - */ - async getLeagueRoster(requestParameters: GetLeagueRosterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueRosterRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; } - /** - */ - async getLeagueSeasonSessionsRaw(requestParameters: GetLeagueSeasonSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['league_id'] == null) { - throw new runtime.RequiredError( - 'league_id', - 'Required parameter "league_id" was null or undefined when calling getLeagueSeasonSessions().' - ); - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getLeagueSeasonSessions().' - ); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const queryParameters: any = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } + let urlPath = `/data/league/get_points_systems`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeaguePointsSystems( + requestParameters: GetLeaguePointsSystemsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeaguePointsSystemsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLeagueRosterRaw( + requestParameters: GetLeagueRosterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["league_id"] == null) { + throw new runtime.RequiredError( + "league_id", + 'Required parameter "league_id" was null or undefined when calling getLeagueRoster().', + ); + } - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } + const queryParameters: any = {}; - if (requestParameters['results_only'] != null) { - queryParameters['results_only'] = requestParameters['results_only']; - } + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["include_licenses"] != null) { + queryParameters["include_licenses"] = + requestParameters["include_licenses"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const headerParameters: runtime.HTTPHeaders = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - let urlPath = `/data/league/season_sessions`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLeagueSeasonSessions(requestParameters: GetLeagueSeasonSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueSeasonSessionsRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/league/roster`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueRoster( + requestParameters: GetLeagueRosterRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueRosterRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLeagueSeasonSessionsRaw( + requestParameters: GetLeagueSeasonSessionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["league_id"] == null) { + throw new runtime.RequiredError( + "league_id", + 'Required parameter "league_id" was null or undefined when calling getLeagueSeasonSessions().', + ); } - /** - */ - async getLeagueSeasonStandingsRaw(requestParameters: GetLeagueSeasonStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['league_id'] == null) { - throw new runtime.RequiredError( - 'league_id', - 'Required parameter "league_id" was null or undefined when calling getLeagueSeasonStandings().' - ); - } + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getLeagueSeasonSessions().', + ); + } - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getLeagueSeasonStandings().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; + } - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } + if (requestParameters["results_only"] != null) { + queryParameters["results_only"] = requestParameters["results_only"]; + } - if (requestParameters['car_class_id'] != null) { - queryParameters['car_class_id'] = requestParameters['car_class_id']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['car_id'] != null) { - queryParameters['car_id'] = requestParameters['car_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + let urlPath = `/data/league/season_sessions`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueSeasonSessions( + requestParameters: GetLeagueSeasonSessionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueSeasonSessionsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLeagueSeasonStandingsRaw( + requestParameters: GetLeagueSeasonStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["league_id"] == null) { + throw new runtime.RequiredError( + "league_id", + 'Required parameter "league_id" was null or undefined when calling getLeagueSeasonStandings().', + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getLeagueSeasonStandings().', + ); + } - let urlPath = `/data/league/season_standings`; + const queryParameters: any = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; } - /** - */ - async getLeagueSeasonStandings(requestParameters: GetLeagueSeasonStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueSeasonStandingsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["car_class_id"] != null) { + queryParameters["car_class_id"] = requestParameters["car_class_id"]; } - /** - */ - async getLeagueSeasonsRaw(requestParameters: GetLeagueSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['league_id'] == null) { - throw new runtime.RequiredError( - 'league_id', - 'Required parameter "league_id" was null or undefined when calling getLeagueSeasons().' - ); - } + if (requestParameters["car_id"] != null) { + queryParameters["car_id"] = requestParameters["car_id"]; + } - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (requestParameters['retired'] != null) { - queryParameters['retired'] = requestParameters['retired']; - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const headerParameters: runtime.HTTPHeaders = {}; + let urlPath = `/data/league/season_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueSeasonStandings( + requestParameters: GetLeagueSeasonStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueSeasonStandingsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLeagueSeasonsRaw( + requestParameters: GetLeagueSeasonsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["league_id"] == null) { + throw new runtime.RequiredError( + "league_id", + 'Required parameter "league_id" was null or undefined when calling getLeagueSeasons().', + ); + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const queryParameters: any = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; + } - let urlPath = `/data/league/seasons`; + if (requestParameters["retired"] != null) { + queryParameters["retired"] = requestParameters["retired"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - /** - */ - async getLeagueSeasons(requestParameters: GetLeagueSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLeagueSeasonsRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/league/seasons`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLeagueSeasons( + requestParameters: GetLeagueSeasonsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLeagueSeasonsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/LookupApi.ts b/packages/api/client/fetch/src/apis/LookupApi.ts index 274e660d..53f0b7ea 100644 --- a/packages/api/client/fetch/src/apis/LookupApi.ts +++ b/packages/api/client/fetch/src/apis/LookupApi.ts @@ -5,224 +5,268 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; export interface GetLookupDriversRequest { - search_term: string; - league_id?: number; + search_term: string; + league_id?: number; } /** - * + * */ export class LookupApi extends runtime.BaseAPI { - - /** - */ - async getLookupRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/lookup/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + /** + */ + async getLookupRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLookup(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupRaw(initOverrides); - return await response.value(); + let urlPath = `/data/lookup/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLookup( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupCountriesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLookupCountriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/lookup/countries`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getLookupCountries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupCountriesRaw(initOverrides); - return await response.value(); + let urlPath = `/data/lookup/countries`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupCountries( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupCountriesRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupDriversRaw( + requestParameters: GetLookupDriversRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["search_term"] == null) { + throw new runtime.RequiredError( + "search_term", + 'Required parameter "search_term" was null or undefined when calling getLookupDrivers().', + ); } - /** - */ - async getLookupDriversRaw(requestParameters: GetLookupDriversRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['search_term'] == null) { - throw new runtime.RequiredError( - 'search_term', - 'Required parameter "search_term" was null or undefined when calling getLookupDrivers().' - ); - } - - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['search_term'] != null) { - queryParameters['search_term'] = requestParameters['search_term']; - } - - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/lookup/drivers`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["search_term"] != null) { + queryParameters["search_term"] = requestParameters["search_term"]; } - /** - */ - async getLookupDrivers(requestParameters: GetLookupDriversRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupDriversRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; } - /** - */ - async getLookupFlairsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const headerParameters: runtime.HTTPHeaders = {}; - let urlPath = `/data/lookup/flairs`; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getLookupFlairs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupFlairsRaw(initOverrides); - return await response.value(); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLookupLicensesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/lookup/licenses`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + let urlPath = `/data/lookup/drivers`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupDrivers( + requestParameters: GetLookupDriversRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupDriversRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getLookupFlairsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getLookupLicenses(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLookupLicensesRaw(initOverrides); - return await response.value(); + let urlPath = `/data/lookup/flairs`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupFlairs( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupFlairsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getLookupLicensesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/lookup/licenses`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getLookupLicenses( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getLookupLicensesRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/MemberApi.ts b/packages/api/client/fetch/src/apis/MemberApi.ts index c95f8056..47bc6e93 100644 --- a/packages/api/client/fetch/src/apis/MemberApi.ts +++ b/packages/api/client/fetch/src/apis/MemberApi.ts @@ -5,364 +5,444 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; export interface GetMemberRequest { - cust_ids: string; - include_licenses?: boolean; + cust_ids: string; + include_licenses?: boolean; } export interface GetMemberAwardInstancesRequest { - award_id: number; - cust_id?: number; + award_id: number; + cust_id?: number; } export interface GetMemberAwardsRequest { - cust_id?: number; + cust_id?: number; } export interface GetMemberChartDataRequest { - category_id: number; - chart_type: number; - cust_id?: number; + category_id: number; + chart_type: number; + cust_id?: number; } export interface GetMemberProfileRequest { - cust_id?: number; + cust_id?: number; } /** - * + * */ export class MemberApi extends runtime.BaseAPI { + /** + */ + async getMemberRaw( + requestParameters: GetMemberRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["cust_ids"] == null) { + throw new runtime.RequiredError( + "cust_ids", + 'Required parameter "cust_ids" was null or undefined when calling getMember().', + ); + } - /** - */ - async getMemberRaw(requestParameters: GetMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['cust_ids'] == null) { - throw new runtime.RequiredError( - 'cust_ids', - 'Required parameter "cust_ids" was null or undefined when calling getMember().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cust_ids'] != null) { - queryParameters['cust_ids'] = requestParameters['cust_ids']; - } - - if (requestParameters['include_licenses'] != null) { - queryParameters['include_licenses'] = requestParameters['include_licenses']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/member/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["cust_ids"] != null) { + queryParameters["cust_ids"] = requestParameters["cust_ids"]; } - /** - */ - async getMember(requestParameters: GetMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["include_licenses"] != null) { + queryParameters["include_licenses"] = + requestParameters["include_licenses"]; } - /** - */ - async getMemberAwardInstancesRaw(requestParameters: GetMemberAwardInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['award_id'] == null) { - throw new runtime.RequiredError( - 'award_id', - 'Required parameter "award_id" was null or undefined when calling getMemberAwardInstances().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } - - if (requestParameters['award_id'] != null) { - queryParameters['award_id'] = requestParameters['award_id']; - } + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - let urlPath = `/data/member/award_instances`; + let urlPath = `/data/member/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getMember( + requestParameters: GetMemberRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getMemberAwardInstancesRaw( + requestParameters: GetMemberAwardInstancesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["award_id"] == null) { + throw new runtime.RequiredError( + "award_id", + 'Required parameter "award_id" was null or undefined when calling getMemberAwardInstances().', + ); + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; } - /** - */ - async getMemberAwardInstances(requestParameters: GetMemberAwardInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberAwardInstancesRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["award_id"] != null) { + queryParameters["award_id"] = requestParameters["award_id"]; } - /** - */ - async getMemberAwardsRaw(requestParameters: GetMemberAwardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - let urlPath = `/data/member/awards`; + let urlPath = `/data/member/award_instances`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberAwardInstances( + requestParameters: GetMemberAwardInstancesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberAwardInstancesRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getMemberAwardsRaw( + requestParameters: GetMemberAwardsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - /** - */ - async getMemberAwards(requestParameters: GetMemberAwardsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberAwardsRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getMemberChartDataRaw(requestParameters: GetMemberChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['category_id'] == null) { - throw new runtime.RequiredError( - 'category_id', - 'Required parameter "category_id" was null or undefined when calling getMemberChartData().' - ); - } - - if (requestParameters['chart_type'] == null) { - throw new runtime.RequiredError( - 'chart_type', - 'Required parameter "chart_type" was null or undefined when calling getMemberChartData().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } - - if (requestParameters['category_id'] != null) { - queryParameters['category_id'] = requestParameters['category_id']; - } - - if (requestParameters['chart_type'] != null) { - queryParameters['chart_type'] = requestParameters['chart_type']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/member/chart_data`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + let urlPath = `/data/member/awards`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberAwards( + requestParameters: GetMemberAwardsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberAwardsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getMemberChartDataRaw( + requestParameters: GetMemberChartDataRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["category_id"] == null) { + throw new runtime.RequiredError( + "category_id", + 'Required parameter "category_id" was null or undefined when calling getMemberChartData().', + ); } - /** - */ - async getMemberChartData(requestParameters: GetMemberChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberChartDataRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["chart_type"] == null) { + throw new runtime.RequiredError( + "chart_type", + 'Required parameter "chart_type" was null or undefined when calling getMemberChartData().', + ); } - /** - */ - async getMemberInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const queryParameters: any = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/member/info`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; } - /** - */ - async getMemberInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberInfoRaw(initOverrides); - return await response.value(); + if (requestParameters["category_id"] != null) { + queryParameters["category_id"] = requestParameters["category_id"]; } - /** - */ - async getMemberParticipationCreditsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["chart_type"] != null) { + queryParameters["chart_type"] = requestParameters["chart_type"]; + } - let urlPath = `/data/member/participation_credits`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getMemberParticipationCredits(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberParticipationCreditsRaw(initOverrides); - return await response.value(); + let urlPath = `/data/member/chart_data`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberChartData( + requestParameters: GetMemberChartDataRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberChartDataRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getMemberInfoRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - * Gets a requested user\'s profile. - */ - async getMemberProfileRaw(requestParameters: GetMemberProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + let urlPath = `/data/member/info`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberInfo( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberInfoRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getMemberParticipationCreditsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - let urlPath = `/data/member/profile`; + let urlPath = `/data/member/participation_credits`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getMemberParticipationCredits( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberParticipationCreditsRaw(initOverrides); + return await response.value(); + } + + /** + * Gets a requested user\'s profile. + */ + async getMemberProfileRaw( + requestParameters: GetMemberProfileRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - /** - * Gets a requested user\'s profile. - */ - async getMemberProfile(requestParameters: GetMemberProfileRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getMemberProfileRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/member/profile`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + * Gets a requested user\'s profile. + */ + async getMemberProfile( + requestParameters: GetMemberProfileRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getMemberProfileRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/ResultsApi.ts b/packages/api/client/fetch/src/apis/ResultsApi.ts index 546e446a..03d3988c 100644 --- a/packages/api/client/fetch/src/apis/ResultsApi.ts +++ b/packages/api/client/fetch/src/apis/ResultsApi.ts @@ -5,549 +5,652 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, IracingAPIResponse, IracingEventType, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, - IracingEventTypeFromJSON, - IracingEventTypeToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingEventTypeFromJSON, + IracingEventTypeToJSON, +} from "../models/index"; export interface GetResultsRequest { - subsession_id: number; - include_licenses?: boolean; + subsession_id: number; + include_licenses?: boolean; } export interface GetResultsEventLogRequest { - subsession_id: number; - simsession_number: number; + subsession_id: number; + simsession_number: number; } export interface GetResultsLapChartDataRequest { - subsession_id: number; - simsession_number: number; + subsession_id: number; + simsession_number: number; } export interface GetResultsLapDataRequest { - subsession_id: number; - simsession_number: number; - cust_id?: number; - team_id?: number; + subsession_id: number; + simsession_number: number; + cust_id?: number; + team_id?: number; } export interface GetResultsSearchHostedRequest { - start_range_begin?: Date; - start_range_end?: Date; - finish_range_begin?: Date; - finish_range_end?: Date; - cust_id?: number; - team_id?: number; - host_cust_id?: number; - session_name?: string; - league_id?: number; - league_season_id?: number; - car_id?: number; - track_id?: number; - category_ids?: string; + start_range_begin?: Date; + start_range_end?: Date; + finish_range_begin?: Date; + finish_range_end?: Date; + cust_id?: number; + team_id?: number; + host_cust_id?: number; + session_name?: string; + league_id?: number; + league_season_id?: number; + car_id?: number; + track_id?: number; + category_ids?: string; } export interface GetResultsSearchSeriesRequest { - season_year?: number; - season_quarter?: number; - start_range_begin?: Date; - start_range_end?: Date; - finish_range_begin?: Date; - finish_range_end?: Date; - cust_id?: number; - team_id?: number; - series_id?: number; - race_week_num?: number; - official_only?: boolean; - event_types?: string; - category_ids?: string; + season_year?: number; + season_quarter?: number; + start_range_begin?: Date; + start_range_end?: Date; + finish_range_begin?: Date; + finish_range_end?: Date; + cust_id?: number; + team_id?: number; + series_id?: number; + race_week_num?: number; + official_only?: boolean; + event_types?: string; + category_ids?: string; } export interface GetResultsSeasonResultsRequest { - season_id: number; - event_type?: IracingEventType; - race_week_num?: number; + season_id: number; + event_type?: IracingEventType; + race_week_num?: number; } /** - * + * */ export class ResultsApi extends runtime.BaseAPI { - - /** - */ - async getResultsRaw(requestParameters: GetResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subsession_id'] == null) { - throw new runtime.RequiredError( - 'subsession_id', - 'Required parameter "subsession_id" was null or undefined when calling getResults().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['subsession_id'] != null) { - queryParameters['subsession_id'] = requestParameters['subsession_id']; - } - - if (requestParameters['include_licenses'] != null) { - queryParameters['include_licenses'] = requestParameters['include_licenses']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/results/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + /** + */ + async getResultsRaw( + requestParameters: GetResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subsession_id"] == null) { + throw new runtime.RequiredError( + "subsession_id", + 'Required parameter "subsession_id" was null or undefined when calling getResults().', + ); } - /** - */ - async getResults(requestParameters: GetResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async getResultsEventLogRaw(requestParameters: GetResultsEventLogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subsession_id'] == null) { - throw new runtime.RequiredError( - 'subsession_id', - 'Required parameter "subsession_id" was null or undefined when calling getResultsEventLog().' - ); - } - - if (requestParameters['simsession_number'] == null) { - throw new runtime.RequiredError( - 'simsession_number', - 'Required parameter "simsession_number" was null or undefined when calling getResultsEventLog().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; - - if (requestParameters['subsession_id'] != null) { - queryParameters['subsession_id'] = requestParameters['subsession_id']; - } - - if (requestParameters['simsession_number'] != null) { - queryParameters['simsession_number'] = requestParameters['simsession_number']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/results/event_log`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getResultsEventLog(requestParameters: GetResultsEventLogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsEventLogRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["subsession_id"] != null) { + queryParameters["subsession_id"] = requestParameters["subsession_id"]; } - /** - */ - async getResultsLapChartDataRaw(requestParameters: GetResultsLapChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subsession_id'] == null) { - throw new runtime.RequiredError( - 'subsession_id', - 'Required parameter "subsession_id" was null or undefined when calling getResultsLapChartData().' - ); - } - - if (requestParameters['simsession_number'] == null) { - throw new runtime.RequiredError( - 'simsession_number', - 'Required parameter "simsession_number" was null or undefined when calling getResultsLapChartData().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['subsession_id'] != null) { - queryParameters['subsession_id'] = requestParameters['subsession_id']; - } - - if (requestParameters['simsession_number'] != null) { - queryParameters['simsession_number'] = requestParameters['simsession_number']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["include_licenses"] != null) { + queryParameters["include_licenses"] = + requestParameters["include_licenses"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/results/lap_chart_data`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getResultsLapChartData(requestParameters: GetResultsLapChartDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsLapChartDataRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/results/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getResults( + requestParameters: GetResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getResultsEventLogRaw( + requestParameters: GetResultsEventLogRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subsession_id"] == null) { + throw new runtime.RequiredError( + "subsession_id", + 'Required parameter "subsession_id" was null or undefined when calling getResultsEventLog().', + ); } - /** - */ - async getResultsLapDataRaw(requestParameters: GetResultsLapDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['subsession_id'] == null) { - throw new runtime.RequiredError( - 'subsession_id', - 'Required parameter "subsession_id" was null or undefined when calling getResultsLapData().' - ); - } - - if (requestParameters['simsession_number'] == null) { - throw new runtime.RequiredError( - 'simsession_number', - 'Required parameter "simsession_number" was null or undefined when calling getResultsLapData().' - ); - } - - const queryParameters: any = {}; + if (requestParameters["simsession_number"] == null) { + throw new runtime.RequiredError( + "simsession_number", + 'Required parameter "simsession_number" was null or undefined when calling getResultsEventLog().', + ); + } - if (requestParameters['subsession_id'] != null) { - queryParameters['subsession_id'] = requestParameters['subsession_id']; - } + const queryParameters: any = {}; - if (requestParameters['simsession_number'] != null) { - queryParameters['simsession_number'] = requestParameters['simsession_number']; - } + if (requestParameters["subsession_id"] != null) { + queryParameters["subsession_id"] = requestParameters["subsession_id"]; + } - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + if (requestParameters["simsession_number"] != null) { + queryParameters["simsession_number"] = + requestParameters["simsession_number"]; + } - if (requestParameters['team_id'] != null) { - queryParameters['team_id'] = requestParameters['team_id']; - } + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + let urlPath = `/data/results/event_log`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsEventLog( + requestParameters: GetResultsEventLogRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsEventLogRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getResultsLapChartDataRaw( + requestParameters: GetResultsLapChartDataRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subsession_id"] == null) { + throw new runtime.RequiredError( + "subsession_id", + 'Required parameter "subsession_id" was null or undefined when calling getResultsLapChartData().', + ); + } - let urlPath = `/data/results/lap_data`; + if (requestParameters["simsession_number"] == null) { + throw new runtime.RequiredError( + "simsession_number", + 'Required parameter "simsession_number" was null or undefined when calling getResultsLapChartData().', + ); + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["subsession_id"] != null) { + queryParameters["subsession_id"] = requestParameters["subsession_id"]; } - /** - */ - async getResultsLapData(requestParameters: GetResultsLapDataRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsLapDataRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["simsession_number"] != null) { + queryParameters["simsession_number"] = + requestParameters["simsession_number"]; } - /** - */ - async getResultsSearchHostedRaw(requestParameters: GetResultsSearchHostedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['start_range_begin'] != null) { - queryParameters['start_range_begin'] = requestParameters['start_range_begin']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['start_range_end'] != null) { - queryParameters['start_range_end'] = requestParameters['start_range_end']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (requestParameters['finish_range_begin'] != null) { - queryParameters['finish_range_begin'] = requestParameters['finish_range_begin']; - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (requestParameters['finish_range_end'] != null) { - queryParameters['finish_range_end'] = requestParameters['finish_range_end']; - } + let urlPath = `/data/results/lap_chart_data`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsLapChartData( + requestParameters: GetResultsLapChartDataRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsLapChartDataRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getResultsLapDataRaw( + requestParameters: GetResultsLapDataRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["subsession_id"] == null) { + throw new runtime.RequiredError( + "subsession_id", + 'Required parameter "subsession_id" was null or undefined when calling getResultsLapData().', + ); + } - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + if (requestParameters["simsession_number"] == null) { + throw new runtime.RequiredError( + "simsession_number", + 'Required parameter "simsession_number" was null or undefined when calling getResultsLapData().', + ); + } - if (requestParameters['team_id'] != null) { - queryParameters['team_id'] = requestParameters['team_id']; - } + const queryParameters: any = {}; - if (requestParameters['host_cust_id'] != null) { - queryParameters['host_cust_id'] = requestParameters['host_cust_id']; - } + if (requestParameters["subsession_id"] != null) { + queryParameters["subsession_id"] = requestParameters["subsession_id"]; + } - if (requestParameters['session_name'] != null) { - queryParameters['session_name'] = requestParameters['session_name']; - } + if (requestParameters["simsession_number"] != null) { + queryParameters["simsession_number"] = + requestParameters["simsession_number"]; + } - if (requestParameters['league_id'] != null) { - queryParameters['league_id'] = requestParameters['league_id']; - } + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - if (requestParameters['league_season_id'] != null) { - queryParameters['league_season_id'] = requestParameters['league_season_id']; - } + if (requestParameters["team_id"] != null) { + queryParameters["team_id"] = requestParameters["team_id"]; + } - if (requestParameters['car_id'] != null) { - queryParameters['car_id'] = requestParameters['car_id']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['track_id'] != null) { - queryParameters['track_id'] = requestParameters['track_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (requestParameters['category_ids'] != null) { - queryParameters['category_ids'] = requestParameters['category_ids']; - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const headerParameters: runtime.HTTPHeaders = {}; + let urlPath = `/data/results/lap_data`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsLapData( + requestParameters: GetResultsLapDataRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsLapDataRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getResultsSearchHostedRaw( + requestParameters: GetResultsSearchHostedRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["start_range_begin"] != null) { + queryParameters["start_range_begin"] = + requestParameters["start_range_begin"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["start_range_end"] != null) { + queryParameters["start_range_end"] = requestParameters["start_range_end"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["finish_range_begin"] != null) { + queryParameters["finish_range_begin"] = + requestParameters["finish_range_begin"]; + } - let urlPath = `/data/results/search_hosted`; + if (requestParameters["finish_range_end"] != null) { + queryParameters["finish_range_end"] = + requestParameters["finish_range_end"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["team_id"] != null) { + queryParameters["team_id"] = requestParameters["team_id"]; } - /** - */ - async getResultsSearchHosted(requestParameters: GetResultsSearchHostedRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsSearchHostedRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["host_cust_id"] != null) { + queryParameters["host_cust_id"] = requestParameters["host_cust_id"]; } - /** - */ - async getResultsSearchSeriesRaw(requestParameters: GetResultsSearchSeriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + if (requestParameters["session_name"] != null) { + queryParameters["session_name"] = requestParameters["session_name"]; + } - if (requestParameters['season_year'] != null) { - queryParameters['season_year'] = requestParameters['season_year']; - } + if (requestParameters["league_id"] != null) { + queryParameters["league_id"] = requestParameters["league_id"]; + } - if (requestParameters['season_quarter'] != null) { - queryParameters['season_quarter'] = requestParameters['season_quarter']; - } + if (requestParameters["league_season_id"] != null) { + queryParameters["league_season_id"] = + requestParameters["league_season_id"]; + } - if (requestParameters['start_range_begin'] != null) { - queryParameters['start_range_begin'] = requestParameters['start_range_begin']; - } + if (requestParameters["car_id"] != null) { + queryParameters["car_id"] = requestParameters["car_id"]; + } - if (requestParameters['start_range_end'] != null) { - queryParameters['start_range_end'] = requestParameters['start_range_end']; - } + if (requestParameters["track_id"] != null) { + queryParameters["track_id"] = requestParameters["track_id"]; + } - if (requestParameters['finish_range_begin'] != null) { - queryParameters['finish_range_begin'] = requestParameters['finish_range_begin']; - } + if (requestParameters["category_ids"] != null) { + queryParameters["category_ids"] = requestParameters["category_ids"]; + } - if (requestParameters['finish_range_end'] != null) { - queryParameters['finish_range_end'] = requestParameters['finish_range_end']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (requestParameters['team_id'] != null) { - queryParameters['team_id'] = requestParameters['team_id']; - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (requestParameters['series_id'] != null) { - queryParameters['series_id'] = requestParameters['series_id']; - } + let urlPath = `/data/results/search_hosted`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsSearchHosted( + requestParameters: GetResultsSearchHostedRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsSearchHostedRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getResultsSearchSeriesRaw( + requestParameters: GetResultsSearchSeriesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["season_year"] != null) { + queryParameters["season_year"] = requestParameters["season_year"]; + } - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } + if (requestParameters["season_quarter"] != null) { + queryParameters["season_quarter"] = requestParameters["season_quarter"]; + } - if (requestParameters['official_only'] != null) { - queryParameters['official_only'] = requestParameters['official_only']; - } + if (requestParameters["start_range_begin"] != null) { + queryParameters["start_range_begin"] = + requestParameters["start_range_begin"]; + } - if (requestParameters['event_types'] != null) { - queryParameters['event_types'] = requestParameters['event_types']; - } + if (requestParameters["start_range_end"] != null) { + queryParameters["start_range_end"] = requestParameters["start_range_end"]; + } - if (requestParameters['category_ids'] != null) { - queryParameters['category_ids'] = requestParameters['category_ids']; - } + if (requestParameters["finish_range_begin"] != null) { + queryParameters["finish_range_begin"] = + requestParameters["finish_range_begin"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["finish_range_end"] != null) { + queryParameters["finish_range_end"] = + requestParameters["finish_range_end"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["team_id"] != null) { + queryParameters["team_id"] = requestParameters["team_id"]; + } - let urlPath = `/data/results/search_series`; + if (requestParameters["series_id"] != null) { + queryParameters["series_id"] = requestParameters["series_id"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["official_only"] != null) { + queryParameters["official_only"] = requestParameters["official_only"]; } - /** - */ - async getResultsSearchSeries(requestParameters: GetResultsSearchSeriesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsSearchSeriesRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["event_types"] != null) { + queryParameters["event_types"] = requestParameters["event_types"]; } - /** - */ - async getResultsSeasonResultsRaw(requestParameters: GetResultsSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getResultsSeasonResults().' - ); - } + if (requestParameters["category_ids"] != null) { + queryParameters["category_ids"] = requestParameters["category_ids"]; + } - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (requestParameters['event_type'] != null) { - queryParameters['event_type'] = requestParameters['event_type']; - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } + let urlPath = `/data/results/search_series`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsSearchSeries( + requestParameters: GetResultsSearchSeriesRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsSearchSeriesRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getResultsSeasonResultsRaw( + requestParameters: GetResultsSeasonResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getResultsSeasonResults().', + ); + } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["event_type"] != null) { + queryParameters["event_type"] = requestParameters["event_type"]; + } - let urlPath = `/data/results/season_results`; + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - /** - */ - async getResultsSeasonResults(requestParameters: GetResultsSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getResultsSeasonResultsRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/results/season_results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getResultsSeasonResults( + requestParameters: GetResultsSeasonResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getResultsSeasonResultsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/SeasonApi.ts b/packages/api/client/fetch/src/apis/SeasonApi.ts index 6da7db3c..c3a78b7a 100644 --- a/packages/api/client/fetch/src/apis/SeasonApi.ts +++ b/packages/api/client/fetch/src/apis/SeasonApi.ts @@ -5,233 +5,287 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, IracingAPIResponse, IracingEventType, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, - IracingEventTypeFromJSON, - IracingEventTypeToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingEventTypeFromJSON, + IracingEventTypeToJSON, +} from "../models/index"; export interface GetSeasonListRequest { - season_year: number; - season_quarter: number; + season_year: number; + season_quarter: number; } export interface GetSeasonRaceGuideRequest { - from?: Date; - include_end_after_from?: boolean; + from?: Date; + include_end_after_from?: boolean; } export interface GetSeasonSpectatorSubsessionIdsRequest { - event_types?: Array; + event_types?: Array; } export interface GetSeasonSpectatorSubsessionIdsDetailRequest { - event_types?: Array; - season_ids?: Array; + event_types?: Array; + season_ids?: Array; } /** - * + * */ export class SeasonApi extends runtime.BaseAPI { - - /** - */ - async getSeasonListRaw(requestParameters: GetSeasonListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_year'] == null) { - throw new runtime.RequiredError( - 'season_year', - 'Required parameter "season_year" was null or undefined when calling getSeasonList().' - ); - } - - if (requestParameters['season_quarter'] == null) { - throw new runtime.RequiredError( - 'season_quarter', - 'Required parameter "season_quarter" was null or undefined when calling getSeasonList().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['season_year'] != null) { - queryParameters['season_year'] = requestParameters['season_year']; - } - - if (requestParameters['season_quarter'] != null) { - queryParameters['season_quarter'] = requestParameters['season_quarter']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/season/list`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + /** + */ + async getSeasonListRaw( + requestParameters: GetSeasonListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_year"] == null) { + throw new runtime.RequiredError( + "season_year", + 'Required parameter "season_year" was null or undefined when calling getSeasonList().', + ); } - /** - */ - async getSeasonList(requestParameters: GetSeasonListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonListRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["season_quarter"] == null) { + throw new runtime.RequiredError( + "season_quarter", + 'Required parameter "season_quarter" was null or undefined when calling getSeasonList().', + ); } - /** - */ - async getSeasonRaceGuideRaw(requestParameters: GetSeasonRaceGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['from'] != null) { - queryParameters['from'] = requestParameters['from']; - } - - if (requestParameters['include_end_after_from'] != null) { - queryParameters['include_end_after_from'] = requestParameters['include_end_after_from']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/season/race_guide`; + const queryParameters: any = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["season_year"] != null) { + queryParameters["season_year"] = requestParameters["season_year"]; } - /** - */ - async getSeasonRaceGuide(requestParameters: GetSeasonRaceGuideRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonRaceGuideRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["season_quarter"] != null) { + queryParameters["season_quarter"] = requestParameters["season_quarter"]; } - /** - */ - async getSeasonSpectatorSubsessionIdsRaw(requestParameters: GetSeasonSpectatorSubsessionIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['event_types'] != null) { - queryParameters['event_types'] = requestParameters['event_types']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + let urlPath = `/data/season/list`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonList( + requestParameters: GetSeasonListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeasonListRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getSeasonRaceGuideRaw( + requestParameters: GetSeasonRaceGuideRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["from"] != null) { + queryParameters["from"] = requestParameters["from"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["include_end_after_from"] != null) { + queryParameters["include_end_after_from"] = + requestParameters["include_end_after_from"]; + } - let urlPath = `/data/season/spectator_subsessionids`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getSeasonSpectatorSubsessionIds(requestParameters: GetSeasonSpectatorSubsessionIdsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonSpectatorSubsessionIdsRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/season/race_guide`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonRaceGuide( + requestParameters: GetSeasonRaceGuideRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeasonRaceGuideRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsRaw( + requestParameters: GetSeasonSpectatorSubsessionIdsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["event_types"] != null) { + queryParameters["event_types"] = requestParameters["event_types"]; } - /** - */ - async getSeasonSpectatorSubsessionIdsDetailRaw(requestParameters: GetSeasonSpectatorSubsessionIdsDetailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['event_types'] != null) { - queryParameters['event_types'] = requestParameters['event_types']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['season_ids'] != null) { - queryParameters['season_ids'] = requestParameters['season_ids']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + let urlPath = `/data/season/spectator_subsessionids`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonSpectatorSubsessionIds( + requestParameters: GetSeasonSpectatorSubsessionIdsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeasonSpectatorSubsessionIdsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetailRaw( + requestParameters: GetSeasonSpectatorSubsessionIdsDetailRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["event_types"] != null) { + queryParameters["event_types"] = requestParameters["event_types"]; + } - let urlPath = `/data/season/spectator_subsessionids_detail`; + if (requestParameters["season_ids"] != null) { + queryParameters["season_ids"] = requestParameters["season_ids"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - /** - */ - async getSeasonSpectatorSubsessionIdsDetail(requestParameters: GetSeasonSpectatorSubsessionIdsDetailRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeasonSpectatorSubsessionIdsDetailRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/season/spectator_subsessionids_detail`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeasonSpectatorSubsessionIdsDetail( + requestParameters: GetSeasonSpectatorSubsessionIdsDetailRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeasonSpectatorSubsessionIdsDetailRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/SeriesApi.ts b/packages/api/client/fetch/src/apis/SeriesApi.ts index cdbb6293..837b716e 100644 --- a/packages/api/client/fetch/src/apis/SeriesApi.ts +++ b/packages/api/client/fetch/src/apis/SeriesApi.ts @@ -5,340 +5,417 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; export interface GetSeriesPastSeasonsRequest { - series_id: number; + series_id: number; } export interface GetSeriesSeasonListRequest { - include_series?: boolean; - season_year?: number; - season_quarter?: number; + include_series?: boolean; + season_year?: number; + season_quarter?: number; } export interface GetSeriesSeasonScheduleRequest { - season_id: number; + season_id: number; } export interface GetSeriesSeasonsRequest { - include_series?: boolean; - season_year?: number; - season_quarter?: number; + include_series?: boolean; + season_year?: number; + season_quarter?: number; } /** - * + * */ export class SeriesApi extends runtime.BaseAPI { - - /** - */ - async getSeriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/series/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + /** + */ + async getSeriesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getSeries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesRaw(initOverrides); - return await response.value(); + let urlPath = `/data/series/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeries( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesAssetsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getSeriesAssetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; + let urlPath = `/data/series/assets`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesAssets( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesAssetsRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getSeriesPastSeasonsRaw( + requestParameters: GetSeriesPastSeasonsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["series_id"] == null) { + throw new runtime.RequiredError( + "series_id", + 'Required parameter "series_id" was null or undefined when calling getSeriesPastSeasons().', + ); + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const queryParameters: any = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["series_id"] != null) { + queryParameters["series_id"] = requestParameters["series_id"]; + } - let urlPath = `/data/series/assets`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getSeriesAssets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesAssetsRaw(initOverrides); - return await response.value(); + let urlPath = `/data/series/past_seasons`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesPastSeasons( + requestParameters: GetSeriesPastSeasonsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesPastSeasonsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getSeriesSeasonListRaw( + requestParameters: GetSeriesSeasonListRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["include_series"] != null) { + queryParameters["include_series"] = requestParameters["include_series"]; } - /** - */ - async getSeriesPastSeasonsRaw(requestParameters: GetSeriesPastSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['series_id'] == null) { - throw new runtime.RequiredError( - 'series_id', - 'Required parameter "series_id" was null or undefined when calling getSeriesPastSeasons().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['series_id'] != null) { - queryParameters['series_id'] = requestParameters['series_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/series/past_seasons`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["season_year"] != null) { + queryParameters["season_year"] = requestParameters["season_year"]; } - /** - */ - async getSeriesPastSeasons(requestParameters: GetSeriesPastSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesPastSeasonsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["season_quarter"] != null) { + queryParameters["season_quarter"] = requestParameters["season_quarter"]; } - /** - */ - async getSeriesSeasonListRaw(requestParameters: GetSeriesSeasonListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['include_series'] != null) { - queryParameters['include_series'] = requestParameters['include_series']; - } - - if (requestParameters['season_year'] != null) { - queryParameters['season_year'] = requestParameters['season_year']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['season_quarter'] != null) { - queryParameters['season_quarter'] = requestParameters['season_quarter']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/series/season_list`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getSeriesSeasonList(requestParameters: GetSeriesSeasonListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesSeasonListRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/series/season_list`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesSeasonList( + requestParameters: GetSeriesSeasonListRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesSeasonListRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getSeriesSeasonScheduleRaw( + requestParameters: GetSeriesSeasonScheduleRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getSeriesSeasonSchedule().', + ); } - /** - */ - async getSeriesSeasonScheduleRaw(requestParameters: GetSeriesSeasonScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getSeriesSeasonSchedule().' - ); - } - - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - let urlPath = `/data/series/season_schedule`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getSeriesSeasonSchedule(requestParameters: GetSeriesSeasonScheduleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesSeasonScheduleRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/series/season_schedule`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesSeasonSchedule( + requestParameters: GetSeriesSeasonScheduleRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesSeasonScheduleRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getSeriesSeasonsRaw( + requestParameters: GetSeriesSeasonsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["include_series"] != null) { + queryParameters["include_series"] = requestParameters["include_series"]; } - /** - */ - async getSeriesSeasonsRaw(requestParameters: GetSeriesSeasonsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['include_series'] != null) { - queryParameters['include_series'] = requestParameters['include_series']; - } - - if (requestParameters['season_year'] != null) { - queryParameters['season_year'] = requestParameters['season_year']; - } - - if (requestParameters['season_quarter'] != null) { - queryParameters['season_quarter'] = requestParameters['season_quarter']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/series/seasons`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["season_year"] != null) { + queryParameters["season_year"] = requestParameters["season_year"]; } - /** - */ - async getSeriesSeasons(requestParameters: GetSeriesSeasonsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesSeasonsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["season_quarter"] != null) { + queryParameters["season_quarter"] = requestParameters["season_quarter"]; } - /** - */ - async getSeriesStatsSeriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/series/stats_series`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getSeriesStatsSeries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSeriesStatsSeriesRaw(initOverrides); - return await response.value(); + let urlPath = `/data/series/seasons`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesSeasons( + requestParameters: GetSeriesSeasonsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesSeasonsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getSeriesStatsSeriesRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/series/stats_series`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getSeriesStatsSeries( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSeriesStatsSeriesRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/StatsApi.ts b/packages/api/client/fetch/src/apis/StatsApi.ts index 5608a6ce..50bc1e3f 100644 --- a/packages/api/client/fetch/src/apis/StatsApi.ts +++ b/packages/api/client/fetch/src/apis/StatsApi.ts @@ -5,899 +5,1094 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; +import * as runtime from "../runtime"; import type { ErrorResponse, IracingAPIResponse, IracingDivision, -} from '../models/index'; +} from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, - IracingDivisionFromJSON, - IracingDivisionToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, + IracingDivisionFromJSON, + IracingDivisionToJSON, +} from "../models/index"; export interface GetStatsMemberBestsRequest { - cust_id?: number; - car_id?: number; + cust_id?: number; + car_id?: number; } export interface GetStatsMemberCareerRequest { - cust_id?: number; + cust_id?: number; } export interface GetStatsMemberDivisionRequest { - season_id: number; - event_type: GetStatsMemberDivisionEventTypeEnum; + season_id: number; + event_type: GetStatsMemberDivisionEventTypeEnum; } export interface GetStatsMemberRecapRequest { - cust_id?: number; - year?: GetStatsMemberRecapYearEnum; - season?: number; + cust_id?: number; + year?: GetStatsMemberRecapYearEnum; + season?: number; } export interface GetStatsMemberRecentRacesRequest { - cust_id?: number; + cust_id?: number; } export interface GetStatsMemberSummaryRequest { - cust_id?: number; + cust_id?: number; } export interface GetStatsMemberYearlyRequest { - cust_id?: number; + cust_id?: number; } export interface GetStatsSeasonDriverStandingsRequest { - season_id: number; - car_class_id: number; - division?: IracingDivision; - race_week_num?: number; + season_id: number; + car_class_id: number; + division?: IracingDivision; + race_week_num?: number; } export interface GetStatsSeasonQualifyResultsRequest { - season_id: number; - car_class_id: number; - race_week_num: number; - division?: IracingDivision; + season_id: number; + car_class_id: number; + race_week_num: number; + division?: IracingDivision; } export interface GetStatsSeasonSupersessionStandingsRequest { - season_id: number; - car_class_id: number; - division?: IracingDivision; - race_week_num?: number; + season_id: number; + car_class_id: number; + division?: IracingDivision; + race_week_num?: number; } export interface GetStatsSeasonTeamStandingsRequest { - season_id: number; - car_class_id: number; - race_week_num?: number; + season_id: number; + car_class_id: number; + race_week_num?: number; } export interface GetStatsSeasonTimeTrialResultsRequest { - season_id: number; - car_class_id: number; - race_week_num: number; - division?: IracingDivision; + season_id: number; + car_class_id: number; + race_week_num: number; + division?: IracingDivision; } export interface GetStatsSeasonTimeTrialStandingsRequest { - season_id: number; - car_class_id: number; - division?: IracingDivision; - race_week_num?: number; + season_id: number; + car_class_id: number; + division?: IracingDivision; + race_week_num?: number; } export interface GetStatsWorldRecordsRequest { - car_id: number; - track_id: number; - season_year?: number; - season_quarter?: number; + car_id: number; + track_id: number; + season_year?: number; + season_quarter?: number; } /** - * + * */ export class StatsApi extends runtime.BaseAPI { + /** + */ + async getStatsMemberBestsRaw( + requestParameters: GetStatsMemberBestsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - /** - */ - async getStatsMemberBestsRaw(requestParameters: GetStatsMemberBestsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + if (requestParameters["car_id"] != null) { + queryParameters["car_id"] = requestParameters["car_id"]; + } - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['car_id'] != null) { - queryParameters['car_id'] = requestParameters['car_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + let urlPath = `/data/stats/member_bests`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberBests( + requestParameters: GetStatsMemberBestsRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberBestsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsMemberCareerRaw( + requestParameters: GetStatsMemberCareerRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const headerParameters: runtime.HTTPHeaders = {}; - let urlPath = `/data/stats/member_bests`; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + let urlPath = `/data/stats/member_career`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberCareer( + requestParameters: GetStatsMemberCareerRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberCareerRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsMemberDivisionRaw( + requestParameters: GetStatsMemberDivisionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getStatsMemberDivision().', + ); } - /** - */ - async getStatsMemberBests(requestParameters: GetStatsMemberBestsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberBestsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["event_type"] == null) { + throw new runtime.RequiredError( + "event_type", + 'Required parameter "event_type" was null or undefined when calling getStatsMemberDivision().', + ); } - /** - */ - async getStatsMemberCareerRaw(requestParameters: GetStatsMemberCareerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["event_type"] != null) { + queryParameters["event_type"] = requestParameters["event_type"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const headerParameters: runtime.HTTPHeaders = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - let urlPath = `/data/stats/member_career`; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + let urlPath = `/data/stats/member_division`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberDivision( + requestParameters: GetStatsMemberDivisionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberDivisionRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsMemberRecapRaw( + requestParameters: GetStatsMemberRecapRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["year"] != null) { + queryParameters["year"] = requestParameters["year"]; } - /** - */ - async getStatsMemberCareer(requestParameters: GetStatsMemberCareerRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberCareerRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["season"] != null) { + queryParameters["season"] = requestParameters["season"]; } - /** - */ - async getStatsMemberDivisionRaw(requestParameters: GetStatsMemberDivisionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getStatsMemberDivision().' - ); - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['event_type'] == null) { - throw new runtime.RequiredError( - 'event_type', - 'Required parameter "event_type" was null or undefined when calling getStatsMemberDivision().' - ); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const queryParameters: any = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } + let urlPath = `/data/stats/member_recap`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberRecap( + requestParameters: GetStatsMemberRecapRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberRecapRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsMemberRecentRacesRaw( + requestParameters: GetStatsMemberRecentRacesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - if (requestParameters['event_type'] != null) { - queryParameters['event_type'] = requestParameters['event_type']; - } + const headerParameters: runtime.HTTPHeaders = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + let urlPath = `/data/stats/member_recent_races`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberRecentRaces( + requestParameters: GetStatsMemberRecentRacesRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberRecentRacesRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsMemberSummaryRaw( + requestParameters: GetStatsMemberSummaryRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; + } - let urlPath = `/data/stats/member_division`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getStatsMemberDivision(requestParameters: GetStatsMemberDivisionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberDivisionRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/stats/member_summary`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberSummary( + requestParameters: GetStatsMemberSummaryRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberSummaryRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsMemberYearlyRaw( + requestParameters: GetStatsMemberYearlyRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + if (requestParameters["cust_id"] != null) { + queryParameters["cust_id"] = requestParameters["cust_id"]; } - /** - */ - async getStatsMemberRecapRaw(requestParameters: GetStatsMemberRecapRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (requestParameters['year'] != null) { - queryParameters['year'] = requestParameters['year']; - } - - if (requestParameters['season'] != null) { - queryParameters['season'] = requestParameters['season']; - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const headerParameters: runtime.HTTPHeaders = {}; + let urlPath = `/data/stats/member_yearly`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsMemberYearly( + requestParameters: GetStatsMemberYearlyRequest = {}, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsMemberYearlyRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsSeasonDriverStandingsRaw( + requestParameters: GetStatsSeasonDriverStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonDriverStandings().', + ); + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["car_class_id"] == null) { + throw new runtime.RequiredError( + "car_class_id", + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonDriverStandings().', + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const queryParameters: any = {}; - let urlPath = `/data/stats/member_recap`; + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["car_class_id"] != null) { + queryParameters["car_class_id"] = requestParameters["car_class_id"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["division"] != null) { + queryParameters["division"] = requestParameters["division"]; } - /** - */ - async getStatsMemberRecap(requestParameters: GetStatsMemberRecapRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberRecapRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; } - /** - */ - async getStatsMemberRecentRacesRaw(requestParameters: GetStatsMemberRecentRacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + let urlPath = `/data/stats/season_driver_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonDriverStandings( + requestParameters: GetStatsSeasonDriverStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonDriverStandingsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsSeasonQualifyResultsRaw( + requestParameters: GetStatsSeasonQualifyResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonQualifyResults().', + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["car_class_id"] == null) { + throw new runtime.RequiredError( + "car_class_id", + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonQualifyResults().', + ); + } - let urlPath = `/data/stats/member_recent_races`; + if (requestParameters["race_week_num"] == null) { + throw new runtime.RequiredError( + "race_week_num", + 'Required parameter "race_week_num" was null or undefined when calling getStatsSeasonQualifyResults().', + ); + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; } - /** - */ - async getStatsMemberRecentRaces(requestParameters: GetStatsMemberRecentRacesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberRecentRacesRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["car_class_id"] != null) { + queryParameters["car_class_id"] = requestParameters["car_class_id"]; } - /** - */ - async getStatsMemberSummaryRaw(requestParameters: GetStatsMemberSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } - - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["division"] != null) { + queryParameters["division"] = requestParameters["division"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + const headerParameters: runtime.HTTPHeaders = {}; - let urlPath = `/data/stats/member_summary`; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + let urlPath = `/data/stats/season_qualify_results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonQualifyResults( + requestParameters: GetStatsSeasonQualifyResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonQualifyResultsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsSeasonSupersessionStandingsRaw( + requestParameters: GetStatsSeasonSupersessionStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonSupersessionStandings().', + ); } - /** - */ - async getStatsMemberSummary(requestParameters: GetStatsMemberSummaryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberSummaryRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["car_class_id"] == null) { + throw new runtime.RequiredError( + "car_class_id", + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonSupersessionStandings().', + ); } - /** - */ - async getStatsMemberYearlyRaw(requestParameters: GetStatsMemberYearlyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; + const queryParameters: any = {}; - if (requestParameters['cust_id'] != null) { - queryParameters['cust_id'] = requestParameters['cust_id']; - } + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["car_class_id"] != null) { + queryParameters["car_class_id"] = requestParameters["car_class_id"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["division"] != null) { + queryParameters["division"] = requestParameters["division"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; + } - let urlPath = `/data/stats/member_yearly`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getStatsMemberYearly(requestParameters: GetStatsMemberYearlyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsMemberYearlyRaw(requestParameters, initOverrides); - return await response.value(); + let urlPath = `/data/stats/season_supersession_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonSupersessionStandings( + requestParameters: GetStatsSeasonSupersessionStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonSupersessionStandingsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsSeasonTeamStandingsRaw( + requestParameters: GetStatsSeasonTeamStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTeamStandings().', + ); } - /** - */ - async getStatsSeasonDriverStandingsRaw(requestParameters: GetStatsSeasonDriverStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getStatsSeasonDriverStandings().' - ); - } + if (requestParameters["car_class_id"] == null) { + throw new runtime.RequiredError( + "car_class_id", + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTeamStandings().', + ); + } - if (requestParameters['car_class_id'] == null) { - throw new runtime.RequiredError( - 'car_class_id', - 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonDriverStandings().' - ); - } + const queryParameters: any = {}; - const queryParameters: any = {}; + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } + if (requestParameters["car_class_id"] != null) { + queryParameters["car_class_id"] = requestParameters["car_class_id"]; + } - if (requestParameters['car_class_id'] != null) { - queryParameters['car_class_id'] = requestParameters['car_class_id']; - } + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; + } - if (requestParameters['division'] != null) { - queryParameters['division'] = requestParameters['division']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + let urlPath = `/data/stats/season_team_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonTeamStandings( + requestParameters: GetStatsSeasonTeamStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonTeamStandingsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsSeasonTimeTrialResultsRaw( + requestParameters: GetStatsSeasonTimeTrialResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTimeTrialResults().', + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/stats/season_driver_standings`; + if (requestParameters["car_class_id"] == null) { + throw new runtime.RequiredError( + "car_class_id", + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTimeTrialResults().', + ); + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonDriverStandings(requestParameters: GetStatsSeasonDriverStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonDriverStandingsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonQualifyResultsRaw(requestParameters: GetStatsSeasonQualifyResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getStatsSeasonQualifyResults().' - ); - } - - if (requestParameters['car_class_id'] == null) { - throw new runtime.RequiredError( - 'car_class_id', - 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonQualifyResults().' - ); - } - - if (requestParameters['race_week_num'] == null) { - throw new runtime.RequiredError( - 'race_week_num', - 'Required parameter "race_week_num" was null or undefined when calling getStatsSeasonQualifyResults().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } - - if (requestParameters['car_class_id'] != null) { - queryParameters['car_class_id'] = requestParameters['car_class_id']; - } - - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } - - if (requestParameters['division'] != null) { - queryParameters['division'] = requestParameters['division']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/stats/season_qualify_results`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonQualifyResults(requestParameters: GetStatsSeasonQualifyResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonQualifyResultsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonSupersessionStandingsRaw(requestParameters: GetStatsSeasonSupersessionStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getStatsSeasonSupersessionStandings().' - ); - } - - if (requestParameters['car_class_id'] == null) { - throw new runtime.RequiredError( - 'car_class_id', - 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonSupersessionStandings().' - ); - } - - const queryParameters: any = {}; + if (requestParameters["race_week_num"] == null) { + throw new runtime.RequiredError( + "race_week_num", + 'Required parameter "race_week_num" was null or undefined when calling getStatsSeasonTimeTrialResults().', + ); + } - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } - - if (requestParameters['car_class_id'] != null) { - queryParameters['car_class_id'] = requestParameters['car_class_id']; - } + const queryParameters: any = {}; - if (requestParameters['division'] != null) { - queryParameters['division'] = requestParameters['division']; - } - - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/stats/season_supersession_standings`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonSupersessionStandings(requestParameters: GetStatsSeasonSupersessionStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonSupersessionStandingsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonTeamStandingsRaw(requestParameters: GetStatsSeasonTeamStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTeamStandings().' - ); - } - - if (requestParameters['car_class_id'] == null) { - throw new runtime.RequiredError( - 'car_class_id', - 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTeamStandings().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } - - if (requestParameters['car_class_id'] != null) { - queryParameters['car_class_id'] = requestParameters['car_class_id']; - } + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } + + if (requestParameters["car_class_id"] != null) { + queryParameters["car_class_id"] = requestParameters["car_class_id"]; + } - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } - - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/stats/season_team_standings`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonTeamStandings(requestParameters: GetStatsSeasonTeamStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonTeamStandingsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonTimeTrialResultsRaw(requestParameters: GetStatsSeasonTimeTrialResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTimeTrialResults().' - ); - } - - if (requestParameters['car_class_id'] == null) { - throw new runtime.RequiredError( - 'car_class_id', - 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTimeTrialResults().' - ); - } - - if (requestParameters['race_week_num'] == null) { - throw new runtime.RequiredError( - 'race_week_num', - 'Required parameter "race_week_num" was null or undefined when calling getStatsSeasonTimeTrialResults().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } + if (requestParameters["division"] != null) { + queryParameters["division"] = requestParameters["division"]; + } - if (requestParameters['car_class_id'] != null) { - queryParameters['car_class_id'] = requestParameters['car_class_id']; - } - - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['division'] != null) { - queryParameters['division'] = requestParameters['division']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/stats/season_time_trial_results`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getStatsSeasonTimeTrialResults(requestParameters: GetStatsSeasonTimeTrialResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonTimeTrialResultsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - */ - async getStatsSeasonTimeTrialStandingsRaw(requestParameters: GetStatsSeasonTimeTrialStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['season_id'] == null) { - throw new runtime.RequiredError( - 'season_id', - 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTimeTrialStandings().' - ); - } - - if (requestParameters['car_class_id'] == null) { - throw new runtime.RequiredError( - 'car_class_id', - 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTimeTrialStandings().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['season_id'] != null) { - queryParameters['season_id'] = requestParameters['season_id']; - } - - if (requestParameters['car_class_id'] != null) { - queryParameters['car_class_id'] = requestParameters['car_class_id']; - } - - if (requestParameters['division'] != null) { - queryParameters['division'] = requestParameters['division']; - } - - if (requestParameters['race_week_num'] != null) { - queryParameters['race_week_num'] = requestParameters['race_week_num']; - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - const headerParameters: runtime.HTTPHeaders = {}; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + let urlPath = `/data/stats/season_time_trial_results`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonTimeTrialResults( + requestParameters: GetStatsSeasonTimeTrialResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonTimeTrialResultsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsSeasonTimeTrialStandingsRaw( + requestParameters: GetStatsSeasonTimeTrialStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["season_id"] == null) { + throw new runtime.RequiredError( + "season_id", + 'Required parameter "season_id" was null or undefined when calling getStatsSeasonTimeTrialStandings().', + ); + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["car_class_id"] == null) { + throw new runtime.RequiredError( + "car_class_id", + 'Required parameter "car_class_id" was null or undefined when calling getStatsSeasonTimeTrialStandings().', + ); + } - let urlPath = `/data/stats/season_time_trial_standings`; + const queryParameters: any = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (requestParameters["season_id"] != null) { + queryParameters["season_id"] = requestParameters["season_id"]; + } - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["car_class_id"] != null) { + queryParameters["car_class_id"] = requestParameters["car_class_id"]; } - /** - */ - async getStatsSeasonTimeTrialStandings(requestParameters: GetStatsSeasonTimeTrialStandingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsSeasonTimeTrialStandingsRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["division"] != null) { + queryParameters["division"] = requestParameters["division"]; } - /** - */ - async getStatsWorldRecordsRaw(requestParameters: GetStatsWorldRecordsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['car_id'] == null) { - throw new runtime.RequiredError( - 'car_id', - 'Required parameter "car_id" was null or undefined when calling getStatsWorldRecords().' - ); - } + if (requestParameters["race_week_num"] != null) { + queryParameters["race_week_num"] = requestParameters["race_week_num"]; + } - if (requestParameters['track_id'] == null) { - throw new runtime.RequiredError( - 'track_id', - 'Required parameter "track_id" was null or undefined when calling getStatsWorldRecords().' - ); - } + const headerParameters: runtime.HTTPHeaders = {}; - const queryParameters: any = {}; + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - if (requestParameters['car_id'] != null) { - queryParameters['car_id'] = requestParameters['car_id']; - } + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - if (requestParameters['track_id'] != null) { - queryParameters['track_id'] = requestParameters['track_id']; - } + let urlPath = `/data/stats/season_time_trial_standings`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsSeasonTimeTrialStandings( + requestParameters: GetStatsSeasonTimeTrialStandingsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsSeasonTimeTrialStandingsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + */ + async getStatsWorldRecordsRaw( + requestParameters: GetStatsWorldRecordsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["car_id"] == null) { + throw new runtime.RequiredError( + "car_id", + 'Required parameter "car_id" was null or undefined when calling getStatsWorldRecords().', + ); + } - if (requestParameters['season_year'] != null) { - queryParameters['season_year'] = requestParameters['season_year']; - } + if (requestParameters["track_id"] == null) { + throw new runtime.RequiredError( + "track_id", + 'Required parameter "track_id" was null or undefined when calling getStatsWorldRecords().', + ); + } - if (requestParameters['season_quarter'] != null) { - queryParameters['season_quarter'] = requestParameters['season_quarter']; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["car_id"] != null) { + queryParameters["car_id"] = requestParameters["car_id"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + if (requestParameters["track_id"] != null) { + queryParameters["track_id"] = requestParameters["track_id"]; + } - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (requestParameters["season_year"] != null) { + queryParameters["season_year"] = requestParameters["season_year"]; + } - let urlPath = `/data/stats/world_records`; + if (requestParameters["season_quarter"] != null) { + queryParameters["season_quarter"] = requestParameters["season_quarter"]; + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const headerParameters: runtime.HTTPHeaders = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - /** - */ - async getStatsWorldRecords(requestParameters: GetStatsWorldRecordsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getStatsWorldRecordsRaw(requestParameters, initOverrides); - return await response.value(); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/stats/world_records`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getStatsWorldRecords( + requestParameters: GetStatsWorldRecordsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getStatsWorldRecordsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } /** * @export */ export const GetStatsMemberDivisionEventTypeEnum = { - NUMBER_4: 4, - NUMBER_5: 5 + NUMBER_4: 4, + NUMBER_5: 5, } as const; -export type GetStatsMemberDivisionEventTypeEnum = typeof GetStatsMemberDivisionEventTypeEnum[keyof typeof GetStatsMemberDivisionEventTypeEnum]; +export type GetStatsMemberDivisionEventTypeEnum = + (typeof GetStatsMemberDivisionEventTypeEnum)[keyof typeof GetStatsMemberDivisionEventTypeEnum]; /** * @export */ export const GetStatsMemberRecapYearEnum = { - NUMBER_1: 1, - NUMBER_2: 2, - NUMBER_3: 3, - NUMBER_4: 4 + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4, } as const; -export type GetStatsMemberRecapYearEnum = typeof GetStatsMemberRecapYearEnum[keyof typeof GetStatsMemberRecapYearEnum]; +export type GetStatsMemberRecapYearEnum = + (typeof GetStatsMemberRecapYearEnum)[keyof typeof GetStatsMemberRecapYearEnum]; diff --git a/packages/api/client/fetch/src/apis/TeamApi.ts b/packages/api/client/fetch/src/apis/TeamApi.ts index a0b28548..7609ec6d 100644 --- a/packages/api/client/fetch/src/apis/TeamApi.ts +++ b/packages/api/client/fetch/src/apis/TeamApi.ts @@ -5,119 +5,134 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; export interface GetTeamRequest { - team_id: number; - include_licenses?: boolean; + team_id: number; + include_licenses?: boolean; } /** - * + * */ export class TeamApi extends runtime.BaseAPI { + /** + */ + async getTeamRaw( + requestParameters: GetTeamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["team_id"] == null) { + throw new runtime.RequiredError( + "team_id", + 'Required parameter "team_id" was null or undefined when calling getTeam().', + ); + } - /** - */ - async getTeamRaw(requestParameters: GetTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['team_id'] == null) { - throw new runtime.RequiredError( - 'team_id', - 'Required parameter "team_id" was null or undefined when calling getTeam().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['team_id'] != null) { - queryParameters['team_id'] = requestParameters['team_id']; - } - - if (requestParameters['include_licenses'] != null) { - queryParameters['include_licenses'] = requestParameters['include_licenses']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/team/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + const queryParameters: any = {}; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (requestParameters["team_id"] != null) { + queryParameters["team_id"] = requestParameters["team_id"]; } - /** - */ - async getTeam(requestParameters: GetTeamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTeamRaw(requestParameters, initOverrides); - return await response.value(); + if (requestParameters["include_licenses"] != null) { + queryParameters["include_licenses"] = + requestParameters["include_licenses"]; } - /** - */ - async getTeamMembershipRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/team/membership`; + const headerParameters: runtime.HTTPHeaders = {}; - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getTeamMembership(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTeamMembershipRaw(initOverrides); - return await response.value(); + let urlPath = `/data/team/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getTeam( + requestParameters: GetTeamRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTeamRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async getTeamMembershipRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/team/membership`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getTeamMembership( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTeamMembershipRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/TimeAttackApi.ts b/packages/api/client/fetch/src/apis/TimeAttackApi.ts index f234b5c6..f624e252 100644 --- a/packages/api/client/fetch/src/apis/TimeAttackApi.ts +++ b/packages/api/client/fetch/src/apis/TimeAttackApi.ts @@ -5,79 +5,88 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; export interface GetTimeAttackMemberSeasonResultsRequest { - ta_comp_season_id: number; + ta_comp_season_id: number; } /** - * + * */ export class TimeAttackApi extends runtime.BaseAPI { + /** + */ + async getTimeAttackMemberSeasonResultsRaw( + requestParameters: GetTimeAttackMemberSeasonResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["ta_comp_season_id"] == null) { + throw new runtime.RequiredError( + "ta_comp_season_id", + 'Required parameter "ta_comp_season_id" was null or undefined when calling getTimeAttackMemberSeasonResults().', + ); + } - /** - */ - async getTimeAttackMemberSeasonResultsRaw(requestParameters: GetTimeAttackMemberSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['ta_comp_season_id'] == null) { - throw new runtime.RequiredError( - 'ta_comp_season_id', - 'Required parameter "ta_comp_season_id" was null or undefined when calling getTimeAttackMemberSeasonResults().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['ta_comp_season_id'] != null) { - queryParameters['ta_comp_season_id'] = requestParameters['ta_comp_season_id']; - } + const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters["ta_comp_season_id"] != null) { + queryParameters["ta_comp_season_id"] = + requestParameters["ta_comp_season_id"]; + } - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); + const headerParameters: runtime.HTTPHeaders = {}; - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); - let urlPath = `/data/time_attack/member_season_results`; + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); + let urlPath = `/data/time_attack/member_season_results`; - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); - /** - */ - async getTimeAttackMemberSeasonResults(requestParameters: GetTimeAttackMemberSeasonResultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTimeAttackMemberSeasonResultsRaw(requestParameters, initOverrides); - return await response.value(); - } + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + /** + */ + async getTimeAttackMemberSeasonResults( + requestParameters: GetTimeAttackMemberSeasonResultsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTimeAttackMemberSeasonResultsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/TrackApi.ts b/packages/api/client/fetch/src/apis/TrackApi.ts index 39692dfd..9c2983a2 100644 --- a/packages/api/client/fetch/src/apis/TrackApi.ts +++ b/packages/api/client/fetch/src/apis/TrackApi.ts @@ -5,99 +5,111 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import * as runtime from '../runtime'; -import type { - ErrorResponse, - IracingAPIResponse, -} from '../models/index'; +import * as runtime from "../runtime"; +import type { ErrorResponse, IracingAPIResponse } from "../models/index"; import { - ErrorResponseFromJSON, - ErrorResponseToJSON, - IracingAPIResponseFromJSON, - IracingAPIResponseToJSON, -} from '../models/index'; + ErrorResponseFromJSON, + ErrorResponseToJSON, + IracingAPIResponseFromJSON, + IracingAPIResponseToJSON, +} from "../models/index"; /** - * + * */ export class TrackApi extends runtime.BaseAPI { - - /** - */ - async getTrackRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/track/get`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); - } - - /** - */ - async getTrack(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackRaw(initOverrides); - return await response.value(); - } - - /** - */ - async getTrackAssetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("bearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/data/track/assets`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => IracingAPIResponseFromJSON(jsonValue)); + /** + */ + async getTrackRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } - /** - */ - async getTrackAssets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getTrackAssetsRaw(initOverrides); - return await response.value(); + let urlPath = `/data/track/get`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getTrack( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTrackRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getTrackAssetsRaw( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } } + let urlPath = `/data/track/assets`; + + const response = await this.request( + { + path: urlPath, + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + IracingAPIResponseFromJSON(jsonValue), + ); + } + + /** + */ + async getTrackAssets( + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getTrackAssetsRaw(initOverrides); + return await response.value(); + } } diff --git a/packages/api/client/fetch/src/apis/index.ts b/packages/api/client/fetch/src/apis/index.ts index 2bd41c49..6abc3fdb 100644 --- a/packages/api/client/fetch/src/apis/index.ts +++ b/packages/api/client/fetch/src/apis/index.ts @@ -1,19 +1,19 @@ /* tslint:disable */ /* eslint-disable */ -export * from './AuthApi'; -export * from './CarApi'; -export * from './CarclassApi'; -export * from './ConstantsApi'; -export * from './DocApi'; -export * from './DriverStatsApi'; -export * from './HostedApi'; -export * from './LeagueApi'; -export * from './LookupApi'; -export * from './MemberApi'; -export * from './ResultsApi'; -export * from './SeasonApi'; -export * from './SeriesApi'; -export * from './StatsApi'; -export * from './TeamApi'; -export * from './TimeAttackApi'; -export * from './TrackApi'; +export * from "./AuthApi"; +export * from "./CarApi"; +export * from "./CarclassApi"; +export * from "./ConstantsApi"; +export * from "./DocApi"; +export * from "./DriverStatsApi"; +export * from "./HostedApi"; +export * from "./LeagueApi"; +export * from "./LookupApi"; +export * from "./MemberApi"; +export * from "./ResultsApi"; +export * from "./SeasonApi"; +export * from "./SeriesApi"; +export * from "./StatsApi"; +export * from "./TeamApi"; +export * from "./TimeAttackApi"; +export * from "./TrackApi"; diff --git a/packages/api/client/fetch/src/index.ts b/packages/api/client/fetch/src/index.ts index bebe8bbb..ee263772 100644 --- a/packages/api/client/fetch/src/index.ts +++ b/packages/api/client/fetch/src/index.ts @@ -1,5 +1,5 @@ /* tslint:disable */ /* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; +export * from "./runtime"; +export * from "./apis/index"; +export * from "./models/index"; diff --git a/packages/api/client/fetch/src/models/ErrorResponse.ts b/packages/api/client/fetch/src/models/ErrorResponse.ts index 0fd38ec9..e091079a 100644 --- a/packages/api/client/fetch/src/models/ErrorResponse.ts +++ b/packages/api/client/fetch/src/models/ErrorResponse.ts @@ -5,78 +5,81 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface ErrorResponse */ export interface ErrorResponse { - /** - * - * @type {string} - * @memberof ErrorResponse - */ - error: string; - /** - * - * @type {string} - * @memberof ErrorResponse - */ - message?: string; - /** - * - * @type {string} - * @memberof ErrorResponse - */ - note?: string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + error: string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + message?: string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + note?: string; } /** * Check if a given object implements the ErrorResponse interface. */ export function instanceOfErrorResponse(value: object): value is ErrorResponse { - if (!('error' in value) || value['error'] === undefined) return false; - return true; + if (!("error" in value) || value["error"] === undefined) return false; + return true; } export function ErrorResponseFromJSON(json: any): ErrorResponse { - return ErrorResponseFromJSONTyped(json, false); + return ErrorResponseFromJSONTyped(json, false); } -export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorResponse { - if (json == null) { - return json; - } - return { - - 'error': json['error'], - 'message': json['message'] == null ? undefined : json['message'], - 'note': json['note'] == null ? undefined : json['note'], - }; +export function ErrorResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): ErrorResponse { + if (json == null) { + return json; + } + return { + error: json["error"], + message: json["message"] == null ? undefined : json["message"], + note: json["note"] == null ? undefined : json["note"], + }; } export function ErrorResponseToJSON(json: any): ErrorResponse { - return ErrorResponseToJSONTyped(json, false); + return ErrorResponseToJSONTyped(json, false); } -export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function ErrorResponseToJSONTyped( + value?: ErrorResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'error': value['error'], - 'message': value['message'], - 'note': value['note'], - }; + return { + error: value["error"], + message: value["message"], + note: value["note"], + }; } - diff --git a/packages/api/client/fetch/src/models/IracingAPIResponse.ts b/packages/api/client/fetch/src/models/IracingAPIResponse.ts index d0e29f5d..864ffbd5 100644 --- a/packages/api/client/fetch/src/models/IracingAPIResponse.ts +++ b/packages/api/client/fetch/src/models/IracingAPIResponse.ts @@ -5,71 +5,76 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * Response from iRacing `/data` API. * @export * @interface IracingAPIResponse */ export interface IracingAPIResponse { - /** - * A link to the cached data - * @type {string} - * @memberof IracingAPIResponse - */ - link: string; - /** - * - * @type {Date} - * @memberof IracingAPIResponse - */ - expires: Date; + /** + * A link to the cached data + * @type {string} + * @memberof IracingAPIResponse + */ + link: string; + /** + * + * @type {Date} + * @memberof IracingAPIResponse + */ + expires: Date; } /** * Check if a given object implements the IracingAPIResponse interface. */ -export function instanceOfIracingAPIResponse(value: object): value is IracingAPIResponse { - if (!('link' in value) || value['link'] === undefined) return false; - if (!('expires' in value) || value['expires'] === undefined) return false; - return true; +export function instanceOfIracingAPIResponse( + value: object, +): value is IracingAPIResponse { + if (!("link" in value) || value["link"] === undefined) return false; + if (!("expires" in value) || value["expires"] === undefined) return false; + return true; } export function IracingAPIResponseFromJSON(json: any): IracingAPIResponse { - return IracingAPIResponseFromJSONTyped(json, false); + return IracingAPIResponseFromJSONTyped(json, false); } -export function IracingAPIResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingAPIResponse { - if (json == null) { - return json; - } - return { - - 'link': json['link'], - 'expires': (new Date(json['expires'])), - }; +export function IracingAPIResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): IracingAPIResponse { + if (json == null) { + return json; + } + return { + link: json["link"], + expires: new Date(json["expires"]), + }; } export function IracingAPIResponseToJSON(json: any): IracingAPIResponse { - return IracingAPIResponseToJSONTyped(json, false); + return IracingAPIResponseToJSONTyped(json, false); } -export function IracingAPIResponseToJSONTyped(value?: IracingAPIResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function IracingAPIResponseToJSONTyped( + value?: IracingAPIResponse | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'link': value['link'], - 'expires': value['expires'].toISOString(), - }; + return { + link: value["link"], + expires: value["expires"].toISOString(), + }; } - diff --git a/packages/api/client/fetch/src/models/IracingCategory.ts b/packages/api/client/fetch/src/models/IracingCategory.ts index 15a84288..2f9ab0bc 100644 --- a/packages/api/client/fetch/src/models/IracingCategory.ts +++ b/packages/api/client/fetch/src/models/IracingCategory.ts @@ -5,71 +5,75 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * Racing category. * @export */ export const IracingCategory = { - /** - * Oval discipline - */ - Oval: 'oval', - /** - * Road discipline. Legacy, use `sports_car` or `formula_car` instead. - */ - Road: 'road', - /** - * Dirt road discipline. - */ - DirtRoad: 'dirt_road', - /** - * Dirt oval discipline. - */ - DirtOval: 'dirt_oval', - /** - * Sports car discipline. - */ - SportsCar: 'sports_car', - /** - * Formula car discipline. - */ - FormulaCar: 'formula_car' + /** + * Oval discipline + */ + Oval: "oval", + /** + * Road discipline. Legacy, use `sports_car` or `formula_car` instead. + */ + Road: "road", + /** + * Dirt road discipline. + */ + DirtRoad: "dirt_road", + /** + * Dirt oval discipline. + */ + DirtOval: "dirt_oval", + /** + * Sports car discipline. + */ + SportsCar: "sports_car", + /** + * Formula car discipline. + */ + FormulaCar: "formula_car", } as const; -export type IracingCategory = typeof IracingCategory[keyof typeof IracingCategory]; - +export type IracingCategory = + (typeof IracingCategory)[keyof typeof IracingCategory]; export function instanceOfIracingCategory(value: any): boolean { - for (const key in IracingCategory) { - if (Object.prototype.hasOwnProperty.call(IracingCategory, key)) { - if (IracingCategory[key as keyof typeof IracingCategory] === value) { - return true; - } - } + for (const key in IracingCategory) { + if (Object.prototype.hasOwnProperty.call(IracingCategory, key)) { + if (IracingCategory[key as keyof typeof IracingCategory] === value) { + return true; + } } - return false; + } + return false; } export function IracingCategoryFromJSON(json: any): IracingCategory { - return IracingCategoryFromJSONTyped(json, false); + return IracingCategoryFromJSONTyped(json, false); } -export function IracingCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingCategory { - return json as IracingCategory; +export function IracingCategoryFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): IracingCategory { + return json as IracingCategory; } export function IracingCategoryToJSON(value?: IracingCategory | null): any { - return value as any; + return value as any; } -export function IracingCategoryToJSONTyped(value: any, ignoreDiscriminator: boolean): IracingCategory { - return value as IracingCategory; +export function IracingCategoryToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): IracingCategory { + return value as IracingCategory; } - diff --git a/packages/api/client/fetch/src/models/IracingDivision.ts b/packages/api/client/fetch/src/models/IracingDivision.ts index 024b278a..5f79f812 100644 --- a/packages/api/client/fetch/src/models/IracingDivision.ts +++ b/packages/api/client/fetch/src/models/IracingDivision.ts @@ -5,91 +5,95 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * iRacing Divisions. Divisions are 0-based: 0 is Division 1, 10 is Rookie. See /data/constants/divisons for more information. * @export */ export const IracingDivision = { - /** - * Division 1 - */ - NUMBER_0: 0, - /** - * Division 2 - */ - NUMBER_1: 1, - /** - * Division 3 - */ - NUMBER_2: 2, - /** - * Division 4 - */ - NUMBER_3: 3, - /** - * Division 5 - */ - NUMBER_4: 4, - /** - * Division 6 - */ - NUMBER_5: 5, - /** - * Division 7 - */ - NUMBER_6: 6, - /** - * Division 8 - */ - NUMBER_7: 7, - /** - * Division 9 - */ - NUMBER_8: 8, - /** - * Division 10 - */ - NUMBER_9: 9, - /** - * Rookie - */ - NUMBER_10: 10 + /** + * Division 1 + */ + NUMBER_0: 0, + /** + * Division 2 + */ + NUMBER_1: 1, + /** + * Division 3 + */ + NUMBER_2: 2, + /** + * Division 4 + */ + NUMBER_3: 3, + /** + * Division 5 + */ + NUMBER_4: 4, + /** + * Division 6 + */ + NUMBER_5: 5, + /** + * Division 7 + */ + NUMBER_6: 6, + /** + * Division 8 + */ + NUMBER_7: 7, + /** + * Division 9 + */ + NUMBER_8: 8, + /** + * Division 10 + */ + NUMBER_9: 9, + /** + * Rookie + */ + NUMBER_10: 10, } as const; -export type IracingDivision = typeof IracingDivision[keyof typeof IracingDivision]; - +export type IracingDivision = + (typeof IracingDivision)[keyof typeof IracingDivision]; export function instanceOfIracingDivision(value: any): boolean { - for (const key in IracingDivision) { - if (Object.prototype.hasOwnProperty.call(IracingDivision, key)) { - if (IracingDivision[key as keyof typeof IracingDivision] === value) { - return true; - } - } + for (const key in IracingDivision) { + if (Object.prototype.hasOwnProperty.call(IracingDivision, key)) { + if (IracingDivision[key as keyof typeof IracingDivision] === value) { + return true; + } } - return false; + } + return false; } export function IracingDivisionFromJSON(json: any): IracingDivision { - return IracingDivisionFromJSONTyped(json, false); + return IracingDivisionFromJSONTyped(json, false); } -export function IracingDivisionFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingDivision { - return json as IracingDivision; +export function IracingDivisionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): IracingDivision { + return json as IracingDivision; } export function IracingDivisionToJSON(value?: IracingDivision | null): any { - return value as any; + return value as any; } -export function IracingDivisionToJSONTyped(value: any, ignoreDiscriminator: boolean): IracingDivision { - return value as IracingDivision; +export function IracingDivisionToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): IracingDivision { + return value as IracingDivision; } - diff --git a/packages/api/client/fetch/src/models/IracingEventType.ts b/packages/api/client/fetch/src/models/IracingEventType.ts index f3d76e18..dd2ae650 100644 --- a/packages/api/client/fetch/src/models/IracingEventType.ts +++ b/packages/api/client/fetch/src/models/IracingEventType.ts @@ -5,63 +5,67 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * iRacing Event Type * @export */ export const IracingEventType = { - /** - * Practice - */ - NUMBER_2: 2, - /** - * Qualifying - */ - NUMBER_3: 3, - /** - * Time trial - */ - NUMBER_4: 4, - /** - * Race - */ - NUMBER_5: 5 + /** + * Practice + */ + NUMBER_2: 2, + /** + * Qualifying + */ + NUMBER_3: 3, + /** + * Time trial + */ + NUMBER_4: 4, + /** + * Race + */ + NUMBER_5: 5, } as const; -export type IracingEventType = typeof IracingEventType[keyof typeof IracingEventType]; - +export type IracingEventType = + (typeof IracingEventType)[keyof typeof IracingEventType]; export function instanceOfIracingEventType(value: any): boolean { - for (const key in IracingEventType) { - if (Object.prototype.hasOwnProperty.call(IracingEventType, key)) { - if (IracingEventType[key as keyof typeof IracingEventType] === value) { - return true; - } - } + for (const key in IracingEventType) { + if (Object.prototype.hasOwnProperty.call(IracingEventType, key)) { + if (IracingEventType[key as keyof typeof IracingEventType] === value) { + return true; + } } - return false; + } + return false; } export function IracingEventTypeFromJSON(json: any): IracingEventType { - return IracingEventTypeFromJSONTyped(json, false); + return IracingEventTypeFromJSONTyped(json, false); } -export function IracingEventTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingEventType { - return json as IracingEventType; +export function IracingEventTypeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): IracingEventType { + return json as IracingEventType; } export function IracingEventTypeToJSON(value?: IracingEventType | null): any { - return value as any; + return value as any; } -export function IracingEventTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): IracingEventType { - return value as IracingEventType; +export function IracingEventTypeToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): IracingEventType { + return value as IracingEventType; } - diff --git a/packages/api/client/fetch/src/models/IracingServiceMethodDocs.ts b/packages/api/client/fetch/src/models/IracingServiceMethodDocs.ts index 442c9994..c76bcc08 100644 --- a/packages/api/client/fetch/src/models/IracingServiceMethodDocs.ts +++ b/packages/api/client/fetch/src/models/IracingServiceMethodDocs.ts @@ -5,21 +5,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; -import type { IracingServiceMethodParametersDocs } from './IracingServiceMethodParametersDocs'; +import { mapValues } from "../runtime"; +import type { IracingServiceMethodParametersDocs } from "./IracingServiceMethodParametersDocs"; import { - IracingServiceMethodParametersDocsFromJSON, - IracingServiceMethodParametersDocsFromJSONTyped, - IracingServiceMethodParametersDocsToJSON, - IracingServiceMethodParametersDocsToJSONTyped, -} from './IracingServiceMethodParametersDocs'; + IracingServiceMethodParametersDocsFromJSON, + IracingServiceMethodParametersDocsFromJSONTyped, + IracingServiceMethodParametersDocsToJSON, + IracingServiceMethodParametersDocsToJSONTyped, +} from "./IracingServiceMethodParametersDocs"; /** * An iRacing API Service Method object. @@ -27,65 +27,82 @@ import { * @interface IracingServiceMethodDocs */ export interface IracingServiceMethodDocs { - /** - * - * @type {string} - * @memberof IracingServiceMethodDocs - */ - link: string; - /** - * - * @type {{ [key: string]: IracingServiceMethodParametersDocs; }} - * @memberof IracingServiceMethodDocs - */ - parameters: { [key: string]: IracingServiceMethodParametersDocs; }; - /** - * - * @type {number} - * @memberof IracingServiceMethodDocs - */ - expirationSeconds?: number; + /** + * + * @type {string} + * @memberof IracingServiceMethodDocs + */ + link: string; + /** + * + * @type {{ [key: string]: IracingServiceMethodParametersDocs; }} + * @memberof IracingServiceMethodDocs + */ + parameters: { [key: string]: IracingServiceMethodParametersDocs }; + /** + * + * @type {number} + * @memberof IracingServiceMethodDocs + */ + expirationSeconds?: number; } /** * Check if a given object implements the IracingServiceMethodDocs interface. */ -export function instanceOfIracingServiceMethodDocs(value: object): value is IracingServiceMethodDocs { - if (!('link' in value) || value['link'] === undefined) return false; - if (!('parameters' in value) || value['parameters'] === undefined) return false; - return true; +export function instanceOfIracingServiceMethodDocs( + value: object, +): value is IracingServiceMethodDocs { + if (!("link" in value) || value["link"] === undefined) return false; + if (!("parameters" in value) || value["parameters"] === undefined) + return false; + return true; } -export function IracingServiceMethodDocsFromJSON(json: any): IracingServiceMethodDocs { - return IracingServiceMethodDocsFromJSONTyped(json, false); +export function IracingServiceMethodDocsFromJSON( + json: any, +): IracingServiceMethodDocs { + return IracingServiceMethodDocsFromJSONTyped(json, false); } -export function IracingServiceMethodDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingServiceMethodDocs { - if (json == null) { - return json; - } - return { - - 'link': json['link'], - 'parameters': (mapValues(json['parameters'], IracingServiceMethodParametersDocsFromJSON)), - 'expirationSeconds': json['expirationSeconds'] == null ? undefined : json['expirationSeconds'], - }; +export function IracingServiceMethodDocsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): IracingServiceMethodDocs { + if (json == null) { + return json; + } + return { + link: json["link"], + parameters: mapValues( + json["parameters"], + IracingServiceMethodParametersDocsFromJSON, + ), + expirationSeconds: + json["expirationSeconds"] == null ? undefined : json["expirationSeconds"], + }; } -export function IracingServiceMethodDocsToJSON(json: any): IracingServiceMethodDocs { - return IracingServiceMethodDocsToJSONTyped(json, false); +export function IracingServiceMethodDocsToJSON( + json: any, +): IracingServiceMethodDocs { + return IracingServiceMethodDocsToJSONTyped(json, false); } -export function IracingServiceMethodDocsToJSONTyped(value?: IracingServiceMethodDocs | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function IracingServiceMethodDocsToJSONTyped( + value?: IracingServiceMethodDocs | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'link': value['link'], - 'parameters': (mapValues(value['parameters'], IracingServiceMethodParametersDocsToJSON)), - 'expirationSeconds': value['expirationSeconds'], - }; + return { + link: value["link"], + parameters: mapValues( + value["parameters"], + IracingServiceMethodParametersDocsToJSON, + ), + expirationSeconds: value["expirationSeconds"], + }; } - diff --git a/packages/api/client/fetch/src/models/IracingServiceMethodParametersDocs.ts b/packages/api/client/fetch/src/models/IracingServiceMethodParametersDocs.ts index baf1afb4..bc2bfb1d 100644 --- a/packages/api/client/fetch/src/models/IracingServiceMethodParametersDocs.ts +++ b/packages/api/client/fetch/src/models/IracingServiceMethodParametersDocs.ts @@ -5,78 +5,87 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** * An iRacing API Service Method Parameters object. * @export * @interface IracingServiceMethodParametersDocs */ export interface IracingServiceMethodParametersDocs { - /** - * - * @type {string} - * @memberof IracingServiceMethodParametersDocs - */ - type: string; - /** - * - * @type {string} - * @memberof IracingServiceMethodParametersDocs - */ - note?: string; - /** - * - * @type {boolean} - * @memberof IracingServiceMethodParametersDocs - */ - required?: boolean; + /** + * + * @type {string} + * @memberof IracingServiceMethodParametersDocs + */ + type: string; + /** + * + * @type {string} + * @memberof IracingServiceMethodParametersDocs + */ + note?: string; + /** + * + * @type {boolean} + * @memberof IracingServiceMethodParametersDocs + */ + required?: boolean; } /** * Check if a given object implements the IracingServiceMethodParametersDocs interface. */ -export function instanceOfIracingServiceMethodParametersDocs(value: object): value is IracingServiceMethodParametersDocs { - if (!('type' in value) || value['type'] === undefined) return false; - return true; +export function instanceOfIracingServiceMethodParametersDocs( + value: object, +): value is IracingServiceMethodParametersDocs { + if (!("type" in value) || value["type"] === undefined) return false; + return true; } -export function IracingServiceMethodParametersDocsFromJSON(json: any): IracingServiceMethodParametersDocs { - return IracingServiceMethodParametersDocsFromJSONTyped(json, false); +export function IracingServiceMethodParametersDocsFromJSON( + json: any, +): IracingServiceMethodParametersDocs { + return IracingServiceMethodParametersDocsFromJSONTyped(json, false); } -export function IracingServiceMethodParametersDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): IracingServiceMethodParametersDocs { - if (json == null) { - return json; - } - return { - - 'type': json['type'], - 'note': json['note'] == null ? undefined : json['note'], - 'required': json['required'] == null ? undefined : json['required'], - }; +export function IracingServiceMethodParametersDocsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): IracingServiceMethodParametersDocs { + if (json == null) { + return json; + } + return { + type: json["type"], + note: json["note"] == null ? undefined : json["note"], + required: json["required"] == null ? undefined : json["required"], + }; } -export function IracingServiceMethodParametersDocsToJSON(json: any): IracingServiceMethodParametersDocs { - return IracingServiceMethodParametersDocsToJSONTyped(json, false); +export function IracingServiceMethodParametersDocsToJSON( + json: any, +): IracingServiceMethodParametersDocs { + return IracingServiceMethodParametersDocsToJSONTyped(json, false); } -export function IracingServiceMethodParametersDocsToJSONTyped(value?: IracingServiceMethodParametersDocs | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function IracingServiceMethodParametersDocsToJSONTyped( + value?: IracingServiceMethodParametersDocs | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'type': value['type'], - 'note': value['note'], - 'required': value['required'], - }; + return { + type: value["type"], + note: value["note"], + required: value["required"], + }; } - diff --git a/packages/api/client/fetch/src/models/PostAuthRequest.ts b/packages/api/client/fetch/src/models/PostAuthRequest.ts index 9e407439..36acb041 100644 --- a/packages/api/client/fetch/src/models/PostAuthRequest.ts +++ b/packages/api/client/fetch/src/models/PostAuthRequest.ts @@ -5,71 +5,76 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { mapValues } from '../runtime'; +import { mapValues } from "../runtime"; /** - * + * * @export * @interface PostAuthRequest */ export interface PostAuthRequest { - /** - * - * @type {string} - * @memberof PostAuthRequest - */ - email: string; - /** - * - * @type {string} - * @memberof PostAuthRequest - */ - password: string; + /** + * + * @type {string} + * @memberof PostAuthRequest + */ + email: string; + /** + * + * @type {string} + * @memberof PostAuthRequest + */ + password: string; } /** * Check if a given object implements the PostAuthRequest interface. */ -export function instanceOfPostAuthRequest(value: object): value is PostAuthRequest { - if (!('email' in value) || value['email'] === undefined) return false; - if (!('password' in value) || value['password'] === undefined) return false; - return true; +export function instanceOfPostAuthRequest( + value: object, +): value is PostAuthRequest { + if (!("email" in value) || value["email"] === undefined) return false; + if (!("password" in value) || value["password"] === undefined) return false; + return true; } export function PostAuthRequestFromJSON(json: any): PostAuthRequest { - return PostAuthRequestFromJSONTyped(json, false); + return PostAuthRequestFromJSONTyped(json, false); } -export function PostAuthRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostAuthRequest { - if (json == null) { - return json; - } - return { - - 'email': json['email'], - 'password': json['password'], - }; +export function PostAuthRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): PostAuthRequest { + if (json == null) { + return json; + } + return { + email: json["email"], + password: json["password"], + }; } export function PostAuthRequestToJSON(json: any): PostAuthRequest { - return PostAuthRequestToJSONTyped(json, false); + return PostAuthRequestToJSONTyped(json, false); } -export function PostAuthRequestToJSONTyped(value?: PostAuthRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } +export function PostAuthRequestToJSONTyped( + value?: PostAuthRequest | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } - return { - - 'email': value['email'], - 'password': value['password'], - }; + return { + email: value["email"], + password: value["password"], + }; } - diff --git a/packages/api/client/fetch/src/models/index.ts b/packages/api/client/fetch/src/models/index.ts index db466961..fdb90acb 100644 --- a/packages/api/client/fetch/src/models/index.ts +++ b/packages/api/client/fetch/src/models/index.ts @@ -1,10 +1,10 @@ /* tslint:disable */ /* eslint-disable */ -export * from './ErrorResponse'; -export * from './IracingAPIResponse'; -export * from './IracingCategory'; -export * from './IracingDivision'; -export * from './IracingEventType'; -export * from './IracingServiceMethodDocs'; -export * from './IracingServiceMethodParametersDocs'; -export * from './PostAuthRequest'; +export * from "./ErrorResponse"; +export * from "./IracingAPIResponse"; +export * from "./IracingCategory"; +export * from "./IracingDivision"; +export * from "./IracingEventType"; +export * from "./IracingServiceMethodDocs"; +export * from "./IracingServiceMethodParametersDocs"; +export * from "./PostAuthRequest"; diff --git a/packages/api/client/fetch/src/runtime.ts b/packages/api/client/fetch/src/runtime.ts index 1bed172d..2800ac4b 100644 --- a/packages/api/client/fetch/src/runtime.ts +++ b/packages/api/client/fetch/src/runtime.ts @@ -5,83 +5,94 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const BASE_PATH = "https://members-ng.iracing.com".replace(/\/+$/, ""); export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: + | string + | Promise + | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request } export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - set config(configuration: Configuration) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null + ? this.configuration.basePath + : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === "function" ? apiKey : () => apiKey; } - - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; + return undefined; + } + + get accessToken(): + | ((name?: string, scopes?: string[]) => string | Promise) + | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === "function" + ? accessToken + : async () => accessToken; } + return undefined; + } - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } } export const DefaultConfig = new Configuration(); @@ -90,343 +101,430 @@ export const DefaultConfig = new Configuration(); * This is the base class for all generated API classes. */ export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; + private static readonly jsonRegex = new RegExp( + "^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", + "i", + ); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware( + this: T, + ...preMiddlewares: Array + ) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware( + this: T, + ...postMiddlewares: Array + ) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; + return BaseAPI.jsonRegex.test(mime); + } + + protected async request( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && response.status >= 200 && response.status < 300) { + return response; } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); + throw new ResponseError(response, "Response returned an error code"); + } + + private async createFetchParams( + context: RequestOpts, + initOverrides?: RequestInit | InitOverrideFunction, + ) { + let url = this.configuration.basePath + context.path; + if ( + context.query !== undefined && + Object.keys(context.query).length !== 0 + ) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += "?" + this.configuration.queryParamsStringify(context.query); } - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } + const headers = Object.assign( + {}, + this.configuration.headers, + context.headers, + ); + Object.keys(headers).forEach((key) => + headers[key] === undefined ? delete headers[key] : {}, + ); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })), + }; - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); + let body: any; + if ( + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers["Content-Type"])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; } - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - - const init: RequestInit = { - ...overriddenInit, - body - }; + const init: RequestInit = { + ...overriddenInit, + body, + }; - return { url, init }; + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = + (await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + })) || fetchParams; + } } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)( + fetchParams.url, + fetchParams.init, + ); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = + (await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + })) || response; } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError( + e, + "The request failed and the interceptors did not return an alternative response", + ); + } else { + throw e; } - return response; + } } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; + for (const middleware of this.middleware) { + if (middleware.post) { + response = + (await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + })) || response; + } } -}; + return response; + }; + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +} function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; + return typeof Blob !== "undefined" && value instanceof Blob; } function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; + return typeof FormData !== "undefined" && value instanceof FormData; } export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } + override name: "ResponseError" = "ResponseError"; + constructor( + public response: Response, + msg?: string, + ) { + super(msg); + } } export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } + override name: "FetchError" = "FetchError"; + constructor( + public cause: Error, + msg?: string, + ) { + super(msg); + } } export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } + override name: "RequiredError" = "RequiredError"; + constructor( + public field: string, + msg?: string, + ) { + super(msg); + } } export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", }; -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; +export type FetchAPI = WindowOrWorkerGlobalScope["fetch"]; export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPMethod = + | "GET" + | "POST" + | "PUT" + | "PATCH" + | "DELETE" + | "OPTIONS" + | "HEAD"; export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPQuery = { + [key: string]: + | string + | number + | null + | boolean + | Array + | Set + | HTTPQuery; +}; export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; +export type HTTPRequestInit = { + headers?: HTTPHeaders; + method: HTTPMethod; + credentials?: RequestCredentials; + body?: HTTPBody; +}; +export type ModelPropertyNaming = + | "camelCase" + | "snake_case" + | "PascalCase" + | "original"; -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise +export type InitOverrideFunction = (requestContext: { + init: HTTPRequestInit; + context: RequestOpts; +}) => Promise; export interface FetchParams { - url: string; - init: RequestInit; + url: string; + init: RequestInit; } export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; } -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); +export function querystring(params: HTTPQuery, prefix: string = ""): string { + return Object.keys(params) + .map((key) => querystringSingleKey(key, params[key], prefix)) + .filter((part) => part.length > 0) + .join("&"); } -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +function querystringSingleKey( + key: string, + value: + | string + | number + | null + | undefined + | boolean + | Array + | Set + | HTTPQuery, + keyPrefix: string = "", +): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value + .map((singleValue) => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; } export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; + const value = json[key]; + return value !== null && value !== undefined; } export function mapValues(data: any, fn: (item: any) => any) { - const result: { [key: string]: any } = {}; - for (const key of Object.keys(data)) { - result[key] = fn(data[key]); - } - return result; + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; } export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } + for (const consume of consumes) { + if ("multipart/form-data" === consume.contentType) { + return true; } - return false; + } + return false; } export interface Consume { - contentType: string; + contentType: string; } export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; + fetch: FetchAPI; + url: string; + init: RequestInit; } export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; } export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; } export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; } export interface ApiResponse { - raw: Response; - value(): Promise; + raw: Response; + value(): Promise; } export interface ResponseTransformer { - (json: any): T; + (json: any): T; } export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } + constructor( + public raw: Response, + private transformer: ResponseTransformer = (jsonValue: any) => jsonValue, + ) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } } export class VoidApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return undefined; - } + async value(): Promise { + return undefined; + } } export class BlobApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.blob(); - }; + async value(): Promise { + return await this.raw.blob(); + } } export class TextApiResponse { - constructor(public raw: Response) {} + constructor(public raw: Response) {} - async value(): Promise { - return await this.raw.text(); - }; + async value(): Promise { + return await this.raw.text(); + } } diff --git a/packages/helpers/api-schema-to-openapi/src/index.ts b/packages/helpers/api-schema-to-openapi/src/index.ts index e4a883ad..0c9af4b6 100644 --- a/packages/helpers/api-schema-to-openapi/src/index.ts +++ b/packages/helpers/api-schema-to-openapi/src/index.ts @@ -248,6 +248,7 @@ export async function generateOpenAPISpec({ operationId: "postAuth", tags: ["auth"], requestBody: { + required: true, content: { "application/json": { schema: IRacingAuthParametersSchema, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 09ed169a..741710fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: workspace:* version: link:packages/helpers/oauth-schema-to-openapi '@openapitools/openapi-generator-cli': - specifier: ^2.25.0 - version: 2.25.2(@types/node@24.10.1) + specifier: ^2.31.1 + version: 2.31.1 '@types/google-protobuf': specifier: ^3.15.12 version: 3.15.12 @@ -868,22 +868,17 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@inquirer/external-editor@1.0.3': - resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + '@inquirer/core@6.0.0': + resolution: {integrity: sha512-fKi63Khkisgda3ohnskNf5uZJj+zXOaBvOllHsOkdsXRA/ubQLJQrZchFFi57NKbZzkTunXiBMdvWOv71alonw==} + engines: {node: '>=14.18.0'} - '@isaacs/balanced-match@4.0.1': - resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==} - engines: {node: 20 || >=22} + '@inquirer/select@1.3.3': + resolution: {integrity: sha512-RzlRISXWqIKEf83FDC9ZtJ3JvuK1l7aGpretf41BCWYrvla2wU8W8MTRNMiPrPJ+1SIqrRC1nZdZ60hD9hRXLg==} + engines: {node: '>=14.18.0'} - '@isaacs/brace-expansion@5.0.0': - resolution: {integrity: sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==} - engines: {node: 20 || >=22} + '@inquirer/type@1.5.5': + resolution: {integrity: sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==} + engines: {node: '>=18'} '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} @@ -912,8 +907,8 @@ packages: axios: ^1.3.1 rxjs: ^7.0.0 - '@nestjs/common@11.1.9': - resolution: {integrity: sha512-zDntUTReRbAThIfSp3dQZ9kKqI+LjgLp5YZN5c1bgNRDuoeLySAoZg46Bg1a+uV8TMgIRziHocglKGNzr6l+bQ==} + '@nestjs/common@11.1.17': + resolution: {integrity: sha512-hLODw5Abp8OQgA+mUO4tHou4krKgDtUcM9j5Ihxncst9XeyxYBTt2bwZm4e4EQr5E352S4Fyy6V3iFx9ggxKAg==} peerDependencies: class-transformer: '>=0.4.1' class-validator: '>=0.13.2' @@ -925,8 +920,8 @@ packages: class-validator: optional: true - '@nestjs/core@11.1.9': - resolution: {integrity: sha512-a00B0BM4X+9z+t3UxJqIZlemIwCQdYoPKrMcM+ky4z3pkqqG1eTWexjs+YXpGObnLnjtMPVKWlcZHp3adDYvUw==} + '@nestjs/core@11.1.18': + resolution: {integrity: sha512-wR3DtGyk/LUAiPtbXDuWJJwVkWElKBY0sqnTzf9d4uM3+X18FRZhK7WFc47czsIGOdWuRsMeLYV+1Z9dO4zDEQ==} engines: {node: '>= 20'} peerDependencies: '@nestjs/common': ^11.0.0 @@ -953,9 +948,9 @@ packages: engines: {node: '>=8.0.0', npm: '>=5.0.0'} hasBin: true - '@openapitools/openapi-generator-cli@2.25.2': - resolution: {integrity: sha512-TXElbW1NXCy0EECXiO5AD2ZzT1dmaCs41Z8t3pBUGaJf8zgF/Lm0P6GRhVEpw29iHBNjZcy8nrgQ1acUfuCdng==} - engines: {node: '>=16'} + '@openapitools/openapi-generator-cli@2.31.1': + resolution: {integrity: sha512-dPE+COjNLLTHFQ1lddUvpo+J8YQB1RD3/NVRJ3K+1hPZnyuxCURgOCmr7mXgHEyHmzWH8dKXWm/pD170iVR0vw==} + engines: {node: '>=20.19.0'} hasBin: true '@pinojs/redact@0.4.0': @@ -1012,8 +1007,8 @@ packages: resolution: {integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==} engines: {node: '>=4'} - '@tokenizer/inflate@0.3.1': - resolution: {integrity: sha512-4oeoZEBQdLdt5WmP/hx1KZ6D3/Oid/0cUb2nk4F0pTDAWy+KCH3/EnAkZF/bvckWo8I33EqBm01lIPgmgc8rCA==} + '@tokenizer/inflate@0.4.1': + resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} engines: {node: '>=18'} '@tokenizer/token@0.3.0': @@ -1070,9 +1065,15 @@ packages: '@types/luxon@3.7.1': resolution: {integrity: sha512-H3iskjFIAn5SlJU7OuxUmTEpebK6TKB8rxZShDslBMZJ5u9S//KM1sbdAisiSrqwLQncVjnpi2OK2J51h+4lsg==} + '@types/mute-stream@0.0.4': + resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} + '@types/node@12.20.42': resolution: {integrity: sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw==} + '@types/node@20.19.39': + resolution: {integrity: sha512-orrrD74MBUyK8jOAD/r0+lfa1I2MO6I+vAkmAWzMYbCcgrN4lCrmK52gRFQq/JRxfYPfonkr4b0jcY7Olqdqbw==} + '@types/node@24.10.1': resolution: {integrity: sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==} @@ -1091,6 +1092,9 @@ packages: '@types/serve-static@2.2.0': resolution: {integrity: sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==} + '@types/wrap-ansi@3.0.0': + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} + '@types/ws@8.18.1': resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} @@ -1254,15 +1258,23 @@ packages: axios@1.13.2: resolution: {integrity: sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==} + axios@1.15.1: + resolution: {integrity: sha512-WOG+Jj8ZOvR0a3rAn+Tuf1UQJRxw5venr6DgdbJzngJE3qG7X0kL83CZGpdHMxEm+ZK3seAbvFsw4FfOfP9vxg==} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} basic-ftp@5.0.5: resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} engines: {node: '>=10.0.0'} + deprecated: Security vulnerability fixed in 5.2.1, please upgrade better-call@1.1.4: resolution: {integrity: sha512-NJouLY6IVKv0nDuFoc6FcbKDFzEnmgMNofC9F60Mwx1Ecm7X6/Ecyoe5b+JSVZ42F/0n46/M89gbYP1ZCVv8xQ==} @@ -1275,9 +1287,6 @@ packages: bl@1.2.3: resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} - bl@4.1.0: - resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - body-parser@2.2.1: resolution: {integrity: sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==} engines: {node: '>=18'} @@ -1288,6 +1297,10 @@ packages: brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} + brace-expansion@5.0.5: + resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} + engines: {node: 18 || 20 || >=22} + buffer-alloc-unsafe@1.1.0: resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} @@ -1333,20 +1346,13 @@ packages: change-case@5.4.4: resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} - chardet@2.1.1: - resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} - - cli-cursor@3.1.0: - resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} - engines: {node: '>=8'} - cli-spinners@2.9.2: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} engines: {node: '>=6'} - cli-width@3.0.0: - resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} - engines: {node: '>= 10'} + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} @@ -1778,9 +1784,6 @@ packages: picomatch: optional: true - fflate@0.8.2: - resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} - figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} @@ -1793,8 +1796,8 @@ packages: resolution: {integrity: sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g==} engines: {node: '>=6'} - file-type@21.1.0: - resolution: {integrity: sha512-boU4EHmP3JXkwDo4uhyBhTt5pPstxB6eEXKJBu2yu2l7aAMMm7QQYQEzssJmKReZYrFdFOJS8koVo6bXIBGDqA==} + file-type@21.3.2: + resolution: {integrity: sha512-DLkUvGwep3poOV2wpzbHCOnSKGk1LzyXTv+aHFgN2VFl96wnp8YA9YjO2qPzg5PuL8q/SW9Pdi6WTkYOIh995w==} engines: {node: '>=20'} file-type@3.9.0: @@ -1871,6 +1874,10 @@ packages: resolution: {integrity: sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==} engines: {node: '>=14.14'} + fs-extra@11.3.4: + resolution: {integrity: sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==} + engines: {node: '>=14.14'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1929,9 +1936,9 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@13.0.0: - resolution: {integrity: sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==} - engines: {node: 20 || >=22} + glob@13.0.6: + resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} + engines: {node: 18 || 20 || >=22} globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} @@ -2039,10 +2046,6 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - inquirer@8.2.7: - resolution: {integrity: sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==} - engines: {node: '>=12.0.0'} - internal-slot@1.1.0: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} @@ -2111,10 +2114,6 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} - is-interactive@1.0.0: - resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} - engines: {node: '>=8'} - is-map@2.0.3: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} @@ -2172,10 +2171,6 @@ packages: resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} @@ -2277,10 +2272,6 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - long@5.3.2: resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} @@ -2343,17 +2334,13 @@ packages: resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} engines: {node: '>=18'} - mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - mimic-response@1.0.1: resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} engines: {node: '>=4'} - minimatch@10.1.1: - resolution: {integrity: sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==} - engines: {node: 20 || >=22} + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + engines: {node: 18 || 20 || >=22} minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -2369,15 +2356,16 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} engines: {node: '>=16 || 14 >=14.17'} ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - mute-stream@0.0.8: - resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + mute-stream@1.0.0: + resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -2445,10 +2433,6 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} - openapi-fetch@0.15.0: resolution: {integrity: sha512-OjQUdi61WO4HYhr9+byCPMj0+bgste/LtSBEcV6FzDdONTs7x0fWn8/ndoYwzqCsKWIxEZwo4FN/TG1c1rI8IQ==} @@ -2465,10 +2449,6 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - ora@5.4.1: - resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} - engines: {node: '>=10'} - own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} @@ -2532,13 +2512,16 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@2.0.1: - resolution: {integrity: sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==} - engines: {node: 20 || >=22} + path-scurry@2.0.2: + resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} + engines: {node: 18 || 20 || >=22} path-to-regexp@8.3.0: resolution: {integrity: sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==} + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} @@ -2648,6 +2631,10 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + proxy-from-env@2.1.0: + resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} + engines: {node: '>=10'} + pump@3.0.3: resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==} @@ -2677,10 +2664,6 @@ packages: readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} - real-require@0.2.0: resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} engines: {node: '>= 12.13.0'} @@ -2719,10 +2702,6 @@ packages: responselike@1.0.2: resolution: {integrity: sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==} - restore-cursor@3.1.0: - resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} - engines: {node: '>=8'} - rou3@0.7.10: resolution: {integrity: sha512-aoFj6f7MJZ5muJ+Of79nrhs9N3oLGqi2VEMe94Zbkjb6Wupha46EuoYgpWSOZlXww3bbd8ojgXTAA2mzimX5Ww==} @@ -2730,8 +2709,8 @@ packages: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} - run-async@2.4.1: - resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + run-async@3.0.0: + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} engines: {node: '>=0.12.0'} rxjs@7.8.2: @@ -2836,8 +2815,9 @@ packages: resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} @@ -2905,9 +2885,6 @@ packages: string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -3083,6 +3060,9 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} @@ -3396,18 +3376,34 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/external-editor@1.0.3(@types/node@24.10.1)': + '@inquirer/core@6.0.0': dependencies: - chardet: 2.1.1 - iconv-lite: 0.7.0 - optionalDependencies: - '@types/node': 24.10.1 + '@inquirer/type': 1.5.5 + '@types/mute-stream': 0.0.4 + '@types/node': 20.19.39 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-spinners: 2.9.2 + cli-width: 4.1.0 + figures: 3.2.0 + mute-stream: 1.0.0 + run-async: 3.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 - '@isaacs/balanced-match@4.0.1': {} + '@inquirer/select@1.3.3': + dependencies: + '@inquirer/core': 6.0.0 + '@inquirer/type': 1.5.5 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + figures: 3.2.0 - '@isaacs/brace-expansion@5.0.0': + '@inquirer/type@1.5.5': dependencies: - '@isaacs/balanced-match': 4.0.1 + mute-stream: 1.0.0 '@jridgewell/resolve-uri@3.1.2': {} @@ -3424,15 +3420,15 @@ snapshots: '@lukeed/csprng@1.1.0': {} - '@nestjs/axios@4.0.1(@nestjs/common@11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2))(axios@1.13.2)(rxjs@7.8.2)': + '@nestjs/axios@4.0.1(@nestjs/common@11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2))(axios@1.15.1)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2) - axios: 1.13.2 + '@nestjs/common': 11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2) + axios: 1.15.1 rxjs: 7.8.2 - '@nestjs/common@11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/common@11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - file-type: 21.1.0 + file-type: 21.3.2 iterare: 1.2.1 load-esm: 1.0.3 reflect-metadata: 0.2.2 @@ -3442,13 +3438,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@nestjs/core@11.1.9(@nestjs/common@11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/core@11.1.18(@nestjs/common@11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nuxt/opencollective': 0.4.1 fast-safe-stringify: 2.1.1 iterare: 1.2.1 - path-to-regexp: 8.3.0 + path-to-regexp: 8.4.2 reflect-metadata: 0.2.2 rxjs: 7.8.2 tslib: 2.8.1 @@ -3466,21 +3462,21 @@ snapshots: transitivePeerDependencies: - encoding - '@openapitools/openapi-generator-cli@2.25.2(@types/node@24.10.1)': + '@openapitools/openapi-generator-cli@2.31.1': dependencies: - '@nestjs/axios': 4.0.1(@nestjs/common@11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2))(axios@1.13.2)(rxjs@7.8.2) - '@nestjs/common': 11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.9(@nestjs/common@11.1.9(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@inquirer/select': 1.3.3 + '@nestjs/axios': 4.0.1(@nestjs/common@11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2))(axios@1.15.1)(rxjs@7.8.2) + '@nestjs/common': 11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.18(@nestjs/common@11.1.17(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nuxtjs/opencollective': 0.3.2 - axios: 1.13.2 + axios: 1.15.1 chalk: 4.1.2 commander: 8.3.0 compare-versions: 6.1.1 concurrently: 9.2.1 console.table: 0.10.0 - fs-extra: 11.3.2 - glob: 13.0.0 - inquirer: 8.2.7(@types/node@24.10.1) + fs-extra: 11.3.4 + glob: 13.0.6 proxy-agent: 6.5.0 reflect-metadata: 0.2.2 rxjs: 7.8.2 @@ -3489,7 +3485,6 @@ snapshots: - '@nestjs/microservices' - '@nestjs/platform-express' - '@nestjs/websockets' - - '@types/node' - class-transformer - class-validator - debug @@ -3550,10 +3545,9 @@ snapshots: '@sindresorhus/is@0.7.0': {} - '@tokenizer/inflate@0.3.1': + '@tokenizer/inflate@0.4.1': dependencies: debug: 4.4.3(supports-color@10.2.2) - fflate: 0.8.2 token-types: 6.1.1 transitivePeerDependencies: - supports-color @@ -3610,8 +3604,16 @@ snapshots: '@types/luxon@3.7.1': {} + '@types/mute-stream@0.0.4': + dependencies: + '@types/node': 24.10.1 + '@types/node@12.20.42': {} + '@types/node@20.19.39': + dependencies: + undici-types: 6.21.0 + '@types/node@24.10.1': dependencies: undici-types: 7.16.0 @@ -3633,6 +3635,8 @@ snapshots: '@types/http-errors': 2.0.5 '@types/node': 24.10.1 + '@types/wrap-ansi@3.0.0': {} + '@types/ws@8.18.1': dependencies: '@types/node': 24.10.1 @@ -3848,8 +3852,18 @@ snapshots: transitivePeerDependencies: - debug + axios@1.15.1: + dependencies: + follow-redirects: 1.15.11 + form-data: 4.0.5 + proxy-from-env: 2.1.0 + transitivePeerDependencies: + - debug + balanced-match@1.0.2: {} + balanced-match@4.0.4: {} + base64-js@1.5.1: {} basic-ftp@5.0.5: {} @@ -3877,12 +3891,6 @@ snapshots: readable-stream: 2.3.8 safe-buffer: 5.2.1 - bl@4.1.0: - dependencies: - buffer: 5.7.1 - inherits: 2.0.4 - readable-stream: 3.6.2 - body-parser@2.2.1: dependencies: bytes: 3.1.2 @@ -3906,6 +3914,10 @@ snapshots: dependencies: balanced-match: 1.0.2 + brace-expansion@5.0.5: + dependencies: + balanced-match: 4.0.4 + buffer-alloc-unsafe@1.1.0: {} buffer-alloc@1.2.0: @@ -3960,15 +3972,9 @@ snapshots: change-case@5.4.4: {} - chardet@2.1.1: {} - - cli-cursor@3.1.0: - dependencies: - restore-cursor: 3.1.0 - cli-spinners@2.9.2: {} - cli-width@3.0.0: {} + cli-width@4.1.0: {} cliui@8.0.1: dependencies: @@ -3980,7 +3986,8 @@ snapshots: dependencies: mimic-response: 1.0.1 - clone@1.0.4: {} + clone@1.0.4: + optional: true color-convert@2.0.1: dependencies: @@ -4133,6 +4140,7 @@ snapshots: defaults@1.0.4: dependencies: clone: 1.0.4 + optional: true define-data-property@1.1.4: dependencies: @@ -4521,8 +4529,6 @@ snapshots: optionalDependencies: picomatch: 4.0.3 - fflate@0.8.2: {} - figures@3.2.0: dependencies: escape-string-regexp: 1.0.5 @@ -4533,9 +4539,9 @@ snapshots: file-type@11.1.0: {} - file-type@21.1.0: + file-type@21.3.2: dependencies: - '@tokenizer/inflate': 0.3.1 + '@tokenizer/inflate': 0.4.1 strtok3: 10.3.4 token-types: 6.1.1 uint8array-extras: 1.5.0 @@ -4612,6 +4618,12 @@ snapshots: jsonfile: 6.2.0 universalify: 2.0.1 + fs-extra@11.3.4: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.2.0 + universalify: 2.0.1 + fsevents@2.3.3: optional: true @@ -4683,11 +4695,11 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@13.0.0: + glob@13.0.6: dependencies: - minimatch: 10.1.1 - minipass: 7.1.2 - path-scurry: 2.0.1 + minimatch: 10.2.5 + minipass: 7.1.3 + path-scurry: 2.0.2 globals@14.0.0: {} @@ -4801,26 +4813,6 @@ snapshots: inherits@2.0.4: {} - inquirer@8.2.7(@types/node@24.10.1): - dependencies: - '@inquirer/external-editor': 1.0.3(@types/node@24.10.1) - ansi-escapes: 4.3.2 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-width: 3.0.0 - figures: 3.2.0 - lodash: 4.17.21 - mute-stream: 0.0.8 - ora: 5.4.1 - run-async: 2.4.1 - rxjs: 7.8.2 - string-width: 4.2.3 - strip-ansi: 6.0.1 - through: 2.3.8 - wrap-ansi: 6.2.0 - transitivePeerDependencies: - - '@types/node' - internal-slot@1.1.0: dependencies: es-errors: 1.3.0 @@ -4896,8 +4888,6 @@ snapshots: dependencies: is-extglob: 2.1.1 - is-interactive@1.0.0: {} - is-map@2.0.3: {} is-natural-number@4.0.1: {} @@ -4947,8 +4937,6 @@ snapshots: dependencies: which-typed-array: 1.1.19 - is-unicode-supported@0.1.0: {} - is-weakmap@2.0.2: {} is-weakref@1.1.1: @@ -5042,11 +5030,6 @@ snapshots: lodash@4.17.21: {} - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - long@5.3.2: {} lowercase-keys@1.0.0: {} @@ -5088,13 +5071,11 @@ snapshots: dependencies: mime-db: 1.54.0 - mimic-fn@2.1.0: {} - mimic-response@1.0.1: {} - minimatch@10.1.1: + minimatch@10.2.5: dependencies: - '@isaacs/brace-expansion': 5.0.0 + brace-expansion: 5.0.5 minimatch@3.1.2: dependencies: @@ -5110,11 +5091,11 @@ snapshots: minimist@1.2.8: {} - minipass@7.1.2: {} + minipass@7.1.3: {} ms@2.1.3: {} - mute-stream@0.0.8: {} + mute-stream@1.0.0: {} natural-compare@1.4.0: {} @@ -5179,10 +5160,6 @@ snapshots: dependencies: wrappy: 1.0.2 - onetime@5.1.2: - dependencies: - mimic-fn: 2.1.0 - openapi-fetch@0.15.0: dependencies: openapi-typescript-helpers: 0.0.15 @@ -5208,18 +5185,6 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - ora@5.4.1: - dependencies: - bl: 4.1.0 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.9.2 - is-interactive: 1.0.0 - is-unicode-supported: 0.1.0 - log-symbols: 4.1.0 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - own-keys@1.0.1: dependencies: get-intrinsic: 1.3.0 @@ -5284,13 +5249,15 @@ snapshots: path-parse@1.0.7: {} - path-scurry@2.0.1: + path-scurry@2.0.2: dependencies: lru-cache: 11.2.4 - minipass: 7.1.2 + minipass: 7.1.3 path-to-regexp@8.3.0: {} + path-to-regexp@8.4.2: {} + pend@1.2.0: {} picocolors@1.1.1: {} @@ -5415,6 +5382,8 @@ snapshots: proxy-from-env@1.1.0: {} + proxy-from-env@2.1.0: {} + pump@3.0.3: dependencies: end-of-stream: 1.4.5 @@ -5453,12 +5422,6 @@ snapshots: string_decoder: 1.1.1 util-deprecate: 1.0.2 - readable-stream@3.6.2: - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - real-require@0.2.0: {} reflect-metadata@0.2.2: {} @@ -5501,11 +5464,6 @@ snapshots: dependencies: lowercase-keys: 1.0.1 - restore-cursor@3.1.0: - dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 - rou3@0.7.10: {} router@2.2.0: @@ -5518,7 +5476,7 @@ snapshots: transitivePeerDependencies: - supports-color - run-async@2.4.1: {} + run-async@3.0.0: {} rxjs@7.8.2: dependencies: @@ -5650,7 +5608,7 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 - signal-exit@3.0.7: {} + signal-exit@4.1.0: {} smart-buffer@4.2.0: {} @@ -5730,10 +5688,6 @@ snapshots: dependencies: safe-buffer: 5.1.2 - string_decoder@1.3.0: - dependencies: - safe-buffer: 5.2.1 - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -5926,6 +5880,8 @@ snapshots: buffer: 5.7.1 through: 2.3.8 + undici-types@6.21.0: {} + undici-types@7.16.0: {} universalify@2.0.1: {} @@ -5951,6 +5907,7 @@ snapshots: wcwidth@1.0.1: dependencies: defaults: 1.0.4 + optional: true webidl-conversions@3.0.1: {} diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..fb6d6340 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +max_width = 100 +newline_style = "Unix" +use_small_heuristics = "Default" diff --git a/scripts/openapi-generator-axios.sh b/scripts/openapi-generator-axios.sh new file mode 100755 index 00000000..012d0b9c --- /dev/null +++ b/scripts/openapi-generator-axios.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +set -eu + +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" +ROOT_DIR="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)" + +export OPENAPI_GENERATOR="$ROOT_DIR/node_modules/.bin/openapi-generator-cli" +export TS_POST_PROCESS_FILE="$SCRIPT_DIR/openapi-generator-ts-post-process.sh" +export OPENAPI_DOC="$ROOT_DIR/openapi/iracing.json" +export OUTPUT_PACKAGE="$ROOT_DIR/packages/api/client/axios" + +$OPENAPI_GENERATOR generate \ + --enable-post-process-file \ + -g typescript-axios \ + -i $OPENAPI_DOC \ + -o $OUTPUT_PACKAGE \ + --additional-properties=useSingleRequestParameter=true,paramNaming='snake_case',npmName='@iracing-data/api-client-axios' diff --git a/scripts/openapi-generator-fetch.sh b/scripts/openapi-generator-fetch.sh new file mode 100755 index 00000000..b48928b1 --- /dev/null +++ b/scripts/openapi-generator-fetch.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +set -eu + +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" +ROOT_DIR="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)" + +export OPENAPI_GENERATOR="$ROOT_DIR/node_modules/.bin/openapi-generator-cli" +export TS_POST_PROCESS_FILE="$SCRIPT_DIR/openapi-generator-ts-post-process.sh" +export OPENAPI_DOC="$ROOT_DIR/openapi/iracing.json" +export OUTPUT_PACKAGE="$ROOT_DIR/packages/api/client/fetch" + +$OPENAPI_GENERATOR generate \ + --enable-post-process-file \ + -g typescript-fetch \ + -i $OPENAPI_DOC \ + -o $OUTPUT_PACKAGE \ + --additional-properties=useSingleRequestParameter=true,paramNaming='snake_case',npmName='@iracing-data/api-client-fetch' diff --git a/scripts/openapi-generator-rust-post-process.sh b/scripts/openapi-generator-rust-post-process.sh new file mode 100755 index 00000000..474d3bf9 --- /dev/null +++ b/scripts/openapi-generator-rust-post-process.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +set -eu + +FILE_PATH="${1:-}" + +if [ -z "$FILE_PATH" ]; then + exit 0 +fi + +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" +ROOT_DIR="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)" + +case "$FILE_PATH" in + *.rs) + rustfmt --edition 2021 --config-path "$ROOT_DIR" "$FILE_PATH" + ;; +esac diff --git a/scripts/openapi-generator-rust.sh b/scripts/openapi-generator-rust.sh new file mode 100755 index 00000000..adc506ee --- /dev/null +++ b/scripts/openapi-generator-rust.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env sh + +set -eu + +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" +ROOT_DIR="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)" + +export OPENAPI_GENERATOR="$ROOT_DIR/node_modules/.bin/openapi-generator-cli" +export RUST_POST_PROCESS_FILE="$SCRIPT_DIR/openapi-generator-rust-post-process.sh" +export OPENAPI_DOC="$ROOT_DIR/openapi/iracing.json" +export OUTPUT_PACKAGE="$ROOT_DIR/crates/iracing-data-api-client" + +$OPENAPI_GENERATOR generate \ + --enable-post-process-file \ + -g rust \ + -i $OPENAPI_DOC \ + -o $OUTPUT_PACKAGE \ + --additional-properties=useSingleRequestParameter=true,packageName='iracing-data-api-client',topLevelApiClient=true,useChrono=true + +if ! grep -q '^\[lints\]' "$OUTPUT_PACKAGE/Cargo.toml"; then + cat <<'EOF' >> "$OUTPUT_PACKAGE/Cargo.toml" + +[lints] +workspace = true +EOF +fi diff --git a/scripts/openapi-generator-ts-post-process.sh b/scripts/openapi-generator-ts-post-process.sh new file mode 100755 index 00000000..8cfd874e --- /dev/null +++ b/scripts/openapi-generator-ts-post-process.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +set -eu + +FILE_PATH="${1:-}" + +if [ -z "$FILE_PATH" ]; then + exit 0 +fi + +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" +ROOT_DIR="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)" + +case "$FILE_PATH" in + *.ts|*.tsx|*.js|*.mjs|*.cjs|*.json|*.md|*.yaml|*.yml) + pnpm --dir "$ROOT_DIR" exec prettier --write "$FILE_PATH" + ;; +esac + +case "$FILE_PATH" in + *.ts|*.tsx|*.js|*.mjs|*.cjs) + pnpm --dir "$ROOT_DIR" exec eslint --fix --no-warn-ignored "$FILE_PATH" + ;; +esac