Beispiel #1
0
        public static Response <UserInfoCard[]> GetUser(string apiKey, BungieMembershipType membershipType, string displayName)
        {
            string url     = BASE_URL + membershipType + "/" + displayName;
            string content = HttpContextHelper.GetContent(apiKey, url);

            return(Newtonsoft.Json.JsonConvert.DeserializeObject <Response <UserInfoCard[]> >(content));
        }
        public static Response <GeneralUser> GetUser(string apiKey, long id)
        {
            string url     = BASE_URL + id + "/";
            string content = HttpContextHelper.GetContent(apiKey, url);

            return(Newtonsoft.Json.JsonConvert.DeserializeObject <Response <GeneralUser> >(content));
        }
Beispiel #3
0
        public static Response <DestinyProfileResponse> GetUser(string apiKey, BungieMembershipType membershipType, long destinyMembershipId, DestinyComponentType[] components)
        {
            string url = BASE_URL + membershipType + EXT1_URL + destinyMembershipId + "?components=";

            for (int i = 0; i < components.Length; i++)
            {
                url += components[i];
                if (i + 1 >= components.Length)
                {
                    url += ",";
                }
            }
            string content = HttpContextHelper.GetContent(apiKey, url);

            return(Newtonsoft.Json.JsonConvert.DeserializeObject <Response <DestinyProfileResponse> >(content));
        }