GData.PicasaWebFile

g GData.Commentable GData.Commentable GData.PicasaWebFile GData.PicasaWebFile GData.Commentable->GData.PicasaWebFile GData.Entry GData.Entry GData.Entry->GData.PicasaWebFile GData.Parsable GData.Parsable GData.Parsable->GData.Entry GObject.GInterface GObject.GInterface GObject.GInterface->GData.Commentable GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods

Inherited:

GData.Entry (24), GData.Parsable (5), GObject.Object (37), GData.Commentable (9)

Structs:

GObject.ObjectClass (5)

class

new (id)

get_album_id ()

get_caption ()

get_checksum ()

get_comment_count ()

get_contents ()

get_coordinates ()

get_credit ()

get_distance ()

get_edited ()

get_exposure ()

get_flash ()

get_focal_length ()

get_fstop ()

get_height ()

get_id ()

get_image_unique_id ()

get_iso ()

get_make ()

get_model ()

get_rotation ()

get_size ()

get_tags ()

get_thumbnails ()

get_timestamp ()

get_version ()

get_video_status ()

get_width ()

is_commenting_enabled ()

set_album_id (album_id)

set_caption (caption)

set_checksum (checksum)

set_coordinates (latitude, longitude)

set_is_commenting_enabled (is_commenting_enabled)

set_rotation (rotation)

set_tags (tags)

set_timestamp (timestamp)

Virtual Methods

Inherited:

GData.Parsable (9), GObject.Object (7), GData.Commentable (3)

Properties

Inherited:

GData.Entry (10), GData.Parsable (1)

Name

Type

Flags

Short Description

album-id

str

r/w

The ID for the file’s album.

caption

str

r/w

The file’s descriptive caption.

checksum

str

r/w

A checksum of the file, useful for duplicate detection.

comment-count

int

r

The number of comments on the file.

credit

str

r

The nickname of the user credited with this file.

distance

float

r

The distance to the subject.

edited

int

r

The time this file was last edited.

exposure

float

r

The exposure time.

file-id

str

r/w/co

The ID of the file.

flash

bool

r

Indicates whether the flash was used.

focal-length

float

r

The focal length used in the shot.

fstop

float

r

The F-stop used.

height

int

r

The height of the photo or video, in pixels.

image-unique-id

str

r

An unique ID for the image.

is-commenting-enabled

bool

r/w

Indicates whether comments are enabled.

iso

r

The ISO speed.

latitude

float

r/w

The location as a latitude coordinate associated with this file.

longitude

float

r/w

The location as a longitude coordinate associated with this file.

make

str

r

The name of the manufacturer.

model

str

r

The model of the camera.

rotation

int

r/w

The rotation of the photo, in degrees.

size

int

r

The size of the file, in bytes.

tags

[str]

r/w

A None-terminated array of tags associated with the file.

timestamp

int

r/w

The time the file was purportedly taken.

version

str

r/w/co

The version number of the file.

video-status

str

r

The status of the file, if it is a video.

width

int

r

The width of the photo or video, in pixels.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Entry

r

Class Details

class GData.PicasaWebFile(**kwargs)
Bases:

GData.Entry, GData.Commentable

Abstract:

No

Structure:

GData.PicasaWebFileClass

All the fields in the GData.PicasaWebFile structure are private and should never be accessed directly.

New in version 0.4.0.

classmethod new(id)
Parameters:

id (str or None) – the file’s ID, or None

Returns:

a new GData.PicasaWebFile; unref with GObject.Object.unref()

Return type:

GData.PicasaWebFile

Creates a new GData.PicasaWebFile with the given ID and default properties.

New in version 0.4.0.

get_album_id()
Returns:

the ID of the album containing the GData.PicasaWebFile

Return type:

str

Gets the GData.PicasaWebFile :album-id property. This is in the same form as returned by GData.PicasaWebAlbum.get_id().

New in version 0.4.0.

get_caption()
Returns:

the file’s descriptive caption, or None

Return type:

str

Gets the GData.PicasaWebFile :caption property.

New in version 0.4.0.

get_checksum()
Returns:

the checksum assigned to this file, or None

Return type:

str

Gets the GData.PicasaWebFile :checksum property.

New in version 0.4.0.

get_comment_count()
Returns:

the number of comments on the file

Return type:

int

Gets the GData.PicasaWebFile :comment-count property.

New in version 0.4.0.

get_contents()
Returns:

a GLib.List of GData.MediaContent items

Return type:

[GData.MediaContent]

Returns a list of media content, e.g. the actual photo or video.

New in version 0.4.0.

get_coordinates()
Returns:

latitude:

return location for the latitude, or None

longitude:

return location for the longitude, or None

Return type:

(latitude: float, longitude: float)

Gets the GData.PicasaWebFile :latitude and GData.PicasaWebFile :longitude properties, setting the out parameters to them. If either latitude or longitude is None, that parameter will not be set. If the coordinates are unset, latitude and longitude will be set to GObject.G_MAXDOUBLE.

New in version 0.5.0.

get_credit()
Returns:

the nickname of the user credited with this file

Return type:

str

Gets the GData.PicasaWebFile :credit property.

New in version 0.4.0.

get_distance()
Returns:

the distance recorded in the photo’s EXIF, or -1 if unknown

Return type:

float

Gets the GData.PicasaWebFile :distance property.

New in version 0.5.0.

get_edited()
Returns:

the UNIX timestamp for the time the file was last edited, or -1

Return type:

int

Gets the GData.PicasaWebFile :edited property. If the property is unset, -1 will be returned.

New in version 0.4.0.

get_exposure()
Returns:

the exposure value, or 0 if unknown

Return type:

float

Gets the GData.PicasaWebFile :exposure property.

New in version 0.5.0.

get_flash()
Returns:

True if flash was used, False otherwise

Return type:

bool

Gets the GData.PicasaWebFile :flash property.

New in version 0.5.0.

get_focal_length()
Returns:

the focal-length value, or -1 if unknown

Return type:

float

Gets the GData.PicasaWebFile :focal-length property.

New in version 0.5.0.

get_fstop()
Returns:

the F-stop value, or 0 if unknown

Return type:

float

Gets the GData.PicasaWebFile :fstop property.

New in version 0.5.0.

get_height()
Returns:

the height of the image or video, in pixels

Return type:

int

Gets the GData.PicasaWebFile :height property.

New in version 0.4.0.

get_id()
Returns:

the file’s ID

Return type:

str

Gets the GData.PicasaWebFile :file-id property.

New in version 0.7.0.

get_image_unique_id()
Returns:

the photo’s unique EXIF identifier, or None

Return type:

str

Gets the GData.PicasaWebFile :image-unique-id property.

New in version 0.5.0.

get_iso()
Returns:

the ISO speed, or -1 if unknown

Return type:

int

Gets the GData.PicasaWebFile :iso property.

New in version 0.5.0.

get_make()
Returns:

the name of the manufacturer of the camera, or None if unknown

Return type:

str

Gets the GData.PicasaWebFile :make property.

New in version 0.5.0.

get_model()
Returns:

the model name of the camera, or None if unknown

Return type:

str

Gets the GData.PicasaWebFile :model property.

New in version 0.5.0.

get_rotation()
Returns:

the image’s rotation, in degrees

Return type:

int

Gets the GData.PicasaWebFile :rotation property.

New in version 0.4.0.

get_size()
Returns:

the size of the file, in bytes

Return type:

int

Gets the GData.PicasaWebFile :size property.

New in version 0.4.0.

get_tags()
Returns:

a None-terminated array of tags associated with the file, or None

Return type:

[str]

Gets the GData.PicasaWebFile :tags property.

New in version 0.4.0.

get_thumbnails()
Returns:

a GLib.List of GData.MediaThumbnails, or None

Return type:

[GData.MediaThumbnail]

Returns a list of thumbnails, often at different sizes, for this file. Currently, PicasaWeb usually returns three thumbnails, with widths in pixels of 72, 144, and 288. However, the thumbnail will not be larger than the actual image, so thumbnails may be smaller than the widths listed above.

New in version 0.4.0.

get_timestamp()
Returns:

the UNIX timestamp for the timestamp property in milliseconds, or -1

Return type:

int

Gets the GData.PicasaWebFile :timestamp property. It’s a UNIX timestamp in milliseconds (not seconds) since the epoch. If the property is unset,

-1 will be returned.

New in version 0.4.0.

get_version()
Returns:

the file’s version number, or None

Return type:

str

Gets the GData.PicasaWebFile :version property.

New in version 0.4.0.

get_video_status()
Returns:

the status of this video (“pending”, “ready”, “final” or “failed”), or None

Return type:

str

Gets the GData.PicasaWebFile :video-status property.

New in version 0.4.0.

get_width()
Returns:

the width of the image or video, in pixels

Return type:

int

Gets the GData.PicasaWebFile :width property.

New in version 0.4.0.

is_commenting_enabled()
Returns:

True if commenting is enabled, False otherwise

Return type:

bool

Gets the GData.PicasaWebFile :is-commenting-enabled property.

New in version 0.4.0.

set_album_id(album_id)
Parameters:

album_id (str) – the ID of the new album for this file

Sets the GData.PicasaWebFile :album-id property, effectively moving the file to the album.

New in version 0.4.0.

set_caption(caption)
Parameters:

caption (str or None) – the file’s new caption, or None

Sets the GData.PicasaWebFile :caption property to caption.

Set caption to None to unset the file’s caption.

New in version 0.4.0.

set_checksum(checksum)
Parameters:

checksum (str or None) – the new checksum for this file, or None

Sets the GData.PicasaWebFile :checksum property to checksum.

Set checksum to None to unset the property.

New in version 0.4.0.

set_coordinates(latitude, longitude)
Parameters:

Sets the GData.PicasaWebFile :latitude and GData.PicasaWebFile :longitude properties to latitude and longitude respectively.

New in version 0.5.0.

set_is_commenting_enabled(is_commenting_enabled)
Parameters:

is_commenting_enabled (bool) – True if commenting should be enabled for the file, False otherwise

Sets the GData.PicasaWebFile :is-commenting-enabled property to is_commenting_enabled.

New in version 0.4.0.

set_rotation(rotation)
Parameters:

rotation (int) – the new rotation for the image, in degrees

Sets the GData.PicasaWebFile :rotation property to rotation.

The rotation is absolute, rather than cumulative, through successive calls to GData.PicasaWebFile.set_rotation(), so calling it with 90° then 20° will result in a final rotation of 20°.

New in version 0.4.0.

set_tags(tags)
Parameters:

tags ([str] or None) – a new None-terminated array of tags, or None

Sets the GData.PicasaWebFile :tags property to tags.

Set tags to None to unset the property.

New in version 0.4.0.

set_timestamp(timestamp)
Parameters:

timestamp (int) – a UNIX timestamp, or -1

Sets the GData.PicasaWebFile :timestamp property from timestamp. This should be a UNIX timestamp in milliseconds (not seconds) since the epoch. If timestamp is -1, the property will be unset.

New in version 0.4.0.

Property Details

GData.PicasaWebFile.props.album_id
Name:

album-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The ID for the file’s album. This is in the same form as returned by GData.PicasaWebAlbum.get_id().

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.caption
Name:

caption

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The file’s descriptive caption.

New in version 0.4.0.

GData.PicasaWebFile.props.checksum
Name:

checksum

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A checksum of the file, useful for duplicate detection.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.comment_count
Name:

comment-count

Type:

int

Default Value:

0

Flags:

READABLE

The number of comments on the file.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.credit
Name:

credit

Type:

str

Default Value:

None

Flags:

READABLE

The nickname of the user credited with this file.

For more information, see the Media RSS specification.

New in version 0.4.0.

GData.PicasaWebFile.props.distance
Name:

distance

Type:

float

Default Value:

-1.0

Flags:

READABLE

The distance to the subject reported in the image’s EXIF.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.edited
Name:

edited

Type:

int

Default Value:

-1

Flags:

READABLE

The time this file was last edited. If the file has not been edited yet, the content indicates the time it was created.

For more information, see the Atom Publishing Protocol specification.

New in version 0.4.0.

GData.PicasaWebFile.props.exposure
Name:

exposure

Type:

float

Default Value:

0.0

Flags:

READABLE

The exposure time.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.file_id
Name:

file-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The ID of the file. This is a substring of the ID returned by GData.Entry.get_id() for GData.PicasaWebFiles; for example, if GData.Entry.get_id() returned “http://picasaweb.google.com/data/entry/user/libgdata.picasaweb/albumid/5328889949261497249/photoid/5328890138794566386” for a particular GData.PicasaWebFile, the GData.PicasaWebFile :file-id property would be “5328890138794566386”.

For more information, see the gphoto specification.

New in version 0.7.0.

GData.PicasaWebFile.props.flash
Name:

flash

Type:

bool

Default Value:

False

Flags:

READABLE

Indicates whether the flash was used.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.focal_length
Name:

focal-length

Type:

float

Default Value:

-1.0

Flags:

READABLE

The focal length for the shot.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.fstop
Name:

fstop

Type:

float

Default Value:

0.0

Flags:

READABLE

The F-stop value.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.height
Name:

height

Type:

int

Default Value:

0

Flags:

READABLE

The height of the photo or video, in pixels.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.image_unique_id
Name:

image-unique-id

Type:

str

Default Value:

None

Flags:

READABLE

An unique ID for the image found in the EXIF.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.is_commenting_enabled
Name:

is-commenting-enabled

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Whether commenting is enabled for this file.

New in version 0.4.0.

GData.PicasaWebFile.props.iso
Name:

iso

Type:

Default Value:

-1

Flags:

READABLE

The ISO speed.

For more information, see the EXIF element reference and ISO 5800:1987.

New in version 0.5.0.

GData.PicasaWebFile.props.latitude
Name:

latitude

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The location as a latitude coordinate associated with this file. Valid latitudes range from -90.0 to 90.0 inclusive.

For more information, see the GeoRSS specification.

New in version 0.5.0.

GData.PicasaWebFile.props.longitude
Name:

longitude

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The location as a longitude coordinate associated with this file. Valid longitudes range from -180.0 to 180.0 inclusive.

For more information, see the GeoRSS specification.

New in version 0.5.0.

GData.PicasaWebFile.props.make
Name:

make

Type:

str

Default Value:

None

Flags:

READABLE

The name of the manufacturer of the camera.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.model
Name:

model

Type:

str

Default Value:

None

Flags:

READABLE

The model of the camera.

For more information, see the EXIF element reference.

New in version 0.5.0.

GData.PicasaWebFile.props.rotation
Name:

rotation

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The rotation of the photo, in degrees. This will only be non-zero for files which are pending rotation, and haven’t yet been permanently modified. For files which have already been rotated, this will be 0.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.size
Name:

size

Type:

int

Default Value:

0

Flags:

READABLE

The size of the file, in bytes.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.tags
Name:

tags

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE

A None-terminated array of tags associated with the file.

For more information, see the Media RSS specification.

New in version 0.4.0.

GData.PicasaWebFile.props.timestamp
Name:

timestamp

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

The time the file was purportedly taken. This a UNIX timestamp in milliseconds (not seconds) since the epoch.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.version
Name:

version

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The version number of the file. Version numbers are based on modification time, so they don’t increment linearly.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.video_status
Name:

video-status

Type:

str

Default Value:

None

Flags:

READABLE

The status of the file, if it is a video. For example: GData.PICASAWEB_VIDEO_STATUS_PENDING or GData.PICASAWEB_VIDEO_STATUS_FAILED.

For more information, see the gphoto specification.

New in version 0.4.0.

GData.PicasaWebFile.props.width
Name:

width

Type:

int

Default Value:

0

Flags:

READABLE

The width of the photo or video, in pixels.

For more information, see the gphoto specification.

New in version 0.4.0.