ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Attention : This is version 25 of this documentation page. This feature may have been changed or removed in a higher version.
Help / WLanguage / WLanguage functions / Communication / Google functions / Google Picasa
  • Managing the photos of the album
  • Properties specific to the description of gglAlbum variables
  • Functions that use gglAlbum variables
  • Functions that use gglAlbum variables (prefixed syntax)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Warning
From January 2019, the functions for managing Google Picasa photo albums will no longer be available. Indeed, the corresponding Google API is no longer available from January 2019. It is necessary to use "Google Photo API"..
This new API is accessible via AuthIdentify and HTTP requests. See https://developers.google.com/photos/library/guides/overview for more details.
The gglAlbum type is used to create and modify a Google Picasa album. The album can be created beforehand from the Google Picasa interface or by programming. The characteristics of this type of variable can be defined and modified by several WLanguage properties.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
// Connection to Google
Cnt is gglConnection
Cnt..Email = "vince@gmail.com"
Cnt..Password = "azerty"
Cnt..ApplicationName = "MyApp-01"
IF GglConnect(Cnt) = False THEN
Error(ErrorInfo())
END

// Retrieve the array of available albums
arrAlbum is array of gglAlbum
arrAlbum = GglListAlbum(Cnt)

// Retrieve all the photos found in the first album (the metadata only)
GglFillAlbum(Cnt, arrAlbum[1], gglWithPhotoData)

// Browse the photos
MyPhotos is gglPhoto
FOR EACH MyPhotos OF arrAlbum[1]..PhotoData
Trace(MyPhotos..Description)
END

// Add a photo to an album
// Retrieve the album
MyAlbum is gglAlbum
MyAlbum = GglGetAlbum(Cnt, "my favorite album")
// Create a photo
MyPhoto is gglPhoto
MyPhoto..Image = "c:\Images\my_photo.jpg"
MyPhoto..Legend = "My very own photo"

// Add the image to the album
Add(MyAlbum..PhotoData, MyPhoto)

// Send the photo and update the album
GglWrite(Cnt, MyAlbum)
Remarks

Managing the photos of the album

..PhotoData corresponds to the array of album photos. To retrieve the data of the photos found in an album (and to "fill" the album), you must use GglFillAlbum. ..PhotoData only contains the meta-data of the photos. To download the images and the miniatures, you must use GglFillPhoto.
You can also retrieve the images of a photo (initial image and thumbnails) via a call to HTTPRequest, by specifying the URL of the image.
The URLs are available via the property:
  • Media.MediaContent.URL for the initial image,
  • Media.Thumbnail[x].URL for the thumbnails.
To add a photo to an album, you must:
  1. Create a gglPhoto variable.
  2. Assign the "Image" property of the gglPhoto variable.
  3. Add the gglPhoto variable to the album.
  4. Call GglWrite on the album. The album must have been retrieved from Google beforehand. You cannot create a new album and add a photo in a single call.

Properties specific to the description of gglAlbum variables

The following properties can be used to handle a Google Picasa album:
NameType usedEffect
AccessCharacter String constantType of access to the album. The possible values are:
  • gglPrivate: The album can be seen by the authorized persons only.
  • gglPublic: The album can be seen by any Web user who knows its URL and during the public searches (by the Google Image Search service for example).
Remark: An addition option ("Connection required before display") is available in the interface. This option is not available by programming.
AuthorgglAuthorAuthor of the album. This property is available in read-only.
CommentingEnabledBoolean
  • True to enable the management of comments on the album,
  • False otherwise.
UpdateDateDateTimeDate of the last update of the album. This property is available in read-only.
DescriptionCharacter stringText containing the description of the album.
PhotoDataArray of gglPhotoArray of the photos found in the album.
BytesUsedIntegerDisk space used by the album. This property is available in read-only.
IdentifierCharacter stringAlbum identifier. This property is available in read-only.
ImageImageCover image of the album.
When modifying an album, this property can correspond to:
  • the path of an image found on the computer.
  • the path of an Image control displaying an image.
  • the result of dSaveImage (with the option for backup in memory).
When retrieving an album, this property corresponds to the buffer of the image. You can:
  • use fSaveText to save the image in file format and to view it.
  • assign the image to an Image control.
LocationCharacter stringDescription of the location corresponding to the album.
MediagglMediaGroupProperty used to add additional information.
NbPhotoIntegerNumber of photos in the album. This property is available in read-only.
NbPhotoRemainingIntegerNumber of photos that can be added to the album. This property is available in read-only.
TagArray of gglTagTags of the photos found in the album.
TimestampIntegerTimestamp of the album (number of milliseconds from January 1st 1970).
TitleCharacter stringTitle of the album.
Remark: If photos are sent to the server without being associated with an album (GglWrite), a "Transferred files" album is automatically created. The title of this album cannot be modified.

Remark: These properties can be used with one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>

Functions that use gglAlbum variables

GglDeleteDeletes data from the Google server.
GglFillAlbumFills a Google Picasa album with the data corresponding to the requested options.
GglGetAlbumRetrieves a Google Picasa album.
GglListAlbumRetrieves the list of "Google Picasa" albums available for the user.
GglWriteCreates and/or updates data on the Google server (addition or modification of data).

Functions that use gglAlbum variables (prefixed syntax)

<gglConnection variable>.DeleteDeletes data from the Google server.
<gglConnection variable>.FillAlbumFills a Google Picasa album with the data corresponding to the requested options.
<gglConnection variable>.GetAlbumRetrieves a Google Picasa album.
<gglConnection variable>.ListAlbumRetrieves the list of "Google Picasa" albums available for the user.
<gglConnection variable>.WriteCreates and/or updates data on the Google server (addition or modification of data).
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/29/2020

Send a report | Local help