Movatterモバイル変換


[0]ホーム

URL:


pollen

package
v0.257.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package pollen provides access to the Pollen API.

For product documentation, see:https://developers.google.com/maps/documentation/pollen

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.

When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/pollen/v1"...ctx := context.Background()pollenService, err := pollen.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:

pollenService, err := pollen.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)pollenService, err := pollen.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// See, edit, configure, and delete your Google Cloud data and see the email// address for your Google Account.CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeColor

type Color struct {// Alpha: The fraction of this color that should be applied to the pixel. That// is, the final pixel color is defined by the equation: `pixel color = alpha *// (this color) + (1.0 - alpha) * (background color)` This means that a value// of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a// completely transparent color. This uses a wrapper message rather than a// simple float scalar so that it is possible to distinguish between a default// value and the value being unset. If omitted, this color object is rendered// as a solid color (as if the alpha value had been explicitly given a value of// 1.0).Alphafloat64 `json:"alpha,omitempty"`// Blue: The amount of blue in the color as a value in the interval [0, 1].Bluefloat64 `json:"blue,omitempty"`// Green: The amount of green in the color as a value in the interval [0, 1].Greenfloat64 `json:"green,omitempty"`// Red: The amount of red in the color as a value in the interval [0, 1].Redfloat64 `json:"red,omitempty"`// ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Alpha") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Color: Represents a color in the RGBA color space. This representation isdesigned for simplicity of conversion to and from color representations invarious languages over compactness. For example, the fields of thisrepresentation can be trivially provided to the constructor of`java.awt.Color` in Java; it can also be trivially provided to UIColor's`+colorWithRed:green:blue:alpha` method in iOS; and, with just a littlework, it can be easily formatted into a CSS `rgba()` string in JavaScript.This reference page doesn't have information about the absolute color spacethat should be used to interpret the RGB value—for example, sRGB, AdobeRGB, DCI-P3, and BT.2020. By default, applications should assume the sRGBcolor space. When color equality needs to be decided, implementations,unless documented otherwise, treat two colors as equal if all their red,green, blue, and alpha values each differ by at most `1e-5`. Example (Java):import com.google.type.Color; // ... public static java.awt.ColorfromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ?protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color(protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); }public static Color toProto(java.awt.Color color) { float red = (float)color.getRed(); float green = (float) color.getGreen(); float blue = (float)color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder =Color .newBuilder() .setRed(red / denominator) .setGreen(green /denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if(alpha != 255) { result.setAlpha( FloatValue .newBuilder().setValue(((float) alpha) / denominator) .build()); } returnresultBuilder.build(); } // ... Example (iOS / Obj-C): // ... staticUIColor* fromProto(Color* protocolor) { float red = [protocolor red]; floatgreen = [protocolor green]; float blue = [protocolor blue]; FloatValue*alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:redgreen:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color){ CGFloat red, green, blue, alpha; if (![color getRed:&red green:&greenblue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc]init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue];if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; }[result autorelease]; return result; } // ... Example (JavaScript): // ...var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red ||0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue|| 0.0; var red = Math.floor(redFrac * 255); var green =Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if(!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } varalphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green,blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”);}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = newNumber((red << 16) | (green << 8) | blue); var hexString =rgbNumber.toString(16); var missingZeros = 6 - hexString.length; varresultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) {resultBuilder.push('0'); } resultBuilder.push(hexString); returnresultBuilder.join(”); }; // ...

func (Color)MarshalJSON

func (sColor) MarshalJSON() ([]byte,error)

func (*Color)UnmarshalJSON

func (s *Color) UnmarshalJSON(data []byte)error

typeDate

type Date struct {// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,// or 0 to specify a year by itself or a year and month where the day isn't// significant.Dayint64 `json:"day,omitempty"`// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without// a month and day.Monthint64 `json:"month,omitempty"`// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date// without a year.Yearint64 `json:"year,omitempty"`// ForceSendFields is a list of field names (e.g. "Day") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Day") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Date: Represents a whole or partial calendar date, such as a birthday. Thetime of day and time zone are either specified elsewhere or areinsignificant. The date is relative to the Gregorian Calendar. This canrepresent one of the following: * A full date, with non-zero year, month,and day values. * A month and day, with a zero year (for example, ananniversary). * A year on its own, with a zero month and a zero day. * Ayear and month, with a zero day (for example, a credit card expirationdate). Related types: * google.type.TimeOfDay * google.type.DateTime *google.protobuf.Timestamp

func (Date)MarshalJSON

func (sDate) MarshalJSON() ([]byte,error)

typeDayInfo

type DayInfo struct {// Date: The date in UTC at which the pollen forecast data is represented.Date *Date `json:"date,omitempty"`// PlantInfo: This list will include up to 15 pollen species affecting the// location specified in the request.PlantInfo []*PlantInfo `json:"plantInfo,omitempty"`// PollenTypeInfo: This list will include up to three pollen types (GRASS,// WEED, TREE) affecting the location specified in the request.PollenTypeInfo []*PollenTypeInfo `json:"pollenTypeInfo,omitempty"`// ForceSendFields is a list of field names (e.g. "Date") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Date") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

DayInfo: This object contains the daily forecast information for each dayrequested.

func (DayInfo)MarshalJSON

func (sDayInfo) MarshalJSON() ([]byte,error)

typeForecastLookupCall

type ForecastLookupCall struct {// contains filtered or unexported fields}

func (*ForecastLookupCall)Context

Context sets the context to be used in this call's Do method.

func (*ForecastLookupCall)Days

Days sets the optional parameter "days": Required. A number that indicateshow many forecast days to request (minimum value 1, maximum value is 5).

func (*ForecastLookupCall)Do

Do executes the "pollen.forecast.lookup" call.Any non-2xx status code is an error. Response headers are in either*LookupForecastResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*ForecastLookupCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*ForecastLookupCall)Header

func (c *ForecastLookupCall) Header()http.Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*ForecastLookupCall)IfNoneMatch

func (c *ForecastLookupCall) IfNoneMatch(entityTagstring) *ForecastLookupCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*ForecastLookupCall)LanguageCode

func (c *ForecastLookupCall) LanguageCode(languageCodestring) *ForecastLookupCall

LanguageCode sets the optional parameter "languageCode": Allows the clientto choose the language for the response. If data cannot be provided for thatlanguage, the API uses the closest match. Allowed values rely on the IETFBCP-47 standard. The default value is "en".

func (*ForecastLookupCall)LocationLatitude

func (c *ForecastLookupCall) LocationLatitude(locationLatitudefloat64) *ForecastLookupCall

LocationLatitude sets the optional parameter "location.latitude": Thelatitude in degrees. It must be in the range [-90.0, +90.0].

func (*ForecastLookupCall)LocationLongitude

func (c *ForecastLookupCall) LocationLongitude(locationLongitudefloat64) *ForecastLookupCall

LocationLongitude sets the optional parameter "location.longitude": Thelongitude in degrees. It must be in the range [-180.0, +180.0].

func (*ForecastLookupCall)PageSize

func (c *ForecastLookupCall) PageSize(pageSizeint64) *ForecastLookupCall

PageSize sets the optional parameter "pageSize": The maximum number of dailyinfo records to return per page. The default and max value is 5, indicating5 days of data.

func (*ForecastLookupCall)PageToken

func (c *ForecastLookupCall) PageToken(pageTokenstring) *ForecastLookupCall

PageToken sets the optional parameter "pageToken": A page token receivedfrom a previous daily call. It is used to retrieve the subsequent page. Notethat when providing a value for the page token, all other request parametersprovided must match the previous call that provided the page token.

func (*ForecastLookupCall)Pages

Pages invokes f for each page of results.A non-nil error returned from f will halt the iteration.The provided context supersedes any context provided to the Context method.

func (*ForecastLookupCall)PlantsDescription

func (c *ForecastLookupCall) PlantsDescription(plantsDescriptionbool) *ForecastLookupCall

PlantsDescription sets the optional parameter "plantsDescription": Containsgeneral information about plants, including details on their seasonality,special shapes and colors, information about allergic cross-reactions, andplant photos. The default value is "true".

typeForecastService

type ForecastService struct {// contains filtered or unexported fields}

funcNewForecastService

func NewForecastService(s *Service) *ForecastService

func (*ForecastService)Lookup

Lookup: Returns up to 5 days of daily pollen information in more than 65countries, up to 1km resolution.

typeHttpBody

type HttpBody struct {// ContentType: The HTTP Content-Type header value specifying the content type// of the body.ContentTypestring `json:"contentType,omitempty"`// Data: The HTTP request/response body as raw binary.Datastring `json:"data,omitempty"`// Extensions: Application specific response metadata. Must be set in the first// response for streaming APIs.Extensions []googleapi.RawMessage `json:"extensions,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ContentType") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ContentType") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

HttpBody: Message that represents an arbitrary HTTP body. It should only beused for payload formats that can't be represented as JSON, such as rawbinary or an HTML page. This message can be used both in streaming andnon-streaming API methods in the request as well as the response. It can beused as a top-level request field, which is convenient if one wants toextract parameters from either the URL or HTTP template into the requestfields and also want access to the raw HTTP body. Example: messageGetResourceRequest { // A unique request id. string request_id = 1; // Theraw HTTP body is bound to this field. google.api.HttpBody http_body = 2; }service ResourceService { rpc GetResource(GetResourceRequest) returns(google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns(google.protobuf.Empty); } Example with streaming methods: serviceCaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (streamgoogle.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns(stream google.api.HttpBody); } Use of this type only changes how therequest and response bodies are handled, all other features will continue towork unchanged.

func (HttpBody)MarshalJSON

func (sHttpBody) MarshalJSON() ([]byte,error)

typeIndexInfo

type IndexInfo struct {// Category: Text classification of index numerical score interpretation. The// index consists of six categories: * 0: "None" * 1: "Very low" * 2: "Low" *// 3: "Moderate" * 4: "High" * 5: "Very highCategorystring `json:"category,omitempty"`// Code: The index's code. This field represents the index for programming// purposes by using snake cases instead of spaces. Example: "UPI".//// Possible values://   "INDEX_UNSPECIFIED" - Unspecified index.//   "UPI" - Universal Pollen Index.Codestring `json:"code,omitempty"`// Color: The color used to represent the Pollen Index numeric score.Color *Color `json:"color,omitempty"`// DisplayName: A human readable representation of the index name. Example:// "Universal Pollen Index".DisplayNamestring `json:"displayName,omitempty"`// IndexDescription: Textual explanation of current index level.IndexDescriptionstring `json:"indexDescription,omitempty"`// Value: The index's numeric score. Numeric range is between 0 and 5.Valueint64 `json:"value,omitempty"`// ForceSendFields is a list of field names (e.g. "Category") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Category") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

IndexInfo: This object contains data representing specific pollen indexvalue, category and description.

func (IndexInfo)MarshalJSON

func (sIndexInfo) MarshalJSON() ([]byte,error)

typeLookupForecastResponse

type LookupForecastResponse struct {// DailyInfo: Required. This object contains the daily forecast information for// each day requested.DailyInfo []*DayInfo `json:"dailyInfo,omitempty"`// NextPageToken: Optional. The token to retrieve the next page.NextPageTokenstring `json:"nextPageToken,omitempty"`// RegionCode: The ISO_3166-1 alpha-2 code of the country/region corresponding// to the location provided in the request. This field might be omitted from// the response if the location provided in the request resides in a disputed// territory.RegionCodestring `json:"regionCode,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "DailyInfo") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DailyInfo") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

func (LookupForecastResponse)MarshalJSON

func (sLookupForecastResponse) MarshalJSON() ([]byte,error)

typeMapTypesHeatmapTilesLookupHeatmapTileCall

type MapTypesHeatmapTilesLookupHeatmapTileCall struct {// contains filtered or unexported fields}

func (*MapTypesHeatmapTilesLookupHeatmapTileCall)Context

Context sets the context to be used in this call's Do method.

func (*MapTypesHeatmapTilesLookupHeatmapTileCall)Do

Do executes the "pollen.mapTypes.heatmapTiles.lookupHeatmapTile" call.Any non-2xx status code is an error. Response headers are in either*HttpBody.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*MapTypesHeatmapTilesLookupHeatmapTileCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*MapTypesHeatmapTilesLookupHeatmapTileCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*MapTypesHeatmapTilesLookupHeatmapTileCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeMapTypesHeatmapTilesService

type MapTypesHeatmapTilesService struct {// contains filtered or unexported fields}

funcNewMapTypesHeatmapTilesService

func NewMapTypesHeatmapTilesService(s *Service) *MapTypesHeatmapTilesService

func (*MapTypesHeatmapTilesService)LookupHeatmapTile

LookupHeatmapTile: Returns a byte array containing the data of the tile PNGimage.

  • mapType: The type of the pollen heatmap. Defines the combination of pollentype and index that the map will graphically represent.
  • x: Defines the east-west point in the requested tile.
  • y: Defines the north-south point in the requested tile.
  • zoom: The map's zoom level. Defines how large or small the contents of amap appear in a map view. * Zoom level 0 is the entire world in a singletile. * Zoom level 1 is the entire world in 4 tiles. * Zoom level 2 is theentire world in 16 tiles. * Zoom level 16 is the entire world in 65,536tiles. Allowed values: 0-16.

typeMapTypesService

type MapTypesService struct {HeatmapTiles *MapTypesHeatmapTilesService// contains filtered or unexported fields}

funcNewMapTypesService

func NewMapTypesService(s *Service) *MapTypesService

typePlantDescription

type PlantDescription struct {// CrossReaction: Textual description of pollen cross reaction plants. Example:// Alder, Hazel, Hornbeam, Beech, Willow, and Oak pollen.CrossReactionstring `json:"crossReaction,omitempty"`// Family: A human readable representation of the plant family name. Example:// "Betulaceae (the Birch family)".Familystring `json:"family,omitempty"`// Picture: Link to the picture of the plant.Picturestring `json:"picture,omitempty"`// PictureCloseup: Link to a closeup picture of the plant.PictureCloseupstring `json:"pictureCloseup,omitempty"`// Season: Textual list of explanations of seasons where the pollen is active.// Example: "Late winter, spring".Seasonstring `json:"season,omitempty"`// SpecialColors: Textual description of the plants' colors of leaves, bark,// flowers or seeds that helps identify the plant.SpecialColorsstring `json:"specialColors,omitempty"`// SpecialShapes: Textual description of the plants' shapes of leaves, bark,// flowers or seeds that helps identify the plant.SpecialShapesstring `json:"specialShapes,omitempty"`// Type: The plant's pollen type. For example: "GRASS". A list of all available// codes could be found here.//// Possible values://   "POLLEN_TYPE_UNSPECIFIED" - Unspecified plant type.//   "GRASS" - Grass pollen type.//   "TREE" - Tree pollen type.//   "WEED" - Weed pollen type.Typestring `json:"type,omitempty"`// ForceSendFields is a list of field names (e.g. "CrossReaction") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CrossReaction") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PlantDescription: Contains general information about plants, includingdetails on their seasonality, special shapes and colors, information aboutallergic cross-reactions, and plant photos.

func (PlantDescription)MarshalJSON

func (sPlantDescription) MarshalJSON() ([]byte,error)

typePlantInfo

type PlantInfo struct {// Code: The plant code name. For example: "COTTONWOOD". A list of all// available codes could be found here.//// Possible values://   "PLANT_UNSPECIFIED" - Unspecified plant code.//   "ALDER" - Alder is classified as a tree pollen type.//   "ASH" - Ash is classified as a tree pollen type.//   "BIRCH" - Birch is classified as a tree pollen type.//   "COTTONWOOD" - Cottonwood is classified as a tree pollen type.//   "ELM" - Elm is classified as a tree pollen type.//   "MAPLE" - Maple is classified as a tree pollen type.//   "OLIVE" - Olive is classified as a tree pollen type.//   "JUNIPER" - Juniper is classified as a tree pollen type.//   "OAK" - Oak is classified as a tree pollen type.//   "PINE" - Pine is classified as a tree pollen type.//   "CYPRESS_PINE" - Cypress pine is classified as a tree pollen type.//   "HAZEL" - Hazel is classified as a tree pollen type.//   "GRAMINALES" - Graminales is classified as a grass pollen type.//   "RAGWEED" - Ragweed is classified as a weed pollen type.//   "MUGWORT" - Mugwort is classified as a weed pollen type.//   "JAPANESE_CEDAR" - Japanese cedar is classified as a tree pollen type.//   "JAPANESE_CYPRESS" - Japanese cypress is classified as a tree pollen type.Codestring `json:"code,omitempty"`// DisplayName: A human readable representation of the plant name. Example:// “Cottonwood".DisplayNamestring `json:"displayName,omitempty"`// InSeason: Indication of either the plant is in season or not.InSeasonbool `json:"inSeason,omitempty"`// IndexInfo: This object contains data representing specific pollen index// value, category and description.IndexInfo *IndexInfo `json:"indexInfo,omitempty"`// PlantDescription: Contains general information about plants, including// details on their seasonality, special shapes and colors, information about// allergic cross-reactions, and plant photos.PlantDescription *PlantDescription `json:"plantDescription,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PlantInfo: This object contains the daily information on specific plant.

func (PlantInfo)MarshalJSON

func (sPlantInfo) MarshalJSON() ([]byte,error)

typePollenTypeInfo

type PollenTypeInfo struct {// Code: The pollen type's code name. For example: "GRASS"//// Possible values://   "POLLEN_TYPE_UNSPECIFIED" - Unspecified plant type.//   "GRASS" - Grass pollen type.//   "TREE" - Tree pollen type.//   "WEED" - Weed pollen type.Codestring `json:"code,omitempty"`// DisplayName: A human readable representation of the pollen type name.// Example: "Grass"DisplayNamestring `json:"displayName,omitempty"`// HealthRecommendations: Textual list of explanations, related to health// insights based on the current pollen levels.HealthRecommendations []string `json:"healthRecommendations,omitempty"`// InSeason: Indication whether the plant is in season or not.InSeasonbool `json:"inSeason,omitempty"`// IndexInfo: Contains the Universal Pollen Index (UPI) data for the pollen// type.IndexInfo *IndexInfo `json:"indexInfo,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PollenTypeInfo: This object contains the pollen type index and healthrecommendation information on specific pollen type.

func (PollenTypeInfo)MarshalJSON

func (sPollenTypeInfo) MarshalJSON() ([]byte,error)

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentForecast *ForecastServiceMapTypes *MapTypesService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewService

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp