|
|
|
|
- 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)
gglAlbum (Type of variable) In french: gglAlbum (Type de variable)
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.
// 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: - Create a gglPhoto variable.
- Assign the "Image" property of the gglPhoto variable.
- Add the gglPhoto variable to the album.
- 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: | | | Name | Type used | Effect |
---|
Access | Character String constant | Type 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. | Author | gglAuthor | Author of the album. This property is available in read-only. | CommentingEnabled | Boolean | - True to enable the management of comments on the album,
- False otherwise.
| UpdateDate | DateTime | Date of the last update of the album. This property is available in read-only. | Description | Character string | Text containing the description of the album. | PhotoData | Array of gglPhoto | Array of the photos found in the album. | BytesUsed | Integer | Disk space used by the album. This property is available in read-only. | Identifier | Character string | Album identifier. This property is available in read-only. | Image | Image | Cover 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.
| Location | Character string | Description of the location corresponding to the album. | Media | gglMediaGroup | Property used to add additional information. | NbPhoto | Integer | Number of photos in the album. This property is available in read-only. | NbPhotoRemaining | Integer | Number of photos that can be added to the album. This property is available in read-only. | Tag | Array of gglTag | Tags of the photos found in the album. | Timestamp | Integer | Timestamp of the album (number of milliseconds from January 1st 1970). | Title | Character string | Title 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 | | GglDelete | Deletes data from the Google server. | GglFillAlbum | Fills a Google Picasa album with the data corresponding to the requested options. | GglGetAlbum | Retrieves a Google Picasa album. | GglListAlbum | Retrieves the list of "Google Picasa" albums available for the user. | GglWrite | Creates and/or updates data on the Google server (addition or modification of data). |
Functions that use gglAlbum variables (prefixed syntax)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|