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) } }
func (c App) Record(region, gameId, encryptionKey, summonerId string) revel.Result { record.Record(region, gameId, encryptionKey, summonerId) return c.RenderText("ok.") }