Esempio n. 1
0
        // Token: 0x06000092 RID: 146 RVA: 0x000049A0 File Offset: 0x00002BA0
        public async Task <List <User> > DownloadSocialGraphAsync()
        {
            List <User> following = new List <User>();
            Response    response4 = await XBLCall.GetAsync(this.SocialGraphBaseURI + "/users/me/people", this.TokenManager.userHash, this.TokenManager.XToken, "2");

            Response response2 = response4;

            response4 = null;
            Response response3 = response2;

            response2 = null;
            Response resp = response3;

            response3 = null;
            SocialGraphResponseContract responseBody = JsonConvert.DeserializeObject <SocialGraphResponseContract>(resp.responseBody);

            foreach (SocialGraphPersonContract s in responseBody.SocialGraphPeople)
            {
                User user = new User();
                user.xuid            = s.Xuid;
                user.isFollowingBack = s.IsFollowingCaller;
                user.isFavorite      = s.IsFavorite;
                following.Add(user);
                user = null;
                user = null;
                user = null;
                s    = null;
            }
            SocialGraphPersonContract[] array = null;
            return(following);
        }
		// Token: 0x06000087 RID: 135 RVA: 0x000046C8 File Offset: 0x000028C8
		public async Task<List<User>> DownloadBlockListAsync()
		{
			List<User> blockList = new List<User>();
			Response response4 = await XBLCall.GetAsync(this.PrivacyBaseURI + "/users/xuid(" + this.TokenManager.xuid + ")/people/avoid", this.TokenManager.userHash, this.TokenManager.XToken, "2");
			Response response2 = response4;
			response4 = null;
			Response response3 = response2;
			response2 = null;
			Response resp = response3;
			response3 = null;
			PrivacyResponseContract privacyResponse = JsonConvert.DeserializeObject<PrivacyResponseContract>(resp.responseBody);
			foreach (PrivacyUserContract p in privacyResponse.Users)
			{
				blockList.Add(new User
				{
					xuid = p.Xuid
				});
				p = null;
			}
			PrivacyUserContract[] array = null;
			return blockList;
		}
        // Token: 0x0600009D RID: 157 RVA: 0x00004B38 File Offset: 0x00002D38
        public async Task <Dictionary <StatName, string> > DownloadAllStatsAsync()
        {
            Dictionary <StatName, string> repStats = new Dictionary <StatName, string>();
            Response response4 = await XBLCall.GetAsync(this.GetStatsURI(), this.tokenManager.userHash, this.tokenManager.XToken, "1");

            Response response2 = response4;

            response4 = null;
            Response response3 = response2;

            response2 = null;
            Response resp = response3;

            response3 = null;
            StatsResponseContract statsResponse = JsonConvert.DeserializeObject <StatsResponseContract>(resp.responseBody);

            foreach (StatContract stat in statsResponse.stats)
            {
                repStats[StatsDataAccess.ToStatName(stat.statname)] = stat.value;
                stat = null;
            }
            StatContract[] array = null;
            return(repStats);
        }