Skip to content

Commit

Permalink
Merge pull request #337 from olucurious/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
olucurious authored Jun 20, 2024
2 parents 871dc7a + 6e7e8d1 commit c519b15
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyfcm/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__summary__ = "Python client for FCM - Firebase Cloud Messaging (Android, iOS and Web)"
__url__ = "https://github.com/olucurious/pyfcm"

__version__ = "2.0.2"
__version__ = "2.0.3"

__author__ = "Emmanuel Adegbite"
__email__ = "[email protected]"
Expand Down
4 changes: 3 additions & 1 deletion pyfcm/baseapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ def parse_response(self, response):
return response.json()

elif response.status_code == 401:
raise ("There was an error authenticating the sender account")
raise AuthenticationError(
"There was an error authenticating the sender account"
)
elif response.status_code == 400:
raise InvalidDataError(response.text)
elif response.status_code == 404:
Expand Down
4 changes: 2 additions & 2 deletions pyfcm/fcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class FCMNotification(BaseAPI):
def notify(
self,
fcm_token,
fcm_token=None,
notification_title=None,
notification_body=None,
notification_image=None,
Expand All @@ -23,7 +23,7 @@ def notify(
Send push notification to a single device
Args:
fcm_token (str): FCM device registration ID
fcm_token (str, optional): FCM device registration ID
notification_title (str, optional): Message title to display in the notification tray
notification_body (str, optional): Message string to display in the notification tray
notification_image (str, optional): Icon that appears next to the notification
Expand Down

0 comments on commit c519b15

Please sign in to comment.