Skip to content

cjlucas/ruby-faast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverage Status Build Status

This is a simple library for the Faast push notification service.

Currently only the REST API is supported.


Synopsis

require 'faast'

# user credentials can be set at the module level or directly in the Notification instance
Faast.user_credentials = 'api_key'

# create a notification instance
notification = Faast::Notification.new

notification.title    = 'This is the title'
notification.message  = 'This is the message'
notfication.icon_url  = 'https://github.com/favicon.ico'

notification.send
# => #<Net::HTTPOK 200 OK readbody=true>

# or use the block interface (this is prefered)
resp = Faast::Notification.send do |notification|
  notification.title    = 'This is the title'
  notification.message  = 'This is the message'
  notfication.icon_url  = 'https://github.com/favicon.ico'
end

resp
# => #<Net::HTTPOK 200 OK readbody=true>

About

A ruby library for the Faast push notification service

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages