
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Use to send push notifications to Exponent Experiences from a Ruby server.
Add this line to your application's Gemfile:
gem 'exponent-server-sdk'
And then execute:
$ bundle
Or install it yourself as:
$ gem install exponent-server-sdk
The push client is the preferred way. This hits the latest version of the api.
Optional arguments: gzip: true
client = Exponent::Push::Client.new
# client = Exponent::Push::Client.new(gzip: true) # for compressed, faster requests
messages = [{
to: "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
sound: "default",
body: "Hello world!"
}, {
to: "ExponentPushToken[yyyyyyyyyyyyyyyyyyyyyy]",
badge: 1,
body: "You've got mail"
}]
# @Deprecated
# client.publish(messages)
# MAX 100 messages at a time
handler = client.send_messages(messages)
# Array of all errors returned from the API
# puts handler.errors
# you probably want to delay calling this because the service might take a few moments to send
# I would recommend reading the expo documentation regarding delivery delays
client.verify_deliveries(handler.receipt_ids)
See the getting started example. If you clone this repo, you can also use it to test locally by entering your ExponentPushToken. Otherwise it serves as a good copy pasta example to get you going.
The complete format of the messages can be found here.
If you have problems with the code in this repository, please file issues & bug reports. We encourage you to submit a pull request with a solution or a failing test to reproduce your issue. Thanks!
FAQs
Unknown package
We found that exponent-server-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.