コード例 #1
0
        public async Task Should_Get_GetAverageSoldPrices()
        {
            AverageSoldPriceResponse result;

            using (var api = new ZooplaDotNetClient(ApiKey.Value))
            {
                var options     = new AverageSoldPricesOptions();
                var paramerters = new StandardLocationParameters
                {
                    PostCode   = "e84dt",
                    OutputType = OutputType.OUTCODE,
                    AreaType   = AreaType.POSTCODES
                };

                result = await api.GetAverageSoldPrices(paramerters, options);
            }

            Assert.That(result.Areas.Count, Is.EqualTo(10));
        }
コード例 #2
0
        /// <summary>
        /// Gets the average sold prices for a particular sub-area type.
        /// </summary>
        /// <param name="locationParams">The standard location parameters.</param>
        /// <param name="options">The paging and ordering options.</param>
        /// <returns>A list of average sold prices for each given sub-area type in the area.</returns>
        public Task <AverageSoldPriceResponse> GetAverageSoldPrices(StandardLocationParameters locationParams, AverageSoldPricesOptions options)
        {
            string url = Endpoints.AVERAGE_SOLD_PRICES + "?api_key=" + _accessToken;

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

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