The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WebService::Prowl -

SYNOPSIS

  use WebService::Prowl;

DESCRIPTION

WebService::Prowl is a interface to Prowl Public API

SYNOPSIS

This module aims to be a implementation of a interface to the Prowl Public API (as available on http://forums.cocoaforge.com/viewtopic.php?f=45&t=20339)

    use WebService::Prowl;
    my $ws = WevService::Prowl->new(apikey => 40byteshexadecimalstring);
    $ws->verify || die $ws->error();
    $ws->add(application => "Favotter App",
             event       => "new fav",
             description => "your tweet saved as sekimura's favorite")) {
    }

METHODS

new(apikey => 40byteshexadecimalstring)

Call new() to create a Prowl Public API client object. You must pass the apikey, which you can generate on "settings" page https://prowl.weks.net/settings.php

  my $apikey = 'cf09b20df08453f3d5ec113be3b4999820341dd2';
  my $ws = WevService::Prowl->new(apikey => $apikey);
verify()

Sends a verify request to check if apikey is valid or not. return 1 for success.

  $ws->verify();
add(application => $app, event => $event, description => $desc, priority => $pri)

Sends a app request to api and return 1 for success.

  application: [256] (required)
      The name of your application

  event: [1024] (required)
      The name of the event

  description: [10000] (required)
      A description for the event

  priority: An integer value ranging [-2, 2]
      a priority of the notification: Very Low, Moderate, Normal, High, Emergency
      default is 0 (Normal)

  $ws->add(application => "Favotter App",
           event       => "new fav",
           description => "your tweet saved as sekimura's favorite");
error()

Returns any error messages as a string.

  $ws->verify() || die $ws->error();

AUTHOR

Masayoshi Sekimura <sekimura@cpan.org>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

https://prowl.weks.net/, http://forums.cocoaforge.com/viewtopic.php?f=45&t=20339