Tasmin Ahmad > PrayMind > Religion::Islam::PrayMind

Download:
PrayMind-1.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.01   Source  

NAME ^

Religion::Islam::PrayMind - a Perl module that is a client for PrayerMinder server

SYNOPSIS ^

  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>);

DESCRIPTION ^

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:

- ContinentsList.pl
- CountriesList.pl
- CitiesList.pl
- CityTimes.pl

EXPORT

Exported constants and variables

METHODS ^

new(ClientID => "CLIENTID")

This is a class method, the constructor for PMConnect. Client ID for the caller's PrayerMinder account is passed as keyword value pair.

GetList(LIST_TYPE [, PARENT_ID])

This method retrieves a list of locations.

PARAMETERS

GetListSize

Returns integer

Called after GetList to obtain the number of locations in the list.

GetElementID

Returns integer

Called after GetList to obtain the number of locations in the list.

GetElementName

Returns string

Called after GetList to obtain the number of locations in the list.

NextElement

Returns true if successful, false for no more elements.

Called after GetList to obtain the number of locations in the list.

GetPrayerTimes(CITY_ID)

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.

CityID

Returns integer

Called after GetPrayerTimes to obtain the ID for the city.

CityTitle

Returns string

Called after GetPrayerTimes to obtain the title for the city.

CityTimeZone

Returns string (floating point decimal number)

Called after GetPrayerTimes to obtain the time zone for the city.

CityIslamicDate

Returns string

Called after GetPrayerTimes to obtain today's Islamic date for the city.

CityGregorianDate

Returns string

Called after GetPrayerTimes to obtain today's Gregorian date for the city.

CityAsrFiqh

Returns string

Called after GetPrayerTimes to obtain the default Asr fiqh method for the city.

CityPrayerTime(PRAYER_NAME)

Returns string

Called after GetPrayerTimes to obtain the requested prayer time for the city.

PARAMETERS

GetError

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.

GetErrorText

Returns string

Called after GetError to obtain the text description of the last error.

AUTHOR ^

Tasmin Ahmad, <support@prayerminder.com>

Web site: http://www.prayerminder.com/

syntax highlighting: