Scott Lawrence > WWW-TBA-API > WWW::TBA::API

Download:
WWW-TBA-API-1.00.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.00   Source  

NAME ^

WWW::TBA::API - Perl module for handling thebluealliance.net's API

VERSION ^

Version 1.00

SYNOPSIS ^

$tba=new WWW::TBA::API($apikey);

DESCRIPTION ^

WWW::TBA::API implements version 1 of thebluealliance.net's API. More information is available here: http://thebluealliance.net/tbatv/api/readme.php.

This implementation is deliberately similar to the other implementations (esecially the one written in php), so that people switching will not have trouble learning the new one.

FUNCTIONS ^

new API_KEY [API_URL]

Creates an interface to the API. If API_URL is specified, queries are made to that URL. With ordinary usage, it should never be specified (the default, http://thebluealliance.net/tbatv/api.php, should not change).

makearray

Not implemented. In other implementations, makes an array out of an XML::Simple object. This should not be necessary, or even remotely desirable, in Perl.

->user_agent [LWP::UserAgent]

Returns the old user agent, and changes if necessary.

->api_key [API_KEY]

Returns the old api key, and changes if necessary.

->api_url [API_URL]

Returns the old api url, and changes if necessary.

->api_version

Returns the version of the API being used. This value cannot be changed, for obvious reasons.

->query METHOD ARGUMENTS

The low-level API call. Makes a query to TBA of METHOD with ARGUMENTS. ARGUMENTS must be a reference to a hash.

->raw_query METHOD ARGUMENTS

Same as query, but returns a string instead of an XML::Simple object. Generally for debugging purposes only.

->get_teams [STATE [TEAMNUMBER]]

Gets inormation on the specified teams.

->get_events [YEAR [WEEK [EVENTID]]]

Gets information on the specified events.

->get_matches [COMPLEVEL [EVENTID [TEAMNUMBER [MATCHID]]]]

Returns information on the specified matches.

->get_attendance [EVENTID [TEAMNUMBER]]

Returns the attendance list for the specified event.

->get_official_record [TEAMNUMBER [YEAR [EVENTID]]]

Returns the official record of the team.

->get_elim_sets EVENTID NOUN

Undocumented.

BUGS AND LIMITATIONS ^

The error handling for this module is currently less than spify. Any errors in fetching or parsing XML will cause undefined behaviour.

Please report any bugs or feature requests to bug-www-tba-api at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-TBA-API. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

AUTHOR ^

Scott Lawrence (bytbox@gmail.com)

COPYRIGHT AND LICENSE ^

Copyright 2009 Scott Lawrence, all rights reserved.

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

syntax highlighting: