Group
Extension

Matches 2

Image-Randim ( S/SE/SEATEK/Image-Randim-0.09.tar.gz, SEATEK, 2022; MetaCPAN )
Image-Randim/lib/Image/Randim/Source/Unsplash.pm ( view source; MetaCPAN )
package Image::Randim::Source::Unsplash;
our $VERSION = '0.01';
use v5.20;
use warnings;
use JSON;
use Moose;

has 'name' => ( is  => 'ro',
		isa => 'Str',
		default => 'Unsplash',
    );
has 'api_url
    return $self->api_url.$self->api_key;
}

sub get_image {
    my $self = shift;
    my $data = JSON->new->decode($self->get_response);
    
    my $image = Image::Randim::Image->new(
	url    => $$d
Image-Randim ( S/SE/SEATEK/Image-Randim-0.09.tar.gz, SEATEK, 2022; MetaCPAN )
Image-Randim/lib/Image/Randim/Source/Role.pm ( view source; MetaCPAN )
  with 'Image::Randim::Source::Role';

  sub get_image {
      my $self = shift;
      my $data = JSON->new->decode($self->get_response);
      $data = $$data{'response'};

      my $image = Image::Ra
on the provider's site to get the random image's
data.

This is typically a API call that returns JSON.

=head2 C<get_image>

Plugins must return an Image::Randim::Image object, which is populated
wit


In the SYNOPSIS example, you see that JSON is returned from the
get_response() call to the provider's API (which uses the provided
url()) -- and then that JSON is parsed into a hash that is used to 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.