Movatterモバイル変換


[0]ホーム

URL:


fcmdata

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 fcmdata provides access to the Firebase Cloud Messaging Data API.

For product documentation, see:https://firebase.google.com/docs/cloud-messaging

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/fcmdata/v1beta1"...ctx := context.Background()fcmdataService, err := fcmdata.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:

fcmdataService, err := fcmdata.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, ...)fcmdataService, err := fcmdata.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

typeGoogleFirebaseFcmDataV1beta1AndroidDeliveryData

type GoogleFirebaseFcmDataV1beta1AndroidDeliveryData struct {// AnalyticsLabel: The analytics label associated with the messages sent. All// messages sent without an analytics label will be grouped together in a// single entry.AnalyticsLabelstring `json:"analyticsLabel,omitempty"`// AppId: The app ID to which the messages were sent.AppIdstring `json:"appId,omitempty"`// Data: The data for the specified appId, date, and analyticsLabel.Data *GoogleFirebaseFcmDataV1beta1Data `json:"data,omitempty"`// Date: The date represented by this entry.Date *GoogleTypeDate `json:"date,omitempty"`// ForceSendFields is a list of field names (e.g. "AnalyticsLabel") 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. "AnalyticsLabel") 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:"-"`}

GoogleFirebaseFcmDataV1beta1AndroidDeliveryData: Message delivery data for agiven date, app, and analytics label combination.

func (GoogleFirebaseFcmDataV1beta1AndroidDeliveryData)MarshalJSON

typeGoogleFirebaseFcmDataV1beta1Data

type GoogleFirebaseFcmDataV1beta1Data struct {// CountMessagesAccepted: Count of messages accepted by FCM intended for// Android devices. The targeted device must have opted in to the collection of// usage and diagnostic information.CountMessagesAcceptedint64 `json:"countMessagesAccepted,omitempty,string"`// CountNotificationsAccepted: Count of notifications accepted by FCM intended// for Android devices. The targeted device must have opted in to the// collection of usage and diagnostic information.CountNotificationsAcceptedint64 `json:"countNotificationsAccepted,omitempty,string"`// DeliveryPerformancePercents: Additional information about delivery// performance for messages that were successfully delivered.DeliveryPerformancePercents *GoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents `json:"deliveryPerformancePercents,omitempty"`// MessageInsightPercents: Additional general insights about message delivery.MessageInsightPercents *GoogleFirebaseFcmDataV1beta1MessageInsightPercents `json:"messageInsightPercents,omitempty"`// MessageOutcomePercents: Mutually exclusive breakdown of message delivery// outcomes.MessageOutcomePercents *GoogleFirebaseFcmDataV1beta1MessageOutcomePercents `json:"messageOutcomePercents,omitempty"`// ProxyNotificationInsightPercents: Additional insights about proxy// notification delivery.ProxyNotificationInsightPercents *GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents `json:"proxyNotificationInsightPercents,omitempty"`// ForceSendFields is a list of field names (e.g. "CountMessagesAccepted") 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. "CountMessagesAccepted") 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:"-"`}

GoogleFirebaseFcmDataV1beta1Data: Data detailing messaging delivery

func (GoogleFirebaseFcmDataV1beta1Data)MarshalJSON

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

typeGoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents

type GoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents struct {// DelayedDeviceDoze: The percentage of accepted messages that were delayed// because the device was in doze mode. Only normal priority messages// (https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message)// should be delayed due to doze mode.DelayedDeviceDozefloat64 `json:"delayedDeviceDoze,omitempty"`// DelayedDeviceOffline: The percentage of accepted messages that were delayed// because the target device was not connected at the time of sending. These// messages were eventually delivered when the device reconnected.DelayedDeviceOfflinefloat64 `json:"delayedDeviceOffline,omitempty"`// DelayedMessageThrottled: The percentage of accepted messages that were// delayed due to message throttling, such as collapsible message throttling// (https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_throttling)// or maximum message rate throttling// (https://firebase.google.com/docs/cloud-messaging/concept-options#device_throttling).DelayedMessageThrottledfloat64 `json:"delayedMessageThrottled,omitempty"`// DelayedUserStopped: The percentage of accepted messages that were delayed// because the intended device user-profile was stopped// (https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages)// on the target device at the time of the send. The messages were eventually// delivered when the user-profile was started again.DelayedUserStoppedfloat64 `json:"delayedUserStopped,omitempty"`// DeliveredNoDelay: The percentage of accepted messages that were delivered to// the device without delay from the FCM system.DeliveredNoDelayfloat64 `json:"deliveredNoDelay,omitempty"`// ForceSendFields is a list of field names (e.g. "DelayedDeviceDoze") 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. "DelayedDeviceDoze") 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:"-"`}

GoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents: Overview ofdelivery performance for messages that were successfully delivered. Allpercentages are calculated with countMessagesAccepted as the denominator.These categories are not mutually exclusive; a message can be delayed formultiple reasons.

func (GoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents)MarshalJSON

func (*GoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents)UnmarshalJSON

typeGoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse

type GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse struct {// AndroidDeliveryData: The delivery data for the provided app. There will be// one entry per combination of app, date, and analytics label.AndroidDeliveryData []*GoogleFirebaseFcmDataV1beta1AndroidDeliveryData `json:"androidDeliveryData,omitempty"`// NextPageToken: A token, which can be sent as `page_token` to retrieve the// next page. If this field is omitted, there are no subsequent pages.NextPageTokenstring `json:"nextPageToken,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AndroidDeliveryData") 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. "AndroidDeliveryData") 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:"-"`}

GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse: Responsemessage for ListAndroidDeliveryData.

func (GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse)MarshalJSON

typeGoogleFirebaseFcmDataV1beta1MessageInsightPercents

type GoogleFirebaseFcmDataV1beta1MessageInsightPercents struct {// PriorityLowered: The percentage of accepted messages that had their priority// lowered from high to normal. See documentation for setting message priority// (https://firebase.google.com/docs/cloud-messaging/android/message-priority).PriorityLoweredfloat64 `json:"priorityLowered,omitempty"`// ForceSendFields is a list of field names (e.g. "PriorityLowered") 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. "PriorityLowered") 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:"-"`}

GoogleFirebaseFcmDataV1beta1MessageInsightPercents: Additional informationabout message delivery. All percentages are calculated withcountMessagesAccepted as the denominator.

func (GoogleFirebaseFcmDataV1beta1MessageInsightPercents)MarshalJSON

func (*GoogleFirebaseFcmDataV1beta1MessageInsightPercents)UnmarshalJSON

typeGoogleFirebaseFcmDataV1beta1MessageOutcomePercents

type GoogleFirebaseFcmDataV1beta1MessageOutcomePercents struct {// Collapsed: The percentage of accepted messages that were collapsed// (https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages)// by another message.Collapsedfloat64 `json:"collapsed,omitempty"`// Delivered: The percentage of all accepted messages that were successfully// delivered to the device.Deliveredfloat64 `json:"delivered,omitempty"`// DroppedAppForceStopped: The percentage of accepted messages that were// dropped because the application was force stopped on the device at the time// of delivery and retries were unsuccessful.DroppedAppForceStoppedfloat64 `json:"droppedAppForceStopped,omitempty"`// DroppedDeviceInactive: The percentage of accepted messages that were dropped// because the target device is inactive. FCM will drop messages if the target// device is deemed inactive by our servers. If a device does reconnect, we// call OnDeletedMessages()// (https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages)// in our SDK instead of delivering the messages.DroppedDeviceInactivefloat64 `json:"droppedDeviceInactive,omitempty"`// DroppedTooManyPendingMessages: The percentage of accepted messages that were// dropped due to too many undelivered non-collapsible messages// (https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages).// Specifically, each app instance can only have 100 pending messages stored on// our servers for a device which is disconnected. When that device reconnects,// those messages are delivered. When there are more than the maximum pending// messages, we call OnDeletedMessages()// (https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages)// in our SDK instead of delivering the messages.DroppedTooManyPendingMessagesfloat64 `json:"droppedTooManyPendingMessages,omitempty"`// DroppedTtlExpired: The percentage of accepted messages that expired because// Time To Live (TTL)// (https://firebase.google.com/docs/cloud-messaging/concept-options#ttl)// elapsed before the target device reconnected.DroppedTtlExpiredfloat64 `json:"droppedTtlExpired,omitempty"`// Pending: The percentage of messages accepted on this day that were not// dropped and not delivered, due to the device being disconnected (as of the// end of the America/Los_Angeles day when the message was sent to FCM). A// portion of these messages will be delivered the next day when the device// connects but others may be destined to devices that ultimately never// reconnect.Pendingfloat64 `json:"pending,omitempty"`// ForceSendFields is a list of field names (e.g. "Collapsed") 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. "Collapsed") 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:"-"`}

GoogleFirebaseFcmDataV1beta1MessageOutcomePercents: Percentage breakdown ofmessage delivery outcomes. These categories are mutually exclusive. Allpercentages are calculated with countMessagesAccepted as the denominator.These categories may not account for all message outcomes.

func (GoogleFirebaseFcmDataV1beta1MessageOutcomePercents)MarshalJSON

func (*GoogleFirebaseFcmDataV1beta1MessageOutcomePercents)UnmarshalJSON

typeGoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercentsadded inv0.182.0

type GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents struct {// Failed: The percentage of accepted notifications that failed to be proxied.// This is usually caused by exceptions that occurred while calling// notifyAsPackage// (https://developer.android.com/reference/android/app/NotificationManager#notifyAsPackage%28java.lang.String,%20java.lang.String,%20int,%20android.app.Notification%29).Failedfloat64 `json:"failed,omitempty"`// Proxied: The percentage of accepted notifications that were successfully// proxied by Google Play services// (https://developers.google.com/android/guides/overview).Proxiedfloat64 `json:"proxied,omitempty"`// SkippedNotThrottled: The percentage of accepted notifications that were// skipped because the messages were not throttled.SkippedNotThrottledfloat64 `json:"skippedNotThrottled,omitempty"`// SkippedOptedOut: The percentage of accepted notifications that were skipped// because the app disallowed these messages to be proxied.SkippedOptedOutfloat64 `json:"skippedOptedOut,omitempty"`// SkippedUnconfigured: The percentage of accepted notifications that were// skipped because configurations required for notifications to be proxied were// missing.SkippedUnconfiguredfloat64 `json:"skippedUnconfigured,omitempty"`// SkippedUnsupported: The percentage of accepted notifications that were// skipped because proxy notification is unsupported for the recipient.SkippedUnsupportedfloat64 `json:"skippedUnsupported,omitempty"`// ForceSendFields is a list of field names (e.g. "Failed") 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. "Failed") 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:"-"`}

GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents: Additionalinformation about proxy notification(https://firebase.google.com/docs/cloud-messaging/android/message-priority#proxy)delivery. All percentages are calculated with countNotificationsAccepted asthe denominator.

func (GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents)MarshalJSONadded inv0.182.0

func (*GoogleFirebaseFcmDataV1beta1ProxyNotificationInsightPercents)UnmarshalJSONadded inv0.182.0

typeGoogleTypeDate

type GoogleTypeDate 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:"-"`}

GoogleTypeDate: Represents a whole or partial calendar date, such as abirthday. The time of day and time zone are either specified elsewhere orare insignificant. 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 (GoogleTypeDate)MarshalJSON

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

typeProjectsAndroidAppsDeliveryDataListCall

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

func (*ProjectsAndroidAppsDeliveryDataListCall)Context

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

func (*ProjectsAndroidAppsDeliveryDataListCall)Do

Do executes the "fcmdata.projects.androidApps.deliveryData.list" call.Any non-2xx status code is an error. Response headers are in either*GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse.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 (*ProjectsAndroidAppsDeliveryDataListCall)Fields

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

func (*ProjectsAndroidAppsDeliveryDataListCall)Header

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

func (*ProjectsAndroidAppsDeliveryDataListCall)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.

func (*ProjectsAndroidAppsDeliveryDataListCall)PageSize

PageSize sets the optional parameter "pageSize": The maximum number ofentries to return. The service may return fewer than this value. Ifunspecified, at most 1,000 entries will be returned. The maximum value is10,000; values above 10,000 will be capped to 10,000. This default maychange over time.

func (*ProjectsAndroidAppsDeliveryDataListCall)PageToken

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous `ListAndroidDeliveryDataRequest` call. Provide this toretrieve the subsequent page. When paginating, all other parameters providedto `ListAndroidDeliveryDataRequest` must match the call that provided thepage token.

func (*ProjectsAndroidAppsDeliveryDataListCall)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.

typeProjectsAndroidAppsDeliveryDataService

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

func (*ProjectsAndroidAppsDeliveryDataService)List

List: List aggregate delivery data for the given Android application.

  • parent: The application for which to list delivery data. Format:`projects/{project_id}/androidApps/{app_id}`.

typeProjectsAndroidAppsService

type ProjectsAndroidAppsService struct {DeliveryData *ProjectsAndroidAppsDeliveryDataService// contains filtered or unexported fields}

funcNewProjectsAndroidAppsService

func NewProjectsAndroidAppsService(s *Service) *ProjectsAndroidAppsService

typeProjectsService

type ProjectsService struct {AndroidApps *ProjectsAndroidAppsService// contains filtered or unexported fields}

funcNewProjectsService

func NewProjectsService(s *Service) *ProjectsService

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentProjects *ProjectsService// 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