Skip to content

nano3labs/expo-server-sdk-ruby

 
 

Repository files navigation

Exponent Server SDK Ruby

Build Status Gem Version

FIX: Doing this because SDK has a bug

(fix) Validation situations where Expo returns a 200 with an error #14

Installation

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

Usage

Client

The push client is the preferred way. This hits the latest version of the api.

client = Exponent::Push::Client.new

messages = [{
  to: "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  sound: "default",
  body: "Hello world!"
}, {
  to: "ExponentPushToken[yyyyyyyyyyyyyyyyyyyyyy]",
  badge: 1,
  body: "You've got mail"
}]

client.publish messages

The complete format of the messages can be found here.

Contributing

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!

About

Exponent Server SDK Ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%