Exemplo n.º 1
0
        public string GetUserBlob(string battletag)
        {
            var route    = "/u/" + battletag.Replace('#', '-') + "/blob";
            var response = _http.Get(route);

            if (response.Succeeded)
            {
                return(_serializer.DynamicDeserialize(response.ResponseData));
            }
            return(string.Empty);
        }
Exemplo n.º 2
0
        public IEnumerable <TvShowSummary> Search(string search)
        {
            if (!IsAuthenticated)
            {
                Authenticate();
            }

            var response = _http.Get("/search/series?name=" + search);

            if (!response.Succeeded)
            {
                yield break;
            }

            var responseObject = _serializer.DynamicDeserialize(response.ResponseData);

            foreach (var show in responseObject.data)
            {
                yield return(ModelFactory.ConvertToSummary(show));
            }
        }
Exemplo n.º 3
0
        public IEnumerable <HeroSummary> GetHeroes()
        {
            var response = _http.Get("/hero");

            if (response.Succeeded)
            {
                var dynamicResponse = _serializer.DynamicDeserialize(response.ResponseData);
                foreach (var item in dynamicResponse.data)
                {
                    yield return(ModelFactory.CreateHeroSummary(item));
                }
            }
        }