WWW::Simpy - Perl interface to Simpy social bookmarking service
use Simpy; my $sim = new Simpy; my $cred = { user => "demo", pass => "demo" }; my $opts = { limit => 10 }; my $tags = $sim->GetTags($cred, $opts) || die $sim->status; foreach my $k (keys %{$tags}) { print "tag $k has a count of " . $tags->{$k} . "\n"; } my $opts = { limit => 10, q = "search" }; my $links = $sim->GetTags($cred, $opts) || die $sim->status; foreach my $k (keys %{$links}) { print "url $k was added " . $links->{$k}->{addDate} . "\n"; } my $opts = { fromTag => 'rose', toTag => 'another name' }; $sim->RenameTag($cred, $opts) || die $sim->status; print $sim->message . "\n";
This module provides a Perl interface to the Simpy social bookmarking service. See http://www.simpy.com/simpy/service/api/rest/
THIS IS AN ALPHA RELEASE. This module should not be relied on for any purpose, beyond serving as an indication that a reliable version will be forthcoming at some point the future.
This module is being developed as part of the "mesh pooling" component ofthe Transpartisan Meshworks project ( http://www.transpartisanmeshworks.org ). The mesh pool will integrate social bookmarking and collaborative content development in a single application.
The accessorType property of a link may be PUBLIC or PRIVATE.
The Simpy status code may be any of the following constants.
# SUCCESS - Success # PARAMETER_MISSING - Required parameter missing # NONEXISTENT_ENTITY - Non-existent entity # TRANSIENT_ERROR - Transient data retrieval error # STORAGE_ERROR - Entity storage error # QUOTA_REACHED - Storage quota exceeded
Simpy object constructor method.
my $s = new Simpy;
Return status information from API method calls.
Return the HTTP status of the last call to the Simpy REST server, or syntax errors from the XML::Parser module, if any, or error from Simpy REST API, if any.
Return the message string, if any, returned by the last Simpy REST method.
Return the Simpy error code, if any, returned by the last Simpy REST method.
See http://www.simpy.com/simpy/service/api/rest/ for more information about required and optional parameters for these methods.
Returns a hash reference of tag/count pairs.
my $tags = $s->GetTags($cred, $opts); print "The tag 'dolphin' has a count of " . $tags->{dolphin};
Removes a tag via the Simpy API. Returns a true result if successful.
Renames a tag via the Simpy API. Returns a true result if successful.
Merges two tags via the Simpy API. Returns a true result if successful.
Splits a tag via the Simpy API. Returns a true result if successful.
Returns an hash reference of links, keyed by url. Each link is in turn a hash reference of link properties, keyed by property name. The value of the 'tags' property keys is an array reference of tags. All other properties tag a scalar value.
The exported constants PUBLIC and PRIVATE can be used to check the value of the accessType property.
Saves a link via the Simpy API. Returns a true result if successful.
This is an early alpha release. Not all methods of the API are implemented, nor have the sub-modules defining data types for those API methods been developed.
http://simpytools.sourceforge.net
http://www.transpartisanmeshworks.org
Beads Land, beads@beadsland.com
Copyright (C) 2006 by Beads Land
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.1 or, at your option, any later version of Perl you may have available.
To install WWW::Simpy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Simpy
CPAN shell
perl -MCPAN -e shell install WWW::Simpy
For more information on module installation, please visit the detailed CPAN module installation guide.