| Net-Google-PicasaWeb documentation | Contained in the Net-Google-PicasaWeb distribution. |
Net::Google::PicasaWeb::Album - represents a single Picasa Web photo album
version 0.11
my @albums = $service->list_albums;
for my $album (@albums) {
print "Title: ", $album->title, "\n";
print "Summary: ", $album->summary, "\n";
print "Author: ", $album->author_name, " (", $album->author_uri, ")\n";
$album->fetch_content( file => 'cover-photo.jpg' );
}
Represents an individual Picasa Web photo album. This class extends Net::Google::PicasaWeb::Feed.
The URL used to get the album information. See url in Net::Google::PicasaWeb::Feed.
This is the title of the album. See title in Net::Google::PicasaWeb::Feed.
This is the summary of the album. See summary in Net::Google::PicasaWeb::Feed.
This is the identifier of the album used to look up a specific album in the API. This is the album ID. See entry_id in Net::Google::PicasaWeb::Feed.
The goe-coded latitude set on the album. See latitude in Net::Google::PicasaWeb::Feed.
The geo-coded longitude set on the album. See longitude in Net::Google::PicasaWeb::Feed.
This is a link to the Net::Google::PicasaWeb::Media object that is used to reference the cover photo and thumbnails of it.
This is the size of the album in bytes.
This is the number of photos in the albums.
my @photos = $album->list_media_entries(%params);
Lists photos and video entries in the album. Options may be used to modify the photos returned.
This method takes the STANDARD LIST OPTIONS in Net::Google::PicasaWeb.
The list_photos and list_videos methods are synonyms for list_media_entries.
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
This software is copyright (c) 2011 by Andrew Sterling Hanenkamp.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Net-Google-PicasaWeb documentation | Contained in the Net-Google-PicasaWeb distribution. |
package Net::Google::PicasaWeb::Album; BEGIN { $Net::Google::PicasaWeb::Album::VERSION = '0.11'; } use Moose; # ABSTRACT: represents a single Picasa Web photo album extends 'Net::Google::PicasaWeb::MediaFeed'; use Net::Google::PicasaWeb::Media; has bytes_used => ( is => 'rw', isa => 'Int', predicate => 'has_bytes_used', ); has number_of_photos => ( is => 'rw', isa => 'Int', predicate => 'has_number_of_photos', ); override from_feed => sub { my ($class, $service, $entry) = @_; my $self = $class->super($service, $entry); $self->bytes_used($entry->field('gphoto:bytesUsed')) if $entry->field('gphoto:bytesUsed'); $self->number_of_photos($entry->field('gphoto:numphotos')) if $entry->field('gphoto:numphotos');; return $self; }; sub list_media_entries { my ($self, %params) = @_; $params{kind} = 'photo'; return $self->service->list_entries( 'Net::Google::PicasaWeb::MediaEntry', $self->url, %params, ); } sub list_photos { shift->list_media_entries(@_) } sub list_videos { shift->list_media_entries(@_) } sub list_tags { my ($self, %params) = @_; $params{kind} = 'tag'; my $user_id = delete $params{user_id} || 'default'; return $self->service->list_entries( 'Net::Google::PicasaWeb::Tag', $self->url, %params ); } __PACKAGE__->meta->make_immutable; 1; __END__