-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add interfaces for Faceit API responses (#65)
- Loading branch information
1 parent
1eb283a
commit 1217ee7
Showing
4 changed files
with
278 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
export interface IInfractions { | ||
last_infraction_date: string; | ||
afk: number; | ||
leaver: number; | ||
qm_not_checkedin: number; | ||
qm_not_voted: number; | ||
} | ||
|
||
export interface IPlatforms { | ||
steam: string; | ||
} | ||
|
||
export interface IEU { | ||
selected_ladder_id: string; | ||
} | ||
|
||
export interface IRegions { | ||
EU: IEU; | ||
} | ||
|
||
export interface ICsgo { | ||
game_profile_id: string; | ||
region: string; | ||
regions: IRegions; | ||
skill_level_label: string; | ||
game_player_id: string; | ||
skill_level: number; | ||
faceit_elo: number; | ||
game_player_name: string; | ||
} | ||
|
||
export interface IEU2 { | ||
selected_ladder_id: string; | ||
} | ||
|
||
export interface IRegions2 { | ||
EU: IEU2; | ||
} | ||
|
||
export interface ICsco { | ||
game_profile_id: string; | ||
region: string; | ||
regions: IRegions2; | ||
skill_level_label: string; | ||
game_player_id: string; | ||
skill_level: number; | ||
faceit_elo: number; | ||
game_player_name: string; | ||
} | ||
|
||
export interface IGames { | ||
csgo: ICsgo; | ||
csco: ICsco; | ||
} | ||
|
||
export interface ISettings { | ||
language: string; | ||
} | ||
|
||
export interface IFaceitSearchForSteamId { | ||
player_id: string; | ||
nickname: string; | ||
avatar: string; | ||
country: string; | ||
cover_image: string; | ||
cover_featured_image: string; | ||
infractions: IInfractions; | ||
platforms: IPlatforms; | ||
games: IGames; | ||
settings: ISettings; | ||
friends_ids: string[]; | ||
bans: any[]; | ||
new_steam_id: string; | ||
steam_id_64: string; | ||
steam_nickname: string; | ||
membership_type: string; | ||
memberships: string[]; | ||
faceit_url: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
export interface IRoster { | ||
player_id: string; | ||
nickname: string; | ||
avatar: string; | ||
membership: string; | ||
game_player_id: string; | ||
game_player_name: string; | ||
game_skill_level: number; | ||
anticheat_required: boolean; | ||
} | ||
|
||
export interface IFaction2 { | ||
faction_id: string; | ||
leader: string; | ||
avatar: string; | ||
roster: IRoster[]; | ||
substituted: boolean; | ||
name: string; | ||
type: string; | ||
} | ||
|
||
export interface IRoster2 { | ||
player_id: string; | ||
nickname: string; | ||
avatar: string; | ||
membership: string; | ||
game_player_id: string; | ||
game_player_name: string; | ||
game_skill_level: number; | ||
anticheat_required: boolean; | ||
} | ||
|
||
export interface IFaction1 { | ||
faction_id: string; | ||
leader: string; | ||
avatar: string; | ||
roster: IRoster2[]; | ||
substituted: boolean; | ||
name: string; | ||
type: string; | ||
} | ||
|
||
export interface ITeams { | ||
faction2: IFaction2; | ||
faction1: IFaction1; | ||
} | ||
|
||
export interface IEntity { | ||
name: string; | ||
class_name: string; | ||
game_map_id: string; | ||
guid: string; | ||
image_lg: string; | ||
image_sm: string; | ||
} | ||
|
||
export interface IMap { | ||
entities: IEntity[]; | ||
pick: string[]; | ||
} | ||
|
||
export interface IVoting { | ||
voted_entity_types: string[]; | ||
map: IMap; | ||
} | ||
|
||
export interface IScore { | ||
faction1: number; | ||
faction2: number; | ||
} | ||
|
||
export interface IResults { | ||
winner: string; | ||
score: IScore; | ||
} | ||
|
||
export interface IMatchDetails { | ||
match_id: string; | ||
version: number; | ||
game: string; | ||
region: string; | ||
competition_id: string; | ||
competition_type: string; | ||
competition_name: string; | ||
organizer_id: string; | ||
teams: ITeams; | ||
voting: IVoting; | ||
calculate_elo: boolean; | ||
configured_at: number; | ||
started_at: number; | ||
finished_at: number; | ||
demo_url: string[]; | ||
chat_room_id: string; | ||
best_of: number; | ||
results: IResults; | ||
status: string; | ||
faceit_url: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
export interface IPlayer { | ||
player_id: string; | ||
nickname: string; | ||
avatar: string; | ||
skill_level: number; | ||
game_player_id: string; | ||
game_player_name: string; | ||
faceit_url: string; | ||
} | ||
|
||
export interface IFaction1 { | ||
team_id: string; | ||
nickname: string; | ||
avatar: string; | ||
type: string; | ||
players: IPlayer[]; | ||
} | ||
|
||
export interface IPlayer2 { | ||
player_id: string; | ||
nickname: string; | ||
avatar: string; | ||
skill_level: number; | ||
game_player_id: string; | ||
game_player_name: string; | ||
faceit_url: string; | ||
} | ||
|
||
export interface IFaction2 { | ||
team_id: string; | ||
nickname: string; | ||
avatar: string; | ||
type: string; | ||
players: IPlayer2[]; | ||
} | ||
|
||
export interface ITeams { | ||
faction1: IFaction1; | ||
faction2: IFaction2; | ||
} | ||
|
||
export interface IScore { | ||
faction1: number; | ||
faction2: number; | ||
} | ||
|
||
export interface IResults { | ||
winner: string; | ||
score: IScore; | ||
} | ||
|
||
export interface IItem { | ||
match_id: string; | ||
game_id: string; | ||
region: string; | ||
match_type: string; | ||
game_mode: string; | ||
max_players: number; | ||
teams_size: number; | ||
teams: ITeams; | ||
playing_players: string[]; | ||
competition_id: string; | ||
competition_name: string; | ||
competition_type: string; | ||
organizer_id: string; | ||
status: string; | ||
started_at: number; | ||
finished_at: number; | ||
results: IResults; | ||
faceit_url: string; | ||
} | ||
|
||
export interface IPlayerHistory { | ||
items: IItem[]; | ||
start: number; | ||
end: number; | ||
from: number; | ||
to: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters