NAME
WWW::Socrata - The great new WWW::Socrata!
VERSION
Version 0.01
SYNOPSIS
use WWW::Socrata;
my %options = (
base_url => "https://nycopendata.socrata.com",
);
my $socrata = new WWW::Socrata(\%options);
my $rh_result = $socrata->get("/api/views/74cu-ncm4/rows.json", {});
DESCRIPTION
This library provides a simple wrapper for accessing some of the features of the Socrata Open Data API from PHP. Currently it only supports HTTP GET operations, but in the future it will support other methods as well.
The library is very simple. To access the Socrata API, you first instantiate a "Socrata" object, passing in the API base URL for the data site you wish to access. The Base URL is always the URL for the root of the datasite, with "/api" added to the path (ex: http://www.socrata.com/api or http://data.medicare.gov/api). Then you can use its included methods to make simple API calls:
This library provides an interface to the SODA Publisher API. If you're new to all this, you may want to brush up on the getting started guide. dev.socrata.com/publisher/getting-started
If you're curious about how things work under the hood, you can also browse the API documentation directly. http://opendata.socrata.com/api/docs/
OPTIONS
Additional options when creating the new Socrata object
use WWW::Socrata;
my %options = (
base_url => "https://nycopendata.socrata.com",
app_token => "", #optional
username => "", #optional for authenticated requests
password => "", #optional for authenticated requests
);
my $socrata = new WWW::Socrata(\%options);
You may also add additional criteria on the get function, for searching or retrieving subsets of the data
my $rh_result = $socrata->get("/api/views/74cu-ncm4/rows.json",
{
"method"=>"getRows",
"start"=>120,
"length" =>60,
});
AUTHOR
Benjamin Marcus, <ben at fourthfloorequipment.com>
BUGS
Please report any bugs or feature requests to bug-www-socrata at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Socrata. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WWW::Socrata
You can also look for information at: http://www.socrata.org
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2012 Benjamin Marcus.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.