예제 #1
0
func checkPlayer(platform, player string) {
	resp, ok := requestURL("https://na.api.pvp.net/observer-mode/rest/consumer/getSpectatorGameInfo/" + platform + "/" + player + "?api_key=" + apiKey)
	if !ok {
		return
	}
	game := parseMatch(resp)

	if game.Id > 0 {
		gameId := strconv.FormatFloat(game.Id, 'f', 0, 64)
		record.Record(platform, gameId, game.Observers.EncryptionKey, player)
	}
}
예제 #2
0
파일: app.go 프로젝트: Helstedxd/LoL-Replay
func (c App) Record(region, gameId, encryptionKey string) revel.Result {
	record.Record(region, gameId, encryptionKey)
	return c.RenderText("ok.")
}