Project

uniqush-rb

0.0
No commit activity in last 3 years
No release in over 3 years
Client for uniqush-push server for push notifications using GCM, APNS and others http://uniqush.org/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
>= 3.1.0, ~> 3.1
>= 1.18.0, ~> 1.18

Runtime

>= 1.8.0, ~> 1.8
 Project Readme

uniqush-rb

A ruby client for uniqush-push the push notification server that handles GCM, APNS and others.

Installation

Add this line to your application's Gemfile:

gem 'uniqush-rb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install uniqush-rb

Usage

This is a minimalistic client using rest-client, it provides a client to handle HTTP requests to a uniqush-push server. Get full documentation on supported params for each request on uniqush docs.

require "uniqush-rb"

uniqush = Uniqush::Client.new("http://localhost:9898")

Managing services

# GET /addpsp
uniqush.add_service(service: "gravity_calculator", pushservicetype: "gcm", projectid: "com.grav.calc", apikey: "foobarbaz")

# GET /rmpsp
uniqush.remove_service(service: "gravity_calculator", pushservicetype: "gcm", projectid: "com.grav.calc", apikey: "foobarbaz")

Managing subscriptions

# GET /subscribe
uniqush.subscribe_device(service: "gravity_calculator", subscriber: "198", pushservicetype: "gcm", regid: "foobarbaz")

# GET /unsubscribe
uniqush.unsubscribe_device(service: "gravity_calculator", subscriber: "198", pushservicetype: "gcm", regid: "foobarbaz")

Pushing

# GET /push
uniqush.push(service: "gravity_calculator", subscriber: "198", msg: "Gravity is pretty low, float yo!")

Housekeeping

# GET /version
uniqush.version

# GET /stop
uniqush.stop

Contributing

  1. Fork it ( https://github.com/rafaelbandeira3/uniqush-rb/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request