Project

faast

0.0
No commit activity in last 3 years
No release in over 3 years
A ruby library for the Faast push notification service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0
 Project Readme

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>