27-Nerds / 27-Nerds/dota-leagues-go

збереження GetRealtimeStats для лайв ігор

Aperta
#27 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Go
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

ендпоінт https://www.dota2.com/webapi/IDOTA2League/GetLiveGames/v001? повертає список матчів, що відбуваються прямо зараз, система зберігає відповіді в таблиці `games` з такою структурою:

```
type Game struct {
LeagueID int `json:"league_id"`
ServerSteamID int64 `json:"server_steam_id"`
RadiantName string `json:"radiant_name"`
RadiantTeamID int `json:"radiant_team_id"`
DireName string `json:"dire_name"`
DireTeamID int `json:"dire_team_id"`
Time int `json:"time"`
Spectators int `json:"spectators"`
DbKey string `json:"_key,omitempty"`
}
```
https://github.com/27-Nerds/dota-leagues-go/blob/master/model/game.go#L9

якщо передати `ServerSteamID` в цей ендпоінт: https://www.dota2.com/webapi/IDOTA2MatchStats/GetRealtimeStats/v001?server_steam_id= , можна отримати інформацію про гру в реальному часі. Приклад відповіді:
https://gist.github.com/syzspectroom/7f84549a1a9e27db0256e9de89d4e1e8

потрібно реалізувати механізм збереження цих даних в бд

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.