README.md in fcm-0.0.6 vs README.md in fcm-0.0.7

- old
+ new

@@ -20,13 +20,15 @@ For Android you will need a device running 2.3 (or newer) that also have the Google Play Store app installed, or an emulator running Android 2.3 with Google APIs. iOS devices are also supported. One of the following, tested Ruby versions: - `2.0.0` -- `2.1.9` -- `2.2.5` -- `2.3.1` +- `2.1.10` +- `2.2.10` +- `2.3.8` +- `2.4.5` +- `2.5.3` ## Usage For your server to send a message to one or more devices, you must first initialise a new `FCM` class with your Firebase Cloud Messaging server key, and then call the `send` method on this and give it 1 or more (up to 1000) registration tokens as an array of strings. You can also optionally send further [HTTP message parameters](https://firebase.google.com/docs/cloud-messaging/http-server-ref) like `data` or `time_to_live` etc. as a hash via the second optional argument to `send`. @@ -41,16 +43,15 @@ # - ref: https://github.com/jnunemaker/httparty/blob/master/lib/httparty.rb#L29-L60 # fcm = FCM.new("my_server_key", timeout: 3) registration_ids= ["12", "13"] # an array of one or more client registration tokens -# See https://developers.google.com/cloud-messaging/http for all available options. +# See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages for all available options. options = { "notification": { "title": "Portugal vs. Denmark", - "text": "5 to 1" - }, - "to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..." + "body": "5 to 1" + } } response = fcm.send(registration_ids, options) ``` Currently `response` is just a hash containing the response `body`, `headers` and `status_code`. Check [here](https://firebase.google.com/docs/cloud-messaging/server#response) to see how to interpret the responses. @@ -171,9 +172,13 @@ You can find a guide to implement an Android Client app to receive notifications here: [Set up a FCM Client App on Android](https://firebase.google.com/docs/cloud-messaging/android/client). The guide to set up an iOS app to get notifications is here: [Setting up a FCM Client App on iOS](https://firebase.google.com/docs/cloud-messaging/ios/client). ## ChangeLog + +### 0.0.7 + +- replace `httparty` with `faraday` ### 0.0.2 - Fixed group messaging url. - Added API to `recover_notification_key`.