Esempio n. 1
0
        public async Task <Player2[]> GetPlayerInfo(int matchid, int userteamid, Object utoken)
        {
            // var data = await httpClient.GetJsonAsync<Player[]>($"{CommanUrl.url}UserTeam/GetallPlayers/0/{matchid}");
            // var data = await BlazorHttpExtensions.GetJsonAsync<Player[]>(this.httpClient,$"{CommanUrl.url}UserTeam/GetallPlayers/0/{matchid}",utoken.ToString());
            var data = await BlazorHttpExtensions.GetJsonAsync <Player2[]>(this.httpClient, $"{CommanUrl.url}UserTeam/UserTeamPlayers/{userteamid}/{matchid}", utoken.ToString());

            return(data);
        }
        public async Task <UserTeams[]> GetUserTeams(int matchid, Object utoken)
        {
            try
            {
                var data = await BlazorHttpExtensions.GetJsonAsync <UserTeams[]>(this._httpClient, $"{CommanUrl.url}UserTeam/matchUserTeam/{matchid}", utoken.ToString());

                return(data);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(null);
            }
        }
Esempio n. 3
0
        public async Task <List <Player2> > GetPlayerData(int matchid, int userTeamId, Object utoken)
        {
            var data = await BlazorHttpExtensions.GetJsonAsync <List <Player2> >(this.httpClient, $"{CommanUrl.url}UserTeam/UserTeamPlayers/{userTeamId}/{matchid}", utoken.ToString());

            return(data);
        }