Link | SHp_prowl_9 |
Author | Jonathan Guthrie |
Category | Custom Tag |
Version | 9.x |
License | Public Domain |
Posted | 05 Nov 2010 |
Updated | 05 Nov 2010 |
More by this author... |
Wrapper for the Prowl iPhone notification API. Allows you to send messages from Lasso to your iPhone 3G/3GS via Push notifications. Requires the iPhone Prowl app to receive the notifications. (see http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=320876271 ) More info on Prowl: http://prowl.weks.net NOTE: this is a Lasso 9 port of Lieven Gekiere's SHp_prowl tag for Lasso 8.5 (http://tagswap.net/SHp_prowl)
local(p = prowl) #p->apikey = 'XXX' #p->application = 'Lasso 9' #p->update('Hello, this is your conscience speaking.')
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define prowl => type { data public apikey::string = string, public application::string = string private apicheck() => { return .apikey != '' } public retrieve(path::string,post::string='') => { fail_if(!.apicheck, -1, 'api key not set.') protect => { handle_error => { local(response = 'There was a problem communicating with Prowl.') } local(getparams = array( 'apikey='+.apikey, 'application='+encode_url(.application), 'event='+encode_url(#post) )) local(response = include_url('https://prowl.weks.net' + #path + '?' + #getparams->join('&'))) } return #response } public update(event::string) => { local(path = '/publicapi/add') return .retrieve(#path, string_truncate(#event, 1024)) } }
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft