Class HistoryRequest
- Namespace
- GoogleMapsApi.Entities.AirQuality.Request
- Assembly
- GoogleMapsApi.dll
Request for the Air Quality API history:lookup endpoint
(POST https://airquality.googleapis.com/v1/history:lookup). Returns past hourly
air-quality records for a coordinate.
public sealed class HistoryRequest : MapsBaseRequest
- Inheritance
-
HistoryRequest
- Inherited Members
Remarks
Specify the time range with exactly one of DateTime (a single hour), Hours (the most recent N hours) or Period (an explicit range). The Air Quality API is billable; calls beyond the free tier incur charges.
Properties
CustomLocalAqis
Per-region overrides selecting which local AQI to report.
public List<CustomLocalAqi>? CustomLocalAqis { get; set; }
Property Value
DateTime
public DateTimeOffset? DateTime { get; set; }
Property Value
ExtraComputations
Optional extra computations that enrich the response (local AQIs, health advice, pollutant detail).
public List<ExtraComputation>? ExtraComputations { get; set; }
Property Value
Hours
public int? Hours { get; set; }
Property Value
- int?
LanguageCode
IETF BCP-47 language code for textual fields in the response (e.g. "en").
public string? LanguageCode { get; set; }
Property Value
Latitude
Latitude of the query point, in degrees. Required.
public double Latitude { get; set; }
Property Value
Longitude
Longitude of the query point, in degrees. Required.
public double Longitude { get; set; }
Property Value
PageSize
Maximum number of hourly records per page. Defaults to 72 server-side when unset.
public int? PageSize { get; set; }
Property Value
- int?
PageToken
Page token from a previous response's NextPageToken to fetch the next page.
public string? PageToken { get; set; }
Property Value
Period
public Interval? Period { get; set; }
Property Value
UaqiColorPalette
Colour palette used for the Universal AQI in the response.
public ColorPalette? UaqiColorPalette { get; set; }
Property Value
UniversalAqi
Whether to include the Universal AQI in the response. Defaults to true server-side when unset.
public bool? UniversalAqi { get; set; }
Property Value
- bool?
Methods
GetRequestBody()
Builds the body to send with this request, or null for endpoints that use GET with
query-string parameters only. Derived requests that target POST-based endpoints (for example,
Address Validation) override this to return a JSON HttpContent; when the engine
sees a non-null body it issues a POST instead of a GET.
protected override HttpContent? GetRequestBody()
Returns
- HttpContent
The HTTP content to send, or
nullfor a GET request.
GetUri()
Builds the absolute request URI, including scheme, base URL, and serialized query-string parameters.
public override Uri GetUri()
Returns
- Uri
The fully composed URI to send to the Google Maps API.