Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

How do I upload image to Imgur in an album (ex foo/foo.jpg) and retrieve the link/embed bbcode ?

Image::Imgur documentation is very short, doesn't look like it can do that

Imgur::API documentation is very large but no samples/tests ... SYNOPSIS shows "content" method which isnt documented :/

Thanks

  • Comment on Upload image to Imgur and retrieve the link/embed bbcode

Replies are listed 'Best First'.
Re: Upload image to Imgur and retrieve the link/embed bbcode
by Corion (Patriarch) on Jul 02, 2017 at 07:46 UTC

    To use Imgur::API, you will have to read the imgur API documentation. The module does not include that documentation.

    The ->content method is documented in Imgur::API::Endpoint::Image, unsurprisingly.

      The ->content method is documented in Imgur::API::Endpoint::Image, unsurprisingly.

      Um, where? I don't see "content" mentioned anywhere on that page :/

        Whoops, indeed, sorry for misleading you!

        The parameter documented is named image and should be set to the base64-encoded image data. I think with these parts you should have enough to create an example image and upload it.

        As the synopsis also contains syntax errors, maybe it isn't really tested.

Re: Upload image to Imgur and retrieve the link/embed bbcode
by stevieb (Canon) on Jul 02, 2017 at 02:04 UTC

    Show the code you've tried, and that doesn't work.

    I know you've showed some links to documentation, but that doesn't show your specific case not working.