GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Net::Google::PicasaWeb::Media(3) User Contributed Perl Documentation Net::Google::PicasaWeb::Media(3)

Net::Google::PicasaWeb::Media - hold information about a photo or video

version 0.11

  my @photos = $album->list_media_entries;
  for my $photo (@photos) {
      my $media_info = $photo->photo;

      print "Image Title: ", $media_info->title, "\n";
      print "Image Description: ", $media_info->description, "\n\n";

      my $main_photo = $media_info->content;
      print "Image URL: ", $main_photo->url, "\n";
      print "Image MIME Type: ", $main_photo->mime_type, "\n";
      print "Image Medium: ", $main_photo->medium, "\n";

      print "Thumbnails:\n\n";
      
      for my $thumbnail ($media_info->thumbnails) {
          print "    Thumbnail URL: ", $thumbnail->url, "\n";
          print "    Thumbnail Dimensions: ", 
              $thumbnail->width, "x", $thumbnail->height, "\n\n";

          my $photo_data = $thumbnail->fetch;
          $thumbnail->fetch( file => 'thumbnail.jpg' );
      }
    
      my $photo_data = $main_photo->fetch;
      $main_photo->fetch( file => 'photo.jpg' );
  }

This is where you will find information about the photos, videos, and thumbnails themselves. You can get information about them with this object, such as the URL that can be used to download the media file. This object (and its children) also provide some features to fetching this information.

This class extends Net::Google::PicasaWeb::Base.

This is the title of the photo or video.

This is a description for the photo or video.

This is the main photo or video item attached to the media information entry. See "MEDIA CONTENT" below for information about the object returned.

This is an array of object containing information about the thumbnails that were attached when the photo was retrieved from the server. See "THUMBNAILS" below for information about these objects.

Builds a media class from a service object and reference to a "<media:group>" object in XML::Twig::Elt.

The object returned from the "content" accessor is an object with the following accessors and methods.

media

This is the parent Net::Google::PicasaWeb::Media object.

url

This is the URL where the photo or video may be downloaded from.

mime_type

This is the MIME-Type of the photo or video.

medium

This should be one of the following scalar values describing the media entry:

  • image
  • video

width

The width of the photo in pixels.

height

The height of the photo in pixels.

size

The file size of the photo in bytes.

  my $data = $content->fetch(%params);

Fetches the image or video from Picasa Web. By default, this method returns the file data as a scalar.

This method accepts the following parameters, which modify this behavior:

file
If given, the data will not be returned, but saved to the named file instead.

Each thumbnail returned represents an individual image resource used as a thumbnail for the main item. Each one has the following attributes and methods.

media

This is the parent Net::Google::PicasaWeb::Media object.

url

This is the URL where the thumbnail image can be pulled down from.

width

This is the pixel width of the image.

height

This is the pixel height of the image.

  my $data = $thumbnail->fetch(%params);

Fetches the thumbnail image from Picasa Web. By default, this method returns the image data as a scalar.

This method accepts the following parameters, which modify this behavior:

file
If given, the data will not be returned, but saved to the named file instead.

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.

2011-05-30 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.