Religion::Islam::PrayMind - a Perl module that is a client for PrayerMinder server
use Religion::Islam::PrayMind; $p1 = new PMConnect(ClientID => "xxxx"); #where xxxx is the client web site's ID at the PrayerMinder server. $p1->GetList(<listtype> [, <parentID>); $p1->GetPrayerTimes(<cityID>);
This module provides ways to obtain data from the PrayerMinder server. It is built on top of XML::Parser. Each call to GetList or GetPrayerTimes methods opens a socket connection to the PrayerMinder server, and creates a new instance of XML::Parser which is then used to parse the data received through the socket.
Example
The following files show example usage of the PrayMind module:
Exported constants and variables
Version of the module.
LIST_TYPE
Error_ID
This is a class method, the constructor for PMConnect. Client ID for the caller's PrayerMinder account is passed as keyword value pair.
This method retrieves a list of locations.
PARAMETERS
Specifies type of list desired. The properties and elementes of the list can be retrieved using relevant methods listed later. GetError and GetErrorText must be called before calling any other methods to make sure no errors occurred. Possible values for LIST_TYPE are listed below:
PARENT_ID
Not needed if LIST_TYPE is eContinentsList, required otherwise. Specifies the parent whose children are to be listed.
Returns integer
Called after GetList to obtain the number of locations in the list.
Returns string
Returns true if successful, false for no more elements.
This method retrieves prayer times for the requested city. CITY_ID specifies the ID of the city requested. GetError and GetErrorText must be called before calling any other methods to make sure no errors occurred.
Called after GetPrayerTimes to obtain the ID for the city.
Called after GetPrayerTimes to obtain the title for the city.
Returns string (floating point decimal number)
Called after GetPrayerTimes to obtain the time zone for the city.
Called after GetPrayerTimes to obtain today's Islamic date for the city.
Called after GetPrayerTimes to obtain today's Gregorian date for the city.
Called after GetPrayerTimes to obtain the default Asr fiqh method for the city.
Called after GetPrayerTimes to obtain the requested prayer time for the city.
PRAYER_NAME
Specifies prayer whose time is desired. Possible values for PRAYER_NAME are listed below:
Returns Error_ID
Called after GetPrayerTimes or GetList to obtain the error ID. Returns values indicates error ID or IDS_NoError if no errors occurred.
Called after GetError to obtain the text description of the last error.
Tasmin Ahmad, <support@prayerminder.com>
Web site: http://www.prayerminder.com/
To install Religion::Islam::PrayMind, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Religion::Islam::PrayMind
CPAN shell
perl -MCPAN -e shell install Religion::Islam::PrayMind
For more information on module installation, please visit the detailed CPAN module installation guide.