This site has moved.
Class Album:
Adds a photo to the given Album.
Arguments:
Return Values:
Examples:
function gmailToPicasa() {
var search = GmailApp.search('label:ToPicasa');
var email = search[0].getMessages()[0];
var photos = email.getAttachments();
var album = PicasaApp.createAlbum('New album', {
visibility: 'unlisted',
description: 'From: ' + email.getSubject()
});
for (i in photos) {
Logger.log(album.addPhoto(photos[i]).getUrl());
}
}
Deletes the given Album.
Examples:
var albums = PicasaApp.getAlbums();
for(i in albums){
if(albums[i].getTitle() == 'to delete'){
albums[i].deleteAlbum();
}
}
Returns all the photos that contain the specified query string in the Album.
Arguments:
Name
query
Type
String
Description
the search query to match
Return Values:
Type
Photo[]
Description
any photo in the album with title, caption or tag matching the search query
Examples:
var albums = PicasaApp.getAlbums();
for(i in albums){
if(albums[i].getTitle() == 'My images'){
var originalAlbum = albums[i];
}
if(albums[i].getTitle() == 'Funny ones'){
var destinationAlbum = albums[i];
}
}
var photos = originalAlbum.find('CalvinAndHobbes');
for(i in photos){
photos[i].setAlbum(destinationAlbum);
}
Returns the Date this album was originally published.
Return Values:
Type
Date
Description
the date this album was originally published
Returns the description of the Album.
Return Values:
Type
String
Description
the description of the Album
Returns the unique id for the Album.
Return Values:
Type
String
Description
the unique id for the Album
Returns the Date this album was last updated.
Return Values:
Type
Date
Description
the date this album was last updated
Returns the location in which the Photos of this Album have been taken.
Return Values:
Type
String
Description
the location in which the Photos of this Album have been taken
Returns the number of Photos in the Album.
Return Values:
Type
Int
Description
the number of Photos in the Album.
Returns all the Photos in the Album.
Return Values:
Type
Photo[]
Description
the Photos in the Album.
Examples:
var photos = PicasaApp.getAlbumById('5623554255222794561').getPhotos();
for(i in photos){
Logger.log(photos[i].getTitle()+' '+photos[i].getUrl());
}
Returns the size of the Album.
Return Values:
Type
Int
Description
the size of the Album.
Returns the title of the Album.
Return Values:
Type
String
Description
the title of the Album.
Returns the visibility level of the Album ('private', 'unlisted', 'public').
Return Values:
Sets the description of the Album.
Arguments:
Name
description
Type
String
Description
the new description of the Album
Return Values:
Examples:
PicasaApp.getAlbumById('5623554255222794561').setDescription('My trip to NYC').setLocation('NYC');
Sets the location in which the Photos of this Album have been taken.
Arguments:
Name
location
Type
String
Description
the new location of the Album
Return Values:
Examples:
PicasaApp.getAlbumById('5623554255222794561').setDescription('My trip to NYC').setLocation('NYC');
Sets the title of the Album.
Arguments:
Name
title
Type
String
Description
the new title of the Album
Return Values:
Examples:
PicasaApp.getAlbumById('5623554255222794561').setTitle('My trip to NYC').setLocation('NYC');
Sets the visibility level of the Album.
Arguments:
Return Values:
Examples:
PicasaApp.getAlbumById('5623554255222794561').setVisibility('unlisted');