On this page:
picasa
picasa-scope
picasa<%>
list-albums
find-album
create-album
picasa-album<%>
list-photos
find-photo
create-photo
delete
picasa-photo<%>
get-content-link
delete

4 Picasa Web Albums

 (require (planet ryanc/webapi:1:=0/picasa))

This library supports a small subset of the Picasa Web Albums API. Creating and deleting albums and photos is supported, but all access to metadata must be done by inspecting the resource’s Atom feed, and editing metadata is not currently supported at all.

(picasa #:oauth2 oauth2)  (is-a?/c picasa<%>)
  oauth2 : (is-a?/c oauth2<%>)
Creates a picasa<%> object for the albums of the user represented by oauth2. The scopes of oauth2 must include picasa-scope.

String representing the OAuth2 “scope” for Picasa Web Albums resources.

Represents an authorized connection to the Picasa Web Albums of a particular user, namely the one who approved the OAuth2 authorization request.
Obtain an instance via picasa.
For a picasa<%> instance, the atom-feed-resource<%> methods return picasa-album<%> objects.

(send a-picasa list-albums)
  (listof (is-a?/c picasa-album<%>))
List the albums owned by the user.
(send a-picasa find-album album-name)
  (or/c (is-a?/c picasa-album<%>) #f)
  album-name : string?
Return an album object representing the album named album-name. If no such album exists, #f is returned.
(send a-picasa create-album album-name)
  (is-a?/c picasa-album<%>)
  album-name : string?
Creates a new album named album-name.

Represents a Picasa Web Album.
Obtain an instance via list-albums, find-album, create-album, or any of the atom-feed-resource<%> methods with a picasa<%> instance.
For a picasa-album<%> instance, the atom-feed-resource<%> methods return picasa-photo<%> objects.

(send a-picasa-album list-photos)
  (listof (is-a?/c picasa-photo<%>))
Lists the photos belonging to the album.
(send a-picasa-album find-photo title)
  (or/c (is-a?/c picasa-photo<%>) #f)
  title : string?
Finds a photo in the album with title title. If no such photo exists, returns #f.
(send a-picasa-album create-photo image-file 
  title) 
  (is-a?/c picasa-photo<%>)
  image-file : path-string?
  title : string?
Creates a new photo with the contents of image-file and named title.
(send a-picasa-album delete)  void?
Deletes the album.

Represents a photo in a Picasa Web Album.
Obtain an instance via create-photo or any of the atom-feed-resource<%> methods with a picasa-album<%> instance.

(send a-picasa-photo get-content-link)  (or/c string? #f)
Gets a URL for externally linking to the photo. If no such URL exists, #f is returned.
(send a-picasa-photo delete)  void?
Deletes the photo.