Ruby bindings to Firebase Cloud Messaging (FCM) for Android, iOS or Web
Google::Auth::ServiceAccountCredentials
#103faraday
versions from 1 up to 2 #101Full Changelog: https://github.com/decision-labs/fcm/compare/v1.0.7...v1.0.8
Huge thanks to @excid3 @jsparling @jensljungblad
https://github.com/decision-labs/fcm#107
get_instance_id_info
option params by @jsparling in https://github.com/decision-labs/fcm/pull/98
Full Changelog: https://github.com/decision-labs/fcm/compare/v1.0.6...v1.0.7
This release adds support for send_v1
method that allows sending via HTTP v1. See the official migration guide for more info. This release is somewhat of a work around until the next release will refactor this to use namespace and deprecate this method.
Example the the new version:
fcm = FCM.new(
API_TOKEN,
GOOGLE_APPLICATION_CREDENTIALS_PATH,
FIREBASE_PROJECT_ID
)
message = {
'topic': "89023", # OR token if you want to send to a specific device
# 'token': "000iddqd",
'data': {
payload: {
data: {
id: 1
}
}.to_json
},
'notification': {
title: notification.title_th,
body: notification.body_th,
},
'android': {},
'apns': {
payload: {
aps: {
sound: "default",
category: "#{Time.zone.now.to_i}"
}
}
},
'fcm_options': {
analytics_label: 'Label'
}
}
fcm.send_v1(message)
make faraday
dependency use pessimistic versioning via ~> 1.0.0
ruby 2.4
and abovefaraday
dependency fixed to 1.0.0
Fixes httparty dependency version