Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Uploading to Imgur with Perl

by Cody Fendant (Pilgrim)
on Apr 12, 2013 at 23:11 UTC ( #1028466=perlquestion: print w/ replies, xml ) Need Help??
Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone managed to make Image::Imgur work?

The POD is missing the line where you actually create the object, (someone's added it on AnnoCPAN) but it doesn't work for me anyway. There's also a host() method mentioned which doesn't seem to exist either.

What I get returned is '1004' which means invalid API key. But Imgur doesn't have "API keys", it has OAuth client IDs and client secrets etc.

Does this Module work for anyone?

Comment on Uploading to Imgur with Perl
Download Code
Re: Uploading to Imgur with Perl
by davido (Archbishop) on Apr 12, 2013 at 23:59 UTC

    From the deficient test suite you can see an example of how it's intended to be instantiated (I've obscured an email address and the API key, but you can find them in the test file):

    # API Key provided by ____@im__r.com my $apikey = "b3625162_____________805b1840452"; my $imgur = new Image::Imgur(key=>$apikey); ok( $imgur ); my $result = $imgur->upload('http://st.pimg.net/tucs/img/cpan_banner.p +ng'); ok( $result );

    There is this explanation in the docs for WWW::Imgur:

    Image::Imgur is an alternative module for imgur.com. It uses the XML version of the API rather than the JSON one which WWW::Imgur uses, and it depends on the Moose module. It uses an older version of the Imgur API.

    I noticed also that WWW::Imgur says that even that module (WWW::Imgur) is using the deprecated API, so the one that Image::Imgur is using must really be outdated (and possibly no longer operational).


    Dave

      Wow, somehow I missed how old it was. Both those modules are completely obsolete now, it appears.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1028466]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (19)
As of 2014-04-16 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls