Ejemplo n.º 1
0
        public async Task Should_Get_GetAreaValueGraphs()
        {
            AreaValueGraphResponse result;

            using (var api = new ZooplaDotNetClient(ApiKey.Value))
            {
                var options = new AreaValueGraphOptions {
                    Size = Size.MEDIUM
                };
                var parameters = new StandardLocationParameters {
                    PostCode = "e84dt"
                };

                result = await api.GetAreaValueGraphs(parameters, options);
            }


            Assert.That(result.AverageValuesGraphUrl,
                        Is.EqualTo("https://www.zoopla.co.uk/dynimgs/graph/average_prices/E8?width=400&height=212"));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Generates a graph of values for an outcode over the previous 3 months and return the URL to the generated image.
        /// </summary>
        /// <param name="locationParams">
        /// The standard location parameters.
        /// OutputType must be OUTCODE.
        /// </param>
        /// <param name="options">The size option for the graph.</param>
        /// <returns>URLs for Home Values, Value Trend, Value Ranges, and Average Values graphs.</returns>
        public Task <AreaValueGraphResponse> GetAreaValueGraphs(StandardLocationParameters locationParams, AreaValueGraphOptions options)
        {
            string url = Endpoints.AREA_VALUE_GRAPHS + "?api_key=" + _accessToken;

            url += locationParams.GetUrlParams();
            url += options.GetUrlParams();

            return(_httpClient.GetObject <AreaValueGraphResponse>(url));
        }