Skip to content

Commit

Permalink
Updated instance ID API docs (#193)
Browse files Browse the repository at this point in the history
* Updated instance ID API docs

* Fixing some typos and other minor formatting changes
  • Loading branch information
hiranya911 committed Aug 20, 2018
1 parent 73616a7 commit 6de5777
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 5 additions & 5 deletions firebase_admin/db.py
Expand Up @@ -44,11 +44,11 @@


def reference(path='/', app=None, url=None):
"""Returns a database Reference representing the node at the specified path.
"""Returns a database ``Reference`` representing the node at the specified path.
If no path is specified, this function returns a Reference that represents the database root.
By default, the returned References provide access to the Firebase Database specified at
app initialization. To connect to a different Database instance in the same Firebase project,
If no path is specified, this function returns a ``Reference`` that represents the database
root. By default, the returned References provide access to the Firebase Database specified at
app initialization. To connect to a different database instance in the same Firebase project,
specify the ``url`` parameter.
Args:
Expand Down Expand Up @@ -350,7 +350,7 @@ def listen(self, callback):
"""Registers the ``callback`` function to receive realtime updates.
The specified callback function will get invoked with ``db.Event`` objects for each
realtime update received from the Database.
realtime update received from the database.
This API is based on the event streaming support available in the Firebase REST API. Each
call to ``listen()`` starts a new HTTP connection and a background thread. This is an
Expand Down
10 changes: 7 additions & 3 deletions firebase_admin/instance_id.py
Expand Up @@ -33,10 +33,11 @@ def _get_iid_service(app):


def delete_instance_id(instance_id, app=None):
"""Deletes the specified instance ID from Firebase.
"""Deletes the specified instance ID and the associated data from Firebase.
This can be used to delete an instance ID and associated user data from a Firebase project,
pursuant to the General Data Protection Regulation (GDPR).
Note that Google Analytics for Firebase uses its own form of Instance ID to
keep track of analytics data. Therefore deleting a regular Instance ID does
not delete Analytics data. See `Delete an Instance ID`_ for more information.
Args:
instance_id: A non-empty instance ID string.
Expand All @@ -45,6 +46,9 @@ def delete_instance_id(instance_id, app=None):
Raises:
InstanceIdError: If an error occurs while invoking the backend instance ID service.
ValueError: If the specified instance ID or app is invalid.
.. _Delete an Instance ID: https://firebase.google.com/support/privacy\
/manage-iids#delete_an_instance_id
"""
_get_iid_service(app).delete_instance_id(instance_id)

Expand Down
4 changes: 2 additions & 2 deletions firebase_admin/messaging.py
Expand Up @@ -321,11 +321,11 @@ class WebpushNotification(object):
notification replaces an old one (optional).
require_interaction: A boolean indicating whether a notification should remain active
until the user clicks or dismisses it, rather than closing automatically (optional).
silent: True to indicate that the notification should be silent (optional).
silent: ``True`` to indicate that the notification should be silent (optional).
tag: An identifying tag on the notification (optional).
timestamp_millis: A timestamp value in milliseconds on the notification (optional).
vibrate: A vibration pattern for the device's vibration hardware to emit when the
notification fires (optional). THe pattern is specified as an integer array.
notification fires (optional). The pattern is specified as an integer array.
custom_data: A dict of custom key-value pairs to be included in the notification
(optional)
Expand Down

0 comments on commit 6de5777

Please sign in to comment.