Link | SHp_prowl |
Author | Lieven Gekiere |
Category | Custom Tag |
Version | 8.5.x |
License | Public Domain |
Posted | 08 Aug 2009 |
Updated | 10 Aug 2009 |
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
[include:'SHp_prowl.inc'] [var:'p'=prowl(-apikey='xxxxxxxxxxxxxx', -application='Lasso')] [$p->update('This notification is powered by Lasso.')]
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.
[//lasso // Prowl Notification API for Lasso // (c)2009 Lieven Gekiere/SHpartners Belgium define_type( 'prowl', -description='Implements the Prowl Notification API in Lasso.' ); local( 'apikey' = string, 'application' = string ); define_tag( 'oncreate', -opt='apikey', -type='string', -opt='application', -type='string' ); local_defined('apikey') ? self->apikey = #apikey; local_defined('application') ? self->application = #application; /define_tag; define_tag('apicheck'); return(self->apikey != ''); /define_tag; define_tag( 'retrieve', -req='path', -type='string', -opt='post', -type='string', -encodenone ); fail_if(!self->apicheck, -1, 'api key not set.'); protect; local('getparams') = array( 'apikey'=self->apikey, 'application' =self->application, 'event' = #post ); local('response') = include_url( 'https://prowl.weks.net' + #path, -getparams=#getparams ); handle_error; local('response') = 'There was a problem communicating with Prowl.'; /handle_error; /protect; return(#response); /define_tag; define_tag( 'update', -req='event', -type='string', -encodenone ); local('path') = '/publicapi/add'; return(self->retrieve(#path, string_truncate(#event, 1024))); /define_tag; /define_type; ]
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Requirements?