added api
This commit is contained in:
23
src/api/.openapi-generator-ignore
Normal file
23
src/api/.openapi-generator-ignore
Normal file
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
22
src/api/.openapi-generator/FILES
Normal file
22
src/api/.openapi-generator/FILES
Normal file
@@ -0,0 +1,22 @@
|
||||
.openapi-generator-ignore
|
||||
apis/MatchesApi.ts
|
||||
apis/PlayersApi.ts
|
||||
apis/index.ts
|
||||
index.ts
|
||||
models/Match.ts
|
||||
models/MatchChat.ts
|
||||
models/MatchWeapons.ts
|
||||
models/Player.ts
|
||||
models/PlayerMatchStats.ts
|
||||
models/PlayerMate.ts
|
||||
models/PlayerMeta.ts
|
||||
models/PlayerMetaWeaponDmg.ts
|
||||
models/Stats.ts
|
||||
models/StatsDmg.ts
|
||||
models/StatsFlash.ts
|
||||
models/StatsFlashDuration.ts
|
||||
models/StatsFlashTotal.ts
|
||||
models/StatsMultiKills.ts
|
||||
models/StatsRank.ts
|
||||
models/index.ts
|
||||
runtime.ts
|
1
src/api/.openapi-generator/VERSION
Normal file
1
src/api/.openapi-generator/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
5.4.0
|
313
src/api/apis/MatchesApi.ts
Normal file
313
src/api/apis/MatchesApi.ts
Normal file
@@ -0,0 +1,313 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* 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 {
|
||||
Match,
|
||||
MatchChat,
|
||||
MatchChatFromJSON,
|
||||
MatchFromJSON,
|
||||
MatchWeapons,
|
||||
MatchWeaponsFromJSON,
|
||||
} from "@/api/models";
|
||||
|
||||
export interface GetMatchRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface GetMatchChatRequest {
|
||||
id: string;
|
||||
translated?: GetMatchChatTranslatedEnum;
|
||||
}
|
||||
|
||||
export interface GetMatchRoundsRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface GetMatchWeaponsRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface GetMatchesRequest {
|
||||
after?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class MatchesApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Get match by matchID
|
||||
* gets match by MatchID
|
||||
*/
|
||||
async getMatchRaw(
|
||||
requestParameters: GetMatchRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<Match & object>> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling getMatch."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/match/{id}`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
// @ts-ignore
|
||||
return new runtime.JSONApiResponse(
|
||||
response,
|
||||
// @ts-ignore
|
||||
(jsonValue) => Match & objectFromJSON(jsonValue)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get match by matchID
|
||||
* gets match by MatchID
|
||||
*/
|
||||
async getMatch(
|
||||
requestParameters: GetMatchRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<Match & object> {
|
||||
const response = await this.getMatchRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get match-chat by MatchID
|
||||
* gets match-chat by MatchID
|
||||
*/
|
||||
async getMatchChatRaw(
|
||||
requestParameters: GetMatchChatRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<MatchChat>> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling getMatchChat."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.translated !== undefined) {
|
||||
queryParameters["translated"] = requestParameters.translated;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/match/{id}/chat`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
MatchChatFromJSON(jsonValue)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get match-chat by MatchID
|
||||
* gets match-chat by MatchID
|
||||
*/
|
||||
async getMatchChat(
|
||||
requestParameters: GetMatchChatRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<MatchChat> {
|
||||
const response = await this.getMatchChatRaw(
|
||||
requestParameters,
|
||||
initOverrides
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get match-rounds by MatchID
|
||||
* gets match-rounds by MatchID
|
||||
*/
|
||||
async getMatchRoundsRaw(
|
||||
requestParameters: GetMatchRoundsRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<
|
||||
runtime.ApiResponse<{ [key: string]: { [key: string]: Array<number> } }>
|
||||
> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling getMatchRounds."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/match/{id}/rounds`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get match-rounds by MatchID
|
||||
* gets match-rounds by MatchID
|
||||
*/
|
||||
async getMatchRounds(
|
||||
requestParameters: GetMatchRoundsRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<{ [key: string]: { [key: string]: Array<number> } }> {
|
||||
const response = await this.getMatchRoundsRaw(
|
||||
requestParameters,
|
||||
initOverrides
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get match-weapons by MatchID
|
||||
* gets match-weapons by MatchID
|
||||
*/
|
||||
async getMatchWeaponsRaw(
|
||||
requestParameters: GetMatchWeaponsRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<MatchWeapons>> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling getMatchWeapons."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/match/{id}/weapons`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
MatchWeaponsFromJSON(jsonValue)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get match-weapons by MatchID
|
||||
* gets match-weapons by MatchID
|
||||
*/
|
||||
async getMatchWeapons(
|
||||
requestParameters: GetMatchWeaponsRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<MatchWeapons> {
|
||||
const response = await this.getMatchWeaponsRaw(
|
||||
requestParameters,
|
||||
initOverrides
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last 10 matches
|
||||
* gets matches
|
||||
*/
|
||||
async getMatchesRaw(
|
||||
requestParameters: GetMatchesRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<Match>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.after !== undefined) {
|
||||
queryParameters["after"] = requestParameters.after;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/matches`,
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
MatchFromJSON(jsonValue)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last 10 matches
|
||||
* gets matches
|
||||
*/
|
||||
async getMatches(
|
||||
requestParameters: GetMatchesRequest = {},
|
||||
initOverrides?: RequestInit
|
||||
): Promise<Match> {
|
||||
const response = await this.getMatchesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum GetMatchChatTranslatedEnum {
|
||||
NUMBER_0 = 0,
|
||||
NUMBER_1 = 1,
|
||||
}
|
286
src/api/apis/PlayersApi.ts
Normal file
286
src/api/apis/PlayersApi.ts
Normal file
@@ -0,0 +1,286 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* 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 { Player, PlayerMeta } from "@/api/models";
|
||||
import { PlayerFromJSON, PlayerMetaFromJSON } from "@/api/models";
|
||||
|
||||
export interface DeletePlayerTrackRequest {
|
||||
id: string;
|
||||
authcode: string;
|
||||
}
|
||||
|
||||
export interface GetPlayerRequest {
|
||||
id: string;
|
||||
after?: number;
|
||||
}
|
||||
|
||||
export interface GetPlayerMetaRequest {
|
||||
id: string;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
export interface PostPlayerTrackRequest {
|
||||
id: string;
|
||||
authcode: string;
|
||||
sharecode?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class PlayersApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Delete player steamid64 and authcode to delete tracked status
|
||||
* deletes tracked player with steamid64 by authCode
|
||||
*/
|
||||
async deletePlayerTrackRaw(
|
||||
requestParameters: DeletePlayerTrackRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling deletePlayerTrack."
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
requestParameters.authcode === null ||
|
||||
requestParameters.authcode === undefined
|
||||
) {
|
||||
throw new runtime.RequiredError(
|
||||
"authcode",
|
||||
"Required parameter requestParameters.authcode was null or undefined when calling deletePlayerTrack."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.authcode !== undefined) {
|
||||
queryParameters["authcode"] = requestParameters.authcode;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/player/{id}/track`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "DELETE",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete player steamid64 and authcode to delete tracked status
|
||||
* deletes tracked player with steamid64 by authCode
|
||||
*/
|
||||
async deletePlayerTrack(
|
||||
requestParameters: DeletePlayerTrackRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<void> {
|
||||
await this.deletePlayerTrackRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get player by steamid64
|
||||
* gets player by steamID64
|
||||
*/
|
||||
async getPlayerRaw(
|
||||
requestParameters: GetPlayerRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<Player>> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling getPlayer."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.after !== undefined) {
|
||||
queryParameters["after"] = requestParameters.after;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/player/{id}`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
PlayerFromJSON(jsonValue)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get player by steamid64
|
||||
* gets player by steamID64
|
||||
*/
|
||||
async getPlayer(
|
||||
requestParameters: GetPlayerRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<Player> {
|
||||
const response = await this.getPlayerRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get player-meta by steamid64
|
||||
* gets player-meta by steamID64
|
||||
*/
|
||||
async getPlayerMetaRaw(
|
||||
requestParameters: GetPlayerMetaRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<PlayerMeta>> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling getPlayerMeta."
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
requestParameters.limit === null ||
|
||||
requestParameters.limit === undefined
|
||||
) {
|
||||
throw new runtime.RequiredError(
|
||||
"limit",
|
||||
"Required parameter requestParameters.limit was null or undefined when calling getPlayerMeta."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.limit !== undefined) {
|
||||
queryParameters["limit"] = requestParameters.limit;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/player/{id}/meta`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "GET",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
||||
PlayerMetaFromJSON(jsonValue)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get player-meta by steamid64
|
||||
* gets player-meta by steamID64
|
||||
*/
|
||||
async getPlayerMeta(
|
||||
requestParameters: GetPlayerMetaRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<PlayerMeta> {
|
||||
const response = await this.getPlayerMetaRaw(
|
||||
requestParameters,
|
||||
initOverrides
|
||||
);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Post player steamid64, authcode (and sharecode) to track games
|
||||
* tracks player with steamid64 by authCode
|
||||
*/
|
||||
async postPlayerTrackRaw(
|
||||
requestParameters: PostPlayerTrackRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.id === null || requestParameters.id === undefined) {
|
||||
throw new runtime.RequiredError(
|
||||
"id",
|
||||
"Required parameter requestParameters.id was null or undefined when calling postPlayerTrack."
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
requestParameters.authcode === null ||
|
||||
requestParameters.authcode === undefined
|
||||
) {
|
||||
throw new runtime.RequiredError(
|
||||
"authcode",
|
||||
"Required parameter requestParameters.authcode was null or undefined when calling postPlayerTrack."
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.authcode !== undefined) {
|
||||
queryParameters["authcode"] = requestParameters.authcode;
|
||||
}
|
||||
|
||||
if (requestParameters.sharecode !== undefined) {
|
||||
queryParameters["sharecode"] = requestParameters.sharecode;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request(
|
||||
{
|
||||
path: `/player/{id}/track`.replace(
|
||||
`{${"id"}}`,
|
||||
encodeURIComponent(String(requestParameters.id))
|
||||
),
|
||||
method: "POST",
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
},
|
||||
initOverrides
|
||||
);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Post player steamid64, authcode (and sharecode) to track games
|
||||
* tracks player with steamid64 by authCode
|
||||
*/
|
||||
async postPlayerTrack(
|
||||
requestParameters: PostPlayerTrackRequest,
|
||||
initOverrides?: RequestInit
|
||||
): Promise<void> {
|
||||
await this.postPlayerTrackRaw(requestParameters, initOverrides);
|
||||
}
|
||||
}
|
4
src/api/apis/index.ts
Normal file
4
src/api/apis/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './MatchesApi';
|
||||
export * from './PlayersApi';
|
5
src/api/index.ts
Normal file
5
src/api/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './runtime';
|
||||
export * from './apis';
|
||||
export * from './models';
|
171
src/api/models/Match.ts
Normal file
171
src/api/models/Match.ts
Normal file
@@ -0,0 +1,171 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Match
|
||||
*/
|
||||
export interface Match {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Match
|
||||
*/
|
||||
matchId: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Match
|
||||
*/
|
||||
shareCode?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Match
|
||||
*/
|
||||
map: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Match
|
||||
*/
|
||||
date: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<number>}
|
||||
* @memberof Match
|
||||
*/
|
||||
score: Array<number>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Match
|
||||
*/
|
||||
duration: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Match
|
||||
*/
|
||||
matchResult: MatchMatchResultEnum;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Match
|
||||
*/
|
||||
maxRounds?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Match
|
||||
*/
|
||||
parsed: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Match
|
||||
*/
|
||||
replayUrl?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Match
|
||||
*/
|
||||
vac: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Match
|
||||
*/
|
||||
gameBan: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Match
|
||||
*/
|
||||
avgRank?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Match
|
||||
*/
|
||||
tickRate?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum MatchMatchResultEnum {
|
||||
NUMBER_0 = 0,
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_2 = 2,
|
||||
}
|
||||
|
||||
export function MatchFromJSON(json: any): Match {
|
||||
return MatchFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MatchFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): Match {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
matchId: json["match_id"],
|
||||
shareCode: !exists(json, "share_code") ? undefined : json["share_code"],
|
||||
map: json["map"],
|
||||
date: json["date"],
|
||||
score: json["score"],
|
||||
duration: json["duration"],
|
||||
matchResult: json["match_result"],
|
||||
maxRounds: !exists(json, "max_rounds") ? undefined : json["max_rounds"],
|
||||
parsed: json["parsed"],
|
||||
replayUrl: !exists(json, "replay_url") ? undefined : json["replay_url"],
|
||||
vac: json["vac"],
|
||||
gameBan: json["game_ban"],
|
||||
avgRank: !exists(json, "avg_rank") ? undefined : json["avg_rank"],
|
||||
tickRate: !exists(json, "tick_rate") ? undefined : json["tick_rate"],
|
||||
};
|
||||
}
|
||||
|
||||
export function MatchToJSON(value?: Match | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
match_id: value.matchId,
|
||||
share_code: value.shareCode,
|
||||
map: value.map,
|
||||
date: value.date,
|
||||
score: value.score,
|
||||
duration: value.duration,
|
||||
match_result: value.matchResult,
|
||||
max_rounds: value.maxRounds,
|
||||
parsed: value.parsed,
|
||||
replay_url: value.replayUrl,
|
||||
vac: value.vac,
|
||||
game_ban: value.gameBan,
|
||||
avg_rank: value.avgRank,
|
||||
tick_rate: value.tickRate,
|
||||
};
|
||||
}
|
93
src/api/models/MatchChat.ts
Normal file
93
src/api/models/MatchChat.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MatchChat
|
||||
*/
|
||||
export interface MatchChat {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MatchChat
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof MatchChat
|
||||
*/
|
||||
allChat: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof MatchChat
|
||||
*/
|
||||
tick: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MatchChat
|
||||
*/
|
||||
translatedFrom?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof MatchChat
|
||||
*/
|
||||
translatedTo?: string;
|
||||
}
|
||||
|
||||
export function MatchChatFromJSON(json: any): MatchChat {
|
||||
return MatchChatFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MatchChatFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): MatchChat {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
message: json["message"],
|
||||
allChat: json["all_chat"],
|
||||
tick: json["tick"],
|
||||
translatedFrom: !exists(json, "translated_from")
|
||||
? undefined
|
||||
: json["translated_from"],
|
||||
translatedTo: !exists(json, "translated_to")
|
||||
? undefined
|
||||
: json["translated_to"],
|
||||
};
|
||||
}
|
||||
|
||||
export function MatchChatToJSON(value?: MatchChat | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
message: value.message,
|
||||
all_chat: value.allChat,
|
||||
tick: value.tick,
|
||||
translated_from: value.translatedFrom,
|
||||
translated_to: value.translatedTo,
|
||||
};
|
||||
}
|
75
src/api/models/MatchWeapons.ts
Normal file
75
src/api/models/MatchWeapons.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface MatchWeapons
|
||||
*/
|
||||
export interface MatchWeapons {
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: string; }}
|
||||
* @memberof MatchWeapons
|
||||
*/
|
||||
equipmentMap?: { [key: string]: string };
|
||||
/**
|
||||
*
|
||||
* @type {Array<{ [key: string]: { [key: string]: Array<Array<number>>; }; }>}
|
||||
* @memberof MatchWeapons
|
||||
*/
|
||||
stats?: Array<{ [key: string]: { [key: string]: Array<Array<number>> } }>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<{ [key: string]: { [key: string]: Array<Array<number>>; }; }>}
|
||||
* @memberof MatchWeapons
|
||||
*/
|
||||
spray?: Array<{ [key: string]: { [key: string]: Array<Array<number>> } }>;
|
||||
}
|
||||
|
||||
export function MatchWeaponsFromJSON(json: any): MatchWeapons {
|
||||
return MatchWeaponsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function MatchWeaponsFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): MatchWeapons {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
equipmentMap: !exists(json, "equipment_map")
|
||||
? undefined
|
||||
: json["equipment_map"],
|
||||
stats: !exists(json, "stats") ? undefined : json["stats"],
|
||||
spray: !exists(json, "spray") ? undefined : json["spray"],
|
||||
};
|
||||
}
|
||||
|
||||
export function MatchWeaponsToJSON(value?: MatchWeapons | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
equipment_map: value.equipmentMap,
|
||||
stats: value.stats,
|
||||
spray: value.spray,
|
||||
};
|
||||
}
|
153
src/api/models/Player.ts
Normal file
153
src/api/models/Player.ts
Normal file
@@ -0,0 +1,153 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
import type { Match } from "@/api/models/Match";
|
||||
import { MatchFromJSON, MatchToJSON } from "@/api/models/Match";
|
||||
import type { PlayerMatchStats } from "@/api/models/PlayerMatchStats";
|
||||
import {
|
||||
PlayerMatchStatsFromJSON,
|
||||
PlayerMatchStatsToJSON,
|
||||
} from "@/api/models/PlayerMatchStats";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Player
|
||||
*/
|
||||
export interface Player {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Player
|
||||
*/
|
||||
steamid64: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Player
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Player
|
||||
*/
|
||||
avatar?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Player
|
||||
*/
|
||||
vac: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Player
|
||||
*/
|
||||
vacDate?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Player
|
||||
*/
|
||||
gameBan: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Player
|
||||
*/
|
||||
gameBanDate?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Player
|
||||
*/
|
||||
tracked: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Player
|
||||
*/
|
||||
vanityUrl?: string;
|
||||
/**
|
||||
*
|
||||
* @type {PlayerMatchStats}
|
||||
* @memberof Player
|
||||
*/
|
||||
matchStats?: PlayerMatchStats;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Match>}
|
||||
* @memberof Player
|
||||
*/
|
||||
matches?: Array<Match>;
|
||||
}
|
||||
|
||||
export function PlayerFromJSON(json: any): Player {
|
||||
return PlayerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PlayerFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): Player {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
steamid64: json["steamid64"],
|
||||
name: !exists(json, "name") ? undefined : json["name"],
|
||||
avatar: !exists(json, "avatar") ? undefined : json["avatar"],
|
||||
vac: json["vac"],
|
||||
vacDate: !exists(json, "vac_date") ? undefined : json["vac_date"],
|
||||
gameBan: json["game_ban"],
|
||||
gameBanDate: !exists(json, "game_ban_date")
|
||||
? undefined
|
||||
: json["game_ban_date"],
|
||||
tracked: json["tracked"],
|
||||
vanityUrl: !exists(json, "vanity_url") ? undefined : json["vanity_url"],
|
||||
matchStats: !exists(json, "match_stats")
|
||||
? undefined
|
||||
: PlayerMatchStatsFromJSON(json["match_stats"]),
|
||||
matches: !exists(json, "matches")
|
||||
? undefined
|
||||
: (json["matches"] as Array<any>).map(MatchFromJSON),
|
||||
};
|
||||
}
|
||||
|
||||
export function PlayerToJSON(value?: Player | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
steamid64: value.steamid64,
|
||||
name: value.name,
|
||||
avatar: value.avatar,
|
||||
vac: value.vac,
|
||||
vac_date: value.vacDate,
|
||||
game_ban: value.gameBan,
|
||||
game_ban_date: value.gameBanDate,
|
||||
tracked: value.tracked,
|
||||
vanity_url: value.vanityUrl,
|
||||
match_stats: PlayerMatchStatsToJSON(value.matchStats),
|
||||
matches:
|
||||
value.matches === undefined
|
||||
? undefined
|
||||
: (value.matches as Array<any>).map(MatchToJSON),
|
||||
};
|
||||
}
|
73
src/api/models/PlayerMatchStats.ts
Normal file
73
src/api/models/PlayerMatchStats.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PlayerMatchStats
|
||||
*/
|
||||
export interface PlayerMatchStats {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMatchStats
|
||||
*/
|
||||
win?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMatchStats
|
||||
*/
|
||||
loss?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMatchStats
|
||||
*/
|
||||
tie?: number;
|
||||
}
|
||||
|
||||
export function PlayerMatchStatsFromJSON(json: any): PlayerMatchStats {
|
||||
return PlayerMatchStatsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PlayerMatchStatsFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): PlayerMatchStats {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
win: !exists(json, "win") ? undefined : json["win"],
|
||||
loss: !exists(json, "loss") ? undefined : json["loss"],
|
||||
tie: !exists(json, "tie") ? undefined : json["tie"],
|
||||
};
|
||||
}
|
||||
|
||||
export function PlayerMatchStatsToJSON(value?: PlayerMatchStats | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
win: value.win,
|
||||
loss: value.loss,
|
||||
tie: value.tie,
|
||||
};
|
||||
}
|
83
src/api/models/PlayerMate.ts
Normal file
83
src/api/models/PlayerMate.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
import type { Player } from "@/api/models/Player";
|
||||
import { PlayerFromJSON, PlayerToJSON } from "@/api/models/Player";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PlayerMate
|
||||
*/
|
||||
export interface PlayerMate {
|
||||
/**
|
||||
*
|
||||
* @type {Player}
|
||||
* @memberof PlayerMate
|
||||
*/
|
||||
player: Player;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMate
|
||||
*/
|
||||
winRate?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMate
|
||||
*/
|
||||
tieRate?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMate
|
||||
*/
|
||||
total?: number;
|
||||
}
|
||||
|
||||
export function PlayerMateFromJSON(json: any): PlayerMate {
|
||||
return PlayerMateFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PlayerMateFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): PlayerMate {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
player: PlayerFromJSON(json["player"]),
|
||||
winRate: !exists(json, "win_rate") ? undefined : json["win_rate"],
|
||||
tieRate: !exists(json, "tie_rate") ? undefined : json["tie_rate"],
|
||||
total: !exists(json, "total") ? undefined : json["total"],
|
||||
};
|
||||
}
|
||||
|
||||
export function PlayerMateToJSON(value?: PlayerMate | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
player: PlayerToJSON(value.player),
|
||||
win_rate: value.winRate,
|
||||
tie_rate: value.tieRate,
|
||||
total: value.total,
|
||||
};
|
||||
}
|
137
src/api/models/PlayerMeta.ts
Normal file
137
src/api/models/PlayerMeta.ts
Normal file
@@ -0,0 +1,137 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
import type { Player } from "@/api/models/Player";
|
||||
import { PlayerFromJSON, PlayerToJSON } from "@/api/models/Player";
|
||||
import type { PlayerMate } from "@/api/models/PlayerMate";
|
||||
import { PlayerMateFromJSON, PlayerMateToJSON } from "@/api/models/PlayerMate";
|
||||
import type { PlayerMetaWeaponDmg } from "@/api/models/PlayerMetaWeaponDmg";
|
||||
import {
|
||||
PlayerMetaWeaponDmgFromJSON,
|
||||
PlayerMetaWeaponDmgToJSON,
|
||||
} from "@/api/models/PlayerMetaWeaponDmg";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PlayerMeta
|
||||
*/
|
||||
export interface PlayerMeta {
|
||||
/**
|
||||
*
|
||||
* @type {Player}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
player: Player;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PlayerMate>}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
bestMates?: Array<PlayerMate>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<PlayerMate>}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
mostMates?: Array<PlayerMate>;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: string; }}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
eqMap?: { [key: string]: string };
|
||||
/**
|
||||
*
|
||||
* @type {Array<PlayerMetaWeaponDmg>}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
weaponDmg?: Array<PlayerMetaWeaponDmg>;
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: number; }}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
winMaps?: { [key: string]: number };
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: number; }}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
tieMaps?: { [key: string]: number };
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: number; }}
|
||||
* @memberof PlayerMeta
|
||||
*/
|
||||
totalMaps?: { [key: string]: number };
|
||||
}
|
||||
|
||||
export function PlayerMetaFromJSON(json: any): PlayerMeta {
|
||||
return PlayerMetaFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PlayerMetaFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): PlayerMeta {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
player: PlayerFromJSON(json["player"]),
|
||||
bestMates: !exists(json, "best_mates")
|
||||
? undefined
|
||||
: (json["best_mates"] as Array<any>).map(PlayerMateFromJSON),
|
||||
mostMates: !exists(json, "most_mates")
|
||||
? undefined
|
||||
: (json["most_mates"] as Array<any>).map(PlayerMateFromJSON),
|
||||
eqMap: !exists(json, "eq_map") ? undefined : json["eq_map"],
|
||||
weaponDmg: !exists(json, "weapon_dmg")
|
||||
? undefined
|
||||
: (json["weapon_dmg"] as Array<any>).map(PlayerMetaWeaponDmgFromJSON),
|
||||
winMaps: !exists(json, "win_maps") ? undefined : json["win_maps"],
|
||||
tieMaps: !exists(json, "tie_maps") ? undefined : json["tie_maps"],
|
||||
totalMaps: !exists(json, "total_maps") ? undefined : json["total_maps"],
|
||||
};
|
||||
}
|
||||
|
||||
export function PlayerMetaToJSON(value?: PlayerMeta | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
player: PlayerToJSON(value.player),
|
||||
best_mates:
|
||||
value.bestMates === undefined
|
||||
? undefined
|
||||
: (value.bestMates as Array<any>).map(PlayerMateToJSON),
|
||||
most_mates:
|
||||
value.mostMates === undefined
|
||||
? undefined
|
||||
: (value.mostMates as Array<any>).map(PlayerMateToJSON),
|
||||
eq_map: value.eqMap,
|
||||
weapon_dmg:
|
||||
value.weaponDmg === undefined
|
||||
? undefined
|
||||
: (value.weaponDmg as Array<any>).map(PlayerMetaWeaponDmgToJSON),
|
||||
win_maps: value.winMaps,
|
||||
tie_maps: value.tieMaps,
|
||||
total_maps: value.totalMaps,
|
||||
};
|
||||
}
|
67
src/api/models/PlayerMetaWeaponDmg.ts
Normal file
67
src/api/models/PlayerMetaWeaponDmg.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PlayerMetaWeaponDmg
|
||||
*/
|
||||
export interface PlayerMetaWeaponDmg {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMetaWeaponDmg
|
||||
*/
|
||||
eq?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PlayerMetaWeaponDmg
|
||||
*/
|
||||
dmg?: number;
|
||||
}
|
||||
|
||||
export function PlayerMetaWeaponDmgFromJSON(json: any): PlayerMetaWeaponDmg {
|
||||
return PlayerMetaWeaponDmgFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PlayerMetaWeaponDmgFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): PlayerMetaWeaponDmg {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
eq: !exists(json, "eq") ? undefined : json["eq"],
|
||||
dmg: !exists(json, "dmg") ? undefined : json["dmg"],
|
||||
};
|
||||
}
|
||||
|
||||
export function PlayerMetaWeaponDmgToJSON(
|
||||
value?: PlayerMetaWeaponDmg | null
|
||||
): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
eq: value.eq,
|
||||
dmg: value.dmg,
|
||||
};
|
||||
}
|
180
src/api/models/Stats.ts
Normal file
180
src/api/models/Stats.ts
Normal file
@@ -0,0 +1,180 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
import type { Player } from "@/api/models/Player";
|
||||
import { PlayerFromJSON, PlayerToJSON } from "@/api/models/Player";
|
||||
import type { StatsDmg } from "@/api/models/StatsDmg";
|
||||
import { StatsDmgFromJSON, StatsDmgToJSON } from "@/api/models/StatsDmg";
|
||||
import type { StatsFlash } from "@/api/models/StatsFlash";
|
||||
import { StatsFlashFromJSON, StatsFlashToJSON } from "@/api/models/StatsFlash";
|
||||
import type { StatsMultiKills } from "@/api/models/StatsMultiKills";
|
||||
import {
|
||||
StatsMultiKillsFromJSON,
|
||||
StatsMultiKillsToJSON,
|
||||
} from "@/api/models/StatsMultiKills";
|
||||
import type { StatsRank } from "@/api/models/StatsRank";
|
||||
import { StatsRankFromJSON, StatsRankToJSON } from "@/api/models/StatsRank";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface Stats
|
||||
*/
|
||||
export interface Stats {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Stats
|
||||
*/
|
||||
teamId: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Stats
|
||||
*/
|
||||
kills: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Stats
|
||||
*/
|
||||
deaths: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Stats
|
||||
*/
|
||||
assists: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Stats
|
||||
*/
|
||||
headshots?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Stats
|
||||
*/
|
||||
mvp: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Stats
|
||||
*/
|
||||
score: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Stats
|
||||
*/
|
||||
crosshair?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Stats
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Player}
|
||||
* @memberof Stats
|
||||
*/
|
||||
player?: Player;
|
||||
/**
|
||||
*
|
||||
* @type {StatsRank}
|
||||
* @memberof Stats
|
||||
*/
|
||||
rank?: StatsRank;
|
||||
/**
|
||||
*
|
||||
* @type {StatsMultiKills}
|
||||
* @memberof Stats
|
||||
*/
|
||||
multiKills?: StatsMultiKills;
|
||||
/**
|
||||
*
|
||||
* @type {StatsDmg}
|
||||
* @memberof Stats
|
||||
*/
|
||||
dmg?: StatsDmg;
|
||||
/**
|
||||
*
|
||||
* @type {StatsFlash}
|
||||
* @memberof Stats
|
||||
*/
|
||||
flash?: StatsFlash;
|
||||
}
|
||||
|
||||
export function StatsFromJSON(json: any): Stats {
|
||||
return StatsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatsFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): Stats {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
teamId: json["team_id"],
|
||||
kills: json["kills"],
|
||||
deaths: json["deaths"],
|
||||
assists: json["assists"],
|
||||
headshots: !exists(json, "headshots") ? undefined : json["headshots"],
|
||||
mvp: json["mvp"],
|
||||
score: json["score"],
|
||||
crosshair: !exists(json, "crosshair") ? undefined : json["crosshair"],
|
||||
color: !exists(json, "color") ? undefined : json["color"],
|
||||
player: !exists(json, "player")
|
||||
? undefined
|
||||
: PlayerFromJSON(json["player"]),
|
||||
rank: !exists(json, "rank") ? undefined : StatsRankFromJSON(json["rank"]),
|
||||
multiKills: !exists(json, "multi_kills")
|
||||
? undefined
|
||||
: StatsMultiKillsFromJSON(json["multi_kills"]),
|
||||
dmg: !exists(json, "dmg") ? undefined : StatsDmgFromJSON(json["dmg"]),
|
||||
flash: !exists(json, "flash")
|
||||
? undefined
|
||||
: StatsFlashFromJSON(json["flash"]),
|
||||
};
|
||||
}
|
||||
|
||||
export function StatsToJSON(value?: Stats | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
team_id: value.teamId,
|
||||
kills: value.kills,
|
||||
deaths: value.deaths,
|
||||
assists: value.assists,
|
||||
headshots: value.headshots,
|
||||
mvp: value.mvp,
|
||||
score: value.score,
|
||||
crosshair: value.crosshair,
|
||||
color: value.color,
|
||||
player: PlayerToJSON(value.player),
|
||||
rank: StatsRankToJSON(value.rank),
|
||||
multi_kills: StatsMultiKillsToJSON(value.multiKills),
|
||||
dmg: StatsDmgToJSON(value.dmg),
|
||||
flash: StatsFlashToJSON(value.flash),
|
||||
};
|
||||
}
|
65
src/api/models/StatsDmg.ts
Normal file
65
src/api/models/StatsDmg.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StatsDmg
|
||||
*/
|
||||
export interface StatsDmg {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsDmg
|
||||
*/
|
||||
ememy?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsDmg
|
||||
*/
|
||||
team?: number;
|
||||
}
|
||||
|
||||
export function StatsDmgFromJSON(json: any): StatsDmg {
|
||||
return StatsDmgFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatsDmgFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): StatsDmg {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
ememy: !exists(json, "ememy") ? undefined : json["ememy"],
|
||||
team: !exists(json, "team") ? undefined : json["team"],
|
||||
};
|
||||
}
|
||||
|
||||
export function StatsDmgToJSON(value?: StatsDmg | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
ememy: value.ememy,
|
||||
team: value.team,
|
||||
};
|
||||
}
|
79
src/api/models/StatsFlash.ts
Normal file
79
src/api/models/StatsFlash.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
import type { StatsFlashDuration } from "@/api/models/StatsFlashDuration";
|
||||
import {
|
||||
StatsFlashDurationFromJSON,
|
||||
StatsFlashDurationToJSON,
|
||||
} from "@/api/models/StatsFlashDuration";
|
||||
import type { StatsFlashTotal } from "@/api/models/StatsFlashTotal";
|
||||
import {
|
||||
StatsFlashTotalFromJSON,
|
||||
StatsFlashTotalToJSON,
|
||||
} from "@/api/models/StatsFlashTotal";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StatsFlash
|
||||
*/
|
||||
export interface StatsFlash {
|
||||
/**
|
||||
*
|
||||
* @type {StatsFlashDuration}
|
||||
* @memberof StatsFlash
|
||||
*/
|
||||
duration?: StatsFlashDuration;
|
||||
/**
|
||||
*
|
||||
* @type {StatsFlashTotal}
|
||||
* @memberof StatsFlash
|
||||
*/
|
||||
total?: StatsFlashTotal;
|
||||
}
|
||||
|
||||
export function StatsFlashFromJSON(json: any): StatsFlash {
|
||||
return StatsFlashFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatsFlashFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): StatsFlash {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
duration: !exists(json, "duration")
|
||||
? undefined
|
||||
: StatsFlashDurationFromJSON(json["duration"]),
|
||||
total: !exists(json, "total")
|
||||
? undefined
|
||||
: StatsFlashTotalFromJSON(json["total"]),
|
||||
};
|
||||
}
|
||||
|
||||
export function StatsFlashToJSON(value?: StatsFlash | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
duration: StatsFlashDurationToJSON(value.duration),
|
||||
total: StatsFlashTotalToJSON(value.total),
|
||||
};
|
||||
}
|
75
src/api/models/StatsFlashDuration.ts
Normal file
75
src/api/models/StatsFlashDuration.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StatsFlashDuration
|
||||
*/
|
||||
export interface StatsFlashDuration {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsFlashDuration
|
||||
*/
|
||||
self?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsFlashDuration
|
||||
*/
|
||||
team?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsFlashDuration
|
||||
*/
|
||||
enemy?: number;
|
||||
}
|
||||
|
||||
export function StatsFlashDurationFromJSON(json: any): StatsFlashDuration {
|
||||
return StatsFlashDurationFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatsFlashDurationFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): StatsFlashDuration {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
self: !exists(json, "self") ? undefined : json["self"],
|
||||
team: !exists(json, "team") ? undefined : json["team"],
|
||||
enemy: !exists(json, "enemy") ? undefined : json["enemy"],
|
||||
};
|
||||
}
|
||||
|
||||
export function StatsFlashDurationToJSON(
|
||||
value?: StatsFlashDuration | null
|
||||
): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
self: value.self,
|
||||
team: value.team,
|
||||
enemy: value.enemy,
|
||||
};
|
||||
}
|
73
src/api/models/StatsFlashTotal.ts
Normal file
73
src/api/models/StatsFlashTotal.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StatsFlashTotal
|
||||
*/
|
||||
export interface StatsFlashTotal {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsFlashTotal
|
||||
*/
|
||||
self?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsFlashTotal
|
||||
*/
|
||||
team?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsFlashTotal
|
||||
*/
|
||||
enemy?: number;
|
||||
}
|
||||
|
||||
export function StatsFlashTotalFromJSON(json: any): StatsFlashTotal {
|
||||
return StatsFlashTotalFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatsFlashTotalFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): StatsFlashTotal {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
self: !exists(json, "self") ? undefined : json["self"],
|
||||
team: !exists(json, "team") ? undefined : json["team"],
|
||||
enemy: !exists(json, "enemy") ? undefined : json["enemy"],
|
||||
};
|
||||
}
|
||||
|
||||
export function StatsFlashTotalToJSON(value?: StatsFlashTotal | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
self: value.self,
|
||||
team: value.team,
|
||||
enemy: value.enemy,
|
||||
};
|
||||
}
|
81
src/api/models/StatsMultiKills.ts
Normal file
81
src/api/models/StatsMultiKills.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StatsMultiKills
|
||||
*/
|
||||
export interface StatsMultiKills {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsMultiKills
|
||||
*/
|
||||
duo?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsMultiKills
|
||||
*/
|
||||
triple?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsMultiKills
|
||||
*/
|
||||
quad?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsMultiKills
|
||||
*/
|
||||
pent?: number;
|
||||
}
|
||||
|
||||
export function StatsMultiKillsFromJSON(json: any): StatsMultiKills {
|
||||
return StatsMultiKillsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatsMultiKillsFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): StatsMultiKills {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
duo: !exists(json, "duo") ? undefined : json["duo"],
|
||||
triple: !exists(json, "triple") ? undefined : json["triple"],
|
||||
quad: !exists(json, "quad") ? undefined : json["quad"],
|
||||
pent: !exists(json, "pent") ? undefined : json["pent"],
|
||||
};
|
||||
}
|
||||
|
||||
export function StatsMultiKillsToJSON(value?: StatsMultiKills | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
duo: value.duo,
|
||||
triple: value.triple,
|
||||
quad: value.quad,
|
||||
pent: value.pent,
|
||||
};
|
||||
}
|
65
src/api/models/StatsRank.ts
Normal file
65
src/api/models/StatsRank.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists } from "@/api/runtime";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StatsRank
|
||||
*/
|
||||
export interface StatsRank {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsRank
|
||||
*/
|
||||
old?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof StatsRank
|
||||
*/
|
||||
_new?: number;
|
||||
}
|
||||
|
||||
export function StatsRankFromJSON(json: any): StatsRank {
|
||||
return StatsRankFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatsRankFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean
|
||||
): StatsRank {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
old: !exists(json, "old") ? undefined : json["old"],
|
||||
_new: !exists(json, "new") ? undefined : json["new"],
|
||||
};
|
||||
}
|
||||
|
||||
export function StatsRankToJSON(value?: StatsRank | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
old: value.old,
|
||||
new: value._new,
|
||||
};
|
||||
}
|
17
src/api/models/index.ts
Normal file
17
src/api/models/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './Match';
|
||||
export * from './MatchChat';
|
||||
export * from './MatchWeapons';
|
||||
export * from './Player';
|
||||
export * from './PlayerMatchStats';
|
||||
export * from './PlayerMate';
|
||||
export * from './PlayerMeta';
|
||||
export * from './PlayerMetaWeaponDmg';
|
||||
export * from './Stats';
|
||||
export * from './StatsDmg';
|
||||
export * from './StatsFlash';
|
||||
export * from './StatsFlashDuration';
|
||||
export * from './StatsFlashTotal';
|
||||
export * from './StatsMultiKills';
|
||||
export * from './StatsRank';
|
320
src/api/runtime.ts
Normal file
320
src/api/runtime.ts
Normal file
@@ -0,0 +1,320 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* csgoWTF API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Contact: api@csgow.tf
|
||||
*
|
||||
* 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://api.csgow.tf".replace(/\/+$/, "");
|
||||
|
||||
const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob;
|
||||
|
||||
/**
|
||||
* This is the base class for all generated API classes.
|
||||
*/
|
||||
export class BaseAPI {
|
||||
|
||||
private middleware: Middleware[];
|
||||
|
||||
constructor(protected configuration = new Configuration()) {
|
||||
this.middleware = configuration.middleware;
|
||||
}
|
||||
|
||||
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
|
||||
const next = this.clone<T>();
|
||||
next.middleware = next.middleware.concat(...middlewares);
|
||||
return next;
|
||||
}
|
||||
|
||||
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>) {
|
||||
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
||||
return this.withMiddleware<T>(...middlewares);
|
||||
}
|
||||
|
||||
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>) {
|
||||
const middlewares = postMiddlewares.map((post) => ({ post }));
|
||||
return this.withMiddleware<T>(...middlewares);
|
||||
}
|
||||
|
||||
protected async request(context: RequestOpts, initOverrides?: RequestInit): Promise<Response> {
|
||||
const { url, init } = this.createFetchParams(context, initOverrides);
|
||||
const response = await this.fetchApi(url, init);
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response;
|
||||
}
|
||||
throw response;
|
||||
}
|
||||
|
||||
private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) {
|
||||
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 body = ((typeof FormData !== "undefined" && context.body instanceof FormData) || context.body instanceof URLSearchParams || isBlob(context.body))
|
||||
? context.body
|
||||
: JSON.stringify(context.body);
|
||||
|
||||
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
||||
const init = {
|
||||
method: context.method,
|
||||
headers: headers,
|
||||
body,
|
||||
credentials: this.configuration.credentials,
|
||||
...initOverrides
|
||||
};
|
||||
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;
|
||||
}
|
||||
}
|
||||
let response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
||||
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<T extends BaseAPI>(this: T): T {
|
||||
const constructor = this.constructor as any;
|
||||
const next = new constructor(this.configuration);
|
||||
next.middleware = this.middleware.slice();
|
||||
return next;
|
||||
}
|
||||
};
|
||||
|
||||
export class RequiredError extends Error {
|
||||
name: "RequiredError" = "RequiredError";
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
|
||||
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 | ((name: string) => string); // parameter for apiKey security
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // 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 = {}) {}
|
||||
|
||||
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) | undefined {
|
||||
const apiKey = this.configuration.apiKey;
|
||||
if (apiKey) {
|
||||
return typeof apiKey === 'function' ? apiKey : () => apiKey;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | 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 credentials(): RequestCredentials | undefined {
|
||||
return this.configuration.credentials;
|
||||
}
|
||||
}
|
||||
|
||||
export type Json = any;
|
||||
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<string | number | null | boolean> | HTTPQuery };
|
||||
export type HTTPBody = Json | FormData | URLSearchParams;
|
||||
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
||||
|
||||
export interface FetchParams {
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
}
|
||||
|
||||
export interface RequestOpts {
|
||||
path: string;
|
||||
method: HTTPMethod;
|
||||
headers: HTTPHeaders;
|
||||
query?: HTTPQuery;
|
||||
body?: HTTPBody;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function querystring(params: HTTPQuery, prefix: string = ''): string {
|
||||
return Object.keys(params)
|
||||
.map((key) => {
|
||||
const fullKey = prefix + (prefix.length ? `[${key}]` : key);
|
||||
const value = params[key];
|
||||
if (value instanceof Array) {
|
||||
const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
|
||||
.join(`&${encodeURIComponent(fullKey)}=`);
|
||||
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
||||
}
|
||||
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))}`;
|
||||
})
|
||||
.filter(part => part.length > 0)
|
||||
.join('&');
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
export function canConsumeForm(consumes: Consume[]): boolean {
|
||||
for (const consume of consumes) {
|
||||
if ('multipart/form-data' === consume.contentType) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export interface Consume {
|
||||
contentType: string
|
||||
}
|
||||
|
||||
export interface RequestContext {
|
||||
fetch: FetchAPI;
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
}
|
||||
|
||||
export interface ResponseContext {
|
||||
fetch: FetchAPI;
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
response: Response;
|
||||
}
|
||||
|
||||
export interface Middleware {
|
||||
pre?(context: RequestContext): Promise<FetchParams | void>;
|
||||
post?(context: ResponseContext): Promise<Response | void>;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
raw: Response;
|
||||
value(): Promise<T>;
|
||||
}
|
||||
|
||||
export interface ResponseTransformer<T> {
|
||||
(json: any): T;
|
||||
}
|
||||
|
||||
export class JSONApiResponse<T> {
|
||||
constructor(public raw: Response, private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue) {}
|
||||
|
||||
async value(): Promise<T> {
|
||||
return this.transformer(await this.raw.json());
|
||||
}
|
||||
}
|
||||
|
||||
export class VoidApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<void> {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export class BlobApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<Blob> {
|
||||
return await this.raw.blob();
|
||||
};
|
||||
}
|
||||
|
||||
export class TextApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<string> {
|
||||
return await this.raw.text();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user