PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing the photos of the album
  • Properties specific to the description of gglAlbum variables
  • Functions that use the gglAlbum variables
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
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.
Note: See Declaring a variable for more details.
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:
  • MediaMediaContent.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).
Note: 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 stringIdentifier of the album. 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.
Note: 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.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the gglAlbum variables

Versions 14 and later
GglDelete
New in version 14
GglDelete
GglDelete
Deletes data from the Google server.
Versions 14 and later
GglFillAlbum
New in version 14
GglFillAlbum
GglFillAlbum
Fills a Google Picasa album with the data corresponding to the requested options.
Versions 14 and later
GglGetAlbum
New in version 14
GglGetAlbum
GglGetAlbum
Retrieves a Google Picasa album.
Versions 14 and later
GglListAlbum
New in version 14
GglListAlbum
GglListAlbum
Retrieves the list of "Google Picasa" albums available for the user.
Versions 14 and later
GglWrite
New in version 14
GglWrite
GglWrite
Creates and/or updates data on the Google server (addition or modification of data).
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment