Anwesh > WWW-Shorten-SuPr-0.02 > WWW::Shorten::SuPr

Download:
WWW-Shorten-SuPr-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

SYNOPSIS ^

    use WWW::Shorten::SuPr;
    my $url = q{http://perl.org};
    my $short_url = makeashorterlink($url);

    my $long_url  = makealongerlink($short_url); # eq $url

    my $shortlinkwithauth = shortlinkwithauth($url,$login,$api);

    # Su.pr provides a update your twitter and facebook wall with a
    # message and shorten the links provided in the message
    my $socialpost = WWW::Shorten::SuPrsocialpost($msg,$login,$api);

    #Schedule the posts (time should be in unix format)
    my $schedule_socialpost = WWW::Shorten::SuPr->schedule_socialpost($msg,$login,$api,$time);

SUBROUTINES ^

makeashorterlink

The function makeashorterlink will call the is.gd web site passing it your long URL and will return the shortened link.

makealongerlink

The function makealongerlink does the reverse of c<makeashorterlink> if the link already been hashed in Su.Pr

shortlinkwithauth

Authenticated requests can be used to create account based unique short URLs used for Su.pr analytics. Authenticated items will appear on your Su.pr home page. Which requires 3 parameters

URL
    Url Entry supported by Su.Pr
Login
    Username of the su.pr
APIKey
    Api key which can get found in su.pr setting page

socialpost

The c<socialpost> is used to post Su.pr converted messages to associated services such as Twitter and Facebook. Authentication is required for this API. Which requires 3 parameters

Message
    msg: blah blah blah http://perl.org
    Note this should not exceded 140 characters
Login
    Username of the su.pr
APIKey
    Api key which can get found in su.pr setting page

schedule_socialpost

    Schedule a C<socialpost> with unix time stamp .
    Which requires 3 parameters
Message
    msg: blah blah blah http://perl.org
    Note this should not exceeded 140 characters
Login
    Username of the su.pr
APIKey
    Api key which can get found in su.pr setting page
Time
    Unix timestamp of the date and time you wish to post. Posts will be submitted within a 15 minute bucket of the scheduled time.
syntax highlighting: