WWW::NOS::Open - Perl framework for the Open NOS REST API.
This document describes WWW::NOS::Open version 0.02.
use WWW::NOS::Open; my $nos = WWW::NOS::Open->new($API_KEY); @latest_articles = $nos->get_latest_articles('nieuws');
Wrapper around the REST API to get data from Open NOS into Perl.
new
Create a new WWW::NOS::Open object.
get_version
Gets the version of the REST API as a WWW::NOS::Open::Version object.
get_latest_articles
Returns the ten most recent articles as an array of WWW::NOS::Open::Article objects.
nieuws
sport
get_latest_videos
Returns the ten most recent videos as an array of WWW::NOS::Open::Video objects.
get_latest_audio_fragments
Returns the ten most recent audio fragments as an array of WWW::NOS::Open::AudioFragment objects.
search
Search the searchengine from NOS for keywords. Returns a WWW::NOS::Open::Results object with a maximum of 25 items.
cricket
cricket AND engeland
cricket OR curling
get_tv_broadcasts
Gets a collection of television broadcasts between two optional dates. Returns an array of WWW::NOS::Open::DayGuide objects. The period defaults to starting yesterday and ending tomorrow. The period has an upper limit of 14 days. An NOSOpenExceededRangeException is thrown when this limit is exceeded.
NOSOpenExceededRangeException
YYYY-MM-DD
get_radio_broadcasts
Gets a collection of radio broadcasts between two optional dates. Returns an array of WWW::NOS::Open::DayGuide objects. The period defaults to starting yesterday and ending tomorrow. The period has an upper limit of 14 days. An NOSOpenExceededRangeException is thrown when this limit is exceeded.
This module uses the environment variable NOSOPEN_SERVER to specify a server that is not the default Open NOS live server at http://open.nos.nl.
NOSOPEN_SERVER
The useragent identifier used in the request to the REST API is WWW::NOS::Open/0.01.
WWW::NOS::Open/0.01
Date::Calc Date::Format HTTP::Headers HTTP::Request HTTP::Status JSON LWP::UserAgent Log::Log4perl Moose Moose::Util::TypeConstraints Readonly URI URI::Escape WWW::NOS::Open::Article WWW::NOS::Open::AudioFragment WWW::NOS::Open::Broadcast WWW::NOS::Open::DayGuide WWW::NOS::Open::Document WWW::NOS::Open::Exceptions WWW::NOS::Open::Result WWW::NOS::Open::TypeDef WWW::NOS::Open::Version WWW::NOS::Open::Video XML::Simple namespace::autoclean
This module uses Log::Log4perl.
Currently this module only uses the XML output of the Open NOS service and has no option to use the JSON or serialized PHP formats. When the API matures the other output options might be added and the content of the raw responses exposed for further processing in an appropriate environment.
Please report any bugs or feature requests at RT for rt.cpan.org.
Roland van Ipenburg <ipenburg@xs4all.nl>
<ipenburg@xs4all.nl>
Copyright 2011 by Roland van Ipenburg
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.2 or, at your option, any later version of Perl 5 you may have available.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install WWW::NOS::Open, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::NOS::Open
CPAN shell
perl -MCPAN -e shell install WWW::NOS::Open
For more information on module installation, please visit the detailed CPAN module installation guide.