Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #149 from vigneshgurusamy/vignesh/readme-patch
Browse files Browse the repository at this point in the history
Readme update for downstream message error response codes
  • Loading branch information
brozot authored Aug 14, 2019
2 parents 418dc96 + e01be8b commit 1e8ea17
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ To get the latest version of Laravel-FCM on your project, require it from "compo

Or you can add it directly in your composer.json file:


{
"require": {
"brozot/laravel-fcm": "1.2.*"
}
}
```json
{
"require": {
"brozot/laravel-fcm": "1.2.*"
}
}
```


### Laravel
Expand Down Expand Up @@ -148,16 +149,17 @@ $downstreamResponse->numberSuccess();
$downstreamResponse->numberFailure();
$downstreamResponse->numberModification();

//return Array - you must remove all this tokens in your database
// return Array - you must remove all this tokens in your database
$downstreamResponse->tokensToDelete();

//return Array (key : oldToken, value : new token - you must change the token in your database )
// return Array (key : oldToken, value : new token - you must change the token in your database)
$downstreamResponse->tokensToModify();

//return Array - you should try to resend the message to the tokens in the array
// return Array - you should try to resend the message to the tokens in the array
$downstreamResponse->tokensToRetry();

// return Array (key:token, value:errror) - in production you should remove from your database the tokens
// return Array (key:token, value:error) - in production you should remove from your database the tokens
$downstreamResponse->tokensWithError();
```

#### Sending a Downstream Message to Multiple Devices
Expand Down Expand Up @@ -186,19 +188,21 @@ $downstreamResponse->numberSuccess();
$downstreamResponse->numberFailure();
$downstreamResponse->numberModification();

//return Array - you must remove all this tokens in your database
// return Array - you must remove all this tokens in your database
$downstreamResponse->tokensToDelete();

//return Array (key : oldToken, value : new token - you must change the token in your database )
// return Array (key : oldToken, value : new token - you must change the token in your database)
$downstreamResponse->tokensToModify();

//return Array - you should try to resend the message to the tokens in the array
// return Array - you should try to resend the message to the tokens in the array
$downstreamResponse->tokensToRetry();

// return Array (key:token, value:errror) - in production you should remove from your database the tokens present in this array
// return Array (key:token, value:error) - in production you should remove from your database the tokens present in this array
$downstreamResponse->tokensWithError();
```

> Kindly refer [Downstream message error response codes](https://firebase.google.com/docs/cloud-messaging/http-server-ref#error-codes) documentation for more information.
### Topics Messages

A topics message is a notification message, data message, or both, that you send to all the devices registered to this topic.
Expand Down

0 comments on commit 1e8ea17

Please sign in to comment.