Image::Randim::Source::Unsplash - Unsplash source plugin
use Image::Randim::Source; $source = Image::Randim::Source->new; $source->set_provider('Unsplash'); $image = $source->get_image; say $image->url; # OR if you want to use your own Unsplash API client key # access the src_obj and set it there before calling get_image $source->src_obj->api_key('980ef8da882...');
You will probably not want to call this directly, and instead ose Image::Randim::Source as described in that class' documentation.
Unsplash requires that you use a so-called developer API client key to get a random image information. However, these client keys can be rate-limited.
If you experience this, you can register for your own developer client API key and use it instead as outlined in the SYNOPSIS.
Otherwise, this "plugin" conforms to the Image::Randim::Source::Role just like the others.
Mark Rushing <mark@orbislumen.net>
This software is copyright (c) 2017 by Home Grown Systems, SPC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Image::Randim, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::Randim
CPAN shell
perl -MCPAN -e shell install Image::Randim
For more information on module installation, please visit the detailed CPAN module installation guide.