Project

prowlr

0.0
No commit activity in last 3 years
No release in over 3 years
Yet another Prowl API gem and command line interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

prowlr

Yet another Prowl API gem. Includes a command line interface. Depends on (the very awesome) httparty.

Install: gem install robbevan-prowlr --source=http://gems.github.com/

Add event:

Prowlr.add(:apikey => 'apikey', :event => 'Notification from prowlr gem', :description => "Sent: #{Time.now}")
=> {"code"=>"200", "remaining"=>"981", "resetdate"=>"1247481311"}

Required: apikey and event or description. Optional: application, providerkey, priority. See API for details.

Create instance and add event:

prowlr = Prowlr.new('apikey')
prowlr.add(:event => 'Notification from prowlr gem', :description => "Sent: #{Time.now}")
=> {"code"=>"200", "remaining"=>"980", "resetdate"=>"1247481311"}

Verify:

Prowlr.verify('apikey')
=> {"code"=>"200", "remaining"=>"979", "resetdate"=>"1247481311"}

Valid API key?

Prowlr.valid_apikey?('apikey')
=> true (or false)

Remaining calls:

Prowlr.remaining_calls('apikey')
=> 997 (or nil if API key not valid)

Reset date:

Prowlr.reset_date('apikey')
=> Mon Jul 13 11:35:11 +0100 2009 (or nil if API key not valid)

See examples.

From the command line:

prowlr -h
USAGE: /opt/local/bin/prowlr [options] [apikey] [event]
    -a, --application [APPLICATION]  Name of your application. Defaults to prowlr.gem if omitted.
    -d, --description [DESCRIPTION]  Description of the event
    -k, --providerkey [PROVIDER KEY] Your provider API key. Only necessary if you have been whitelisted.
    -p, --priority [PRIORITY]        Priority: an integer value ranging [-2, 2]: Very Low, Moderate, Normal, High, Emergency. Defaults to 0 if omitted.
    -h, --help                       Show help documentation

Post a url to your iPhone:

prowlr apikey -d 'http://www.google.com' 'URL'

Post a phone number:

prowlr apikey -d '0800 800 8000' 'Phone number'

Copyright

Copyright (c) 2009 Rob Bevan. See LICENSE for details.