Example #1
0
        public List <int> GetPlayerId(PlayerRequest player)
        {
            string json = "{\"returnType\":\"response\",\"query\":\"query CreateTeamQuery( $site: String! $tourId: Int! $teamId: Int = -1 $matchId: Int!) { site(slug: $site) { name teamPreviewArtwork { src } teamCriteria { totalCredits maxPlayerPerSquad totalPlayerCount } roles { id artwork { src } color name pointMultiplier shortName } playerTypes { id name minPerTeam maxPerTeam shortName artwork { src } } tour(id: $tourId) { match(id: $matchId) { id guru squads { flag { src } id jerseyColor name shortName } startTime status players(teamId: $teamId) { artwork { src } squad { id name jerseyColor shortName } credits id name points type { id maxPerTeam minPerTeam name shortName } isSelected role { id artwork { src } color name pointMultiplier shortName } } } } } me { isGuestUser }}\",\"variables\":{\"tourId\":" + player.TourId + ",\"matchId\":" + player.MatchId + ",\"teamId\":null,\"site\":\"cricket\"}}";
            Dictionary <string, PlayerDetails> dict = _playerRepo.ConstructJsonForPlayer(json);
            List <int> playerListId = GetPlayerIdfromDict(dict);

            return(playerListId);
        }