NAME

DAPNET::API - Use the DAPNET API from Perl

SYNOPSIS

my($dapnetobj) = DAPNET::API->new({ DAPNET_USERNAME => '<username>', DAPNET_PW => '<password>', CALLSIGN => '<your callsign>' });

$ret = $dapnetobj->send_rubric_content(<text to send>,<rubric name>.<transmitter group name>,<sequence number 1 - 10>);

$ret = $dapnetobj->send_individual_call(<text>,<destination callsign>,<transmitter group name>,<emergency boolean>));

if ($ret) { print('HTTP Error response: '.$ret."\n"); } else { print("Message sent\n"); }

DESCRIPTION

Implementation of the DAPNET REST API in Perl.

AUTHOR

Simon (G7RZU) <simon@gb7fr.org.uk>

METHODS

This section describes the methods that are implemented and their use.

new

Instantiates new object. Pass a hash reference with options as follows

my($dapnetobj) = DAPNET::API->new({ DAPNET_USERNAME => '<username>', DAPNET_PW => '<password>', CALLSIGN => '<your callsign>' });

returns an object if sucessful or false if not sucessful

send_individual_call

Send a call to a single callsign

$ret = $dapnetobj->send_individual_call(<text>,<destination callsign>,<transmitter group name>,<emergency boolean>));

Returns 0 on sucess or the HTTP error string on error.

send_rubric_content

Sends a message to a rubric

$ret = $dapnetobj->send_rubric_content(<text to send>,<rubric name>.<transmitter group name>,<sequence number 1 - 10>);

Returns 0 on sucess or the HTTP error string on error.