From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

WWW::SlideShare

ABSTRACT

A perl interface to the Slideshare Web Service API

SYNPOSIS

The usage of the API is demonstrated here -

my $ss = WWW::SlideShare->new('api_key' => $api_key, 'secret' => $secret);
ok (ref $ss, "Object creation");
my $slide = $ss->get_slideshow({ 'slideshow_id' => 4383743 });
ok($slide->[0]->ID == 4383743, "get_slideshow() by id");

DESCRIPTION

This an object-oriented module and supports most of the SlideShare Web Services API documented at http://www.slideshare.net/developers/documentation

All parameters are passed as key-value pairs in a hash reference.

new

Creates a SlideShare object, taking two parameters - API key and secret
my $obj = new ({ 'api_key' => $api_key, 'secret' => $secret })

get_slideshow

This can be called in one of two ways, by providing slideshow_id or slideshow_url. It always returns a slideshow object.
$slideshow = get_slideshow({ slideshow_id => $id })
$slideshow = get_slideshow({ slideshow_url => $url })

get_slideshows_by_tag

This accepts a tag and other optional key-value pairs supported by the API, returning a reference to an array of slideshow objects.
$slideshows = get_slideshow_by_tag({ tag => $tag, ... })

get_slideshows_by_user

This accepts username of user whose slideshows are to be accessed and returns a reference to an array of slideshow objects.
detailed is an optional parameter
$slideshows = get_slideshows_by_user({ 'username_for' => $user, 'detailed' => 0 });

search_slideshows

This accepts the keyword/phrase contained in slideshows and returns a reference to an array of slideshow objects.
$slideshows = search_slideshows({ 'q' => $keyword, ... });

get_user_groups

This accepts a username and returns a reference to an array of SlideShare group objects corresponding to that user.
$gps = $ss->get_user_groups({ 'username_for' => $user, ... });

get_user_contacts

This accepts a username and returns a reference to an array of SlideShare contact objects corresponding to that user.
$contacts = $ss->get_user_contacts({ 'username_for' => $user, ... });

get_user_tags

This accepts a username and returns a reference to an array of SlideShare tag objects corresponding to that user.
$tags = $ss->get_user_tags({ 'username_for' => $user, ... });

ERROR HANDLING

If any Web Service error is encountered, then it dies with a stack backtrace and displays the error message returned. The errors may be -

- Network connectivity errors - API key/secret incorrect - User/Slide not found on the system

Example error message:

SlideShare Service Error <?xml version="1.0" encoding="UTF-8"?> <SlideShareServiceError> <Message ID="2">Failed User authentication</Message> </SlideShareServiceError>

FUTURE WORK

The campaign related methods and edit/delete/upload slideshow methods are currently not supported and will be provided in future releases.

AUTHOR

Ashish Mukherjee (ashish.mukherjee@gmail.com)

BUGS

No known ones

COPYRIGHT

This is distributed under the same licence as the perl source code.

CREATION DATE

June 3, 2010