From 56b71ca1bfc72fe508b89388d5a12d87ddd7ce0c Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Thu, 23 May 2019 10:12:42 -0700 Subject: [PATCH] API doc updates --- firebase_admin/_messaging_utils.py | 5 +---- firebase_admin/db.py | 2 +- firebase_admin/messaging.py | 10 +++++----- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/firebase_admin/_messaging_utils.py b/firebase_admin/_messaging_utils.py index 373adf68c..17067f175 100644 --- a/firebase_admin/_messaging_utils.py +++ b/firebase_admin/_messaging_utils.py @@ -57,11 +57,8 @@ def __init__(self, data=None, notification=None, android=None, webpush=None, apn class MulticastMessage(object): """A message that can be sent to multiple tokens via Firebase Cloud Messaging. - Contains payload information as well as recipient information. In particular, the message must - contain exactly one of token, topic or condition fields. - Args: - tokens: A list of registration token of the device to which the message should be sent. + tokens: A list of registration tokens of targeted devices. data: A dictionary of data fields (optional). All keys and values in the dictionary must be strings. notification: An instance of ``messaging.Notification`` (optional). diff --git a/firebase_admin/db.py b/firebase_admin/db.py index f1bbeba8e..778699d47 100644 --- a/firebase_admin/db.py +++ b/firebase_admin/db.py @@ -351,7 +351,7 @@ def listen(self, callback): The specified callback function will get invoked with ``db.Event`` objects for each realtime update received from the database. It will also get called whenever the SDK - reconnects to the server due to network issues and credential expiration. In general, + reconnects to the server due to network issues or credential expiration. In general, the OAuth2 credentials used to authorize connections to the server expire every hour. Therefore clients should expect the ``callback`` to fire at least once every hour, even if there are no updates in the database. diff --git a/firebase_admin/messaging.py b/firebase_admin/messaging.py index 8129f8de1..35d9e4ccd 100644 --- a/firebase_admin/messaging.py +++ b/firebase_admin/messaging.py @@ -94,7 +94,7 @@ def send(message, dry_run=False, app=None): string: A message ID string that uniquely identifies the sent the message. Raises: - ApiCallError: If an error occurs while sending the message to FCM service. + ApiCallError: If an error occurs while sending the message to the FCM service. ValueError: If the input arguments are invalid. """ return _get_messaging_service(app).send(message, dry_run) @@ -114,7 +114,7 @@ def send_all(messages, dry_run=False, app=None): BatchResponse: A ``messaging.BatchResponse`` instance. Raises: - ApiCallError: If an error occurs while sending the message to FCM service. + ApiCallError: If an error occurs while sending the message to the FCM service. ValueError: If the input arguments are invalid. """ return _get_messaging_service(app).send_all(messages, dry_run) @@ -134,7 +134,7 @@ def send_multicast(multicast_message, dry_run=False, app=None): BatchResponse: A ``messaging.BatchResponse`` instance. Raises: - ApiCallError: If an error occurs while sending the message to FCM service. + ApiCallError: If an error occurs while sending the message to the FCM service. ValueError: If the input arguments are invalid. """ if not isinstance(multicast_message, MulticastMessage): @@ -285,7 +285,7 @@ def __init__(self, resp, exception): @property def message_id(self): - """A message ID string that uniquely identifies the sent the message.""" + """A message ID string that uniquely identifies the message.""" return self._message_id @property @@ -295,7 +295,7 @@ def success(self): @property def exception(self): - """A ApiCallError if an error occurs while sending the message to FCM service.""" + """An ApiCallError if an error occurs while sending the message to the FCM service.""" return self._exception