Skip to content

Getting total photos #8

@dbough

Description

@dbough

I'd like to get the total number of pictures retured from a search. I was able to access this (and some other things) in the search subroutine in Photos.pm, however I couldn't figure out how to return them with the photos.

Here's how I could access them:

my $page_info = {
        'total' => $r->{photos}->{total},
        'page' => $r->{photos}->{page},  
        'perpage' => $r->{photos}->{perpage}, 
        'pages' => $r->{photos}->{pages},
};

my @results =  $self->_response_to_photos($r->{photos});
push( @results, $page_info );
return @results;

This returned an array containing a hash and an array of hashes. I couldn't figure out an elegant way to access the info though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions