GData.Entry

g GData.Entry GData.Entry GData.Parsable GData.Parsable GData.Parsable->GData.Entry GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

GData.AccessRule, GData.CalendarCalendar, GData.CalendarEvent, GData.Comment, GData.ContactsContact, GData.ContactsGroup, GData.DocumentsDrive, GData.DocumentsEntry, GData.FreebaseResult, GData.PicasaWebAlbum, GData.PicasaWebFile, GData.PicasaWebUser, GData.TasksTask, GData.TasksTasklist, GData.YouTubeVideo

Methods

Inherited:

GData.Parsable (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (id)

add_author (author)

add_category (category)

add_link (_link)

get_authors ()

get_categories ()

get_content ()

get_content_uri ()

get_etag ()

get_id ()

get_published ()

get_rights ()

get_summary ()

get_title ()

get_updated ()

is_inserted ()

look_up_link (rel)

look_up_links (rel)

remove_link (_link)

set_content (content)

set_content_uri (content_uri)

set_rights (rights)

set_summary (summary)

set_title (title)

Virtual Methods

Inherited:

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

Properties

Inherited:

GData.Parsable (1)

Name

Type

Flags

Short Description

content

str

r/w

The content of the entry.

content-uri

str

r/w

A URI pointing to the location of the content of the entry.

etag

str

r/w/co

An identifier for a particular version of the entry.

id

str

r/w/co

A permanent, universally unique identifier for the entry, in IRI form.

is-inserted

bool

r

Whether the entry has been inserted on the server.

published

int

r

The date and time the entry was first published or made available.

rights

str

r/w

The ownership rights pertaining to the entry.

summary

str

r/w

A short summary, abstract, or excerpt of the entry.

title

str

r/w

A human-readable title for the entry.

updated

int

r

The date and time when the entry was most recently updated significantly.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Parsable

r

Class Details

class GData.Entry(**kwargs)
Bases:

GData.Parsable

Abstract:

No

Structure:

GData.EntryClass

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

classmethod new(id)
Parameters:

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

Returns:

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

Return type:

GData.Entry

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

add_author(author)
Parameters:

author (GData.Author) – a GData.Author to add

Adds author to the list of authors in the given GData.Entry and increments its reference count.

Duplicate authors will not be added to the list.

add_category(category)
Parameters:

category (GData.Category) – a GData.Category to add

Adds category to the list of categories in the given GData.Entry, and increments its reference count.

Duplicate categories will not be added to the list.

Parameters:

_link (GData.Link) – a GData.Link to add

Adds _link to the list of links in the given GData.Entry and increments its reference count.

Duplicate links will not be added to the list.

get_authors()
Returns:

a GLib.List of GData.Authors

Return type:

[GData.Author]

Gets a list of the GData.Authors for this entry.

New in version 0.7.0.

get_categories()
Returns:

a GLib.List of GData.Categorys

Return type:

[GData.Category]

Gets a list of the GData.Categorys containing this entry.

New in version 0.2.0.

get_content()
Returns:

the entry’s content, or None

Return type:

str

Returns the textual content in this entry. If the content in this entry is pointed to by a URI, None will be returned; the content URI will be returned by GData.Entry.get_content_uri().

get_content_uri()
Returns:

a URI pointing to the entry’s content, or None

Return type:

str

Returns a URI pointing to the content of this entry. If the content in this entry is stored directly, None will be returned; the content will be returned by GData.Entry.get_content().

New in version 0.7.0.

get_etag()
Returns:

the entry’s ETag, or None

Return type:

str or None

Returns the ETag of the entry; a unique identifier for each version of the entry. For more information, see the

online documentation. The ETag will never be empty; it’s either None or a valid ETag.

New in version 0.2.0.

get_id()
Returns:

the entry’s ID, or None

Return type:

str or None

Returns the URN ID of the entry; a unique and permanent identifier for the object the entry represents.

The ID may be None if and only if the GData.Entry has been newly created, and hasn’t yet been inserted on the server.

get_published()
Returns:

the UNIX timestamp for the original publish time of the entry

Return type:

int

Gets the time the entry was originally published.

get_rights()
Returns:

the entry’s rights information

Return type:

str

Returns the rights pertaining to the entry, or None if not set.

New in version 0.5.0.

get_summary()
Returns:

the entry’s summary, or None

Return type:

str

Returns the summary of the entry.

New in version 0.4.0.

get_title()
Returns:

the entry’s title

Return type:

str

Returns the title of the entry. This will never be None, but may be an empty string.

get_updated()
Returns:

the UNIX timestamp for the last update of the entry

Return type:

int

Gets the time the entry was last updated.

is_inserted()
Returns:

True if the entry has been inserted already, False otherwise

Return type:

bool

Returns whether the entry is marked as having been inserted on (uploaded to) the server already.

Parameters:

rel (str) – the value of the rel attribute of the desired link

Returns:

a GData.Link, or None if one was not found

Return type:

GData.Link

Looks up a link by relation type from the list of links in the entry. If the link has one of the standard Atom relation types, use one of the defined rel values, instead of a static string. e.g. GData.LINK_EDIT or GData.LINK_SELF.

In the rare event of requiring a list of links with the same rel value, use GData.Entry.look_up_links().

New in version 0.1.1.

Parameters:

rel (str) – the value of the rel attribute of the desired links

Returns:

a GLib.List of GData.Links, or None if none were found; free the list with g_list_free()

Return type:

[GData.Link]

Looks up a list of links by relation type from the list of links in the entry. If the links have one of the standard Atom relation types, use one of the defined rel values, instead of a static string. e.g. GData.LINK_EDIT or GData.LINK_SELF.

If you will only use the first link found, consider calling GData.Entry.look_up_link() instead.

New in version 0.4.0.

Parameters:

_link (GData.Link) – a GData.Link to remove

Returns:

True if _link was found in the GData.Entry and removed, False if it was not found

Return type:

bool

Removes _link from the list of links in the given GData.Entry and decrements its reference count (since the GData.Entry held a reference to it while it was in the list).

New in version 0.10.0.

set_content(content)
Parameters:

content (str or None) – the new content for the entry, or None

Sets the entry’s content to content. This unsets GData.Entry :content-uri.

set_content_uri(content_uri)
Parameters:

content_uri (str or None) – the new URI pointing to the content for the entry, or None

Sets the URI pointing to the entry’s content to content. This unsets GData.Entry :content.

New in version 0.7.0.

set_rights(rights)
Parameters:

rights (str or None) – the new rights, or None

Sets the rights for this entry.

New in version 0.5.0.

set_summary(summary)
Parameters:

summary (str or None) – the new entry summary, or None

Sets the summary of the entry.

New in version 0.4.0.

set_title(title)
Parameters:

title (str or None) – the new entry title, or None

Sets the title of the entry.

Property Details

GData.Entry.props.content
Name:

content

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The content of the entry. This is mutually exclusive with GData.Entry :content.

For more information, see the Atom specification.

GData.Entry.props.content_uri
Name:

content-uri

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A URI pointing to the location of the content of the entry. This is mutually exclusive with GData.Entry :content.

For more information, see the

Atom specification.

New in version 0.7.0.

GData.Entry.props.etag
Name:

etag

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

An identifier for a particular version of the entry. This changes every time the entry on the server changes, and can be used for conditional retrieval and locking.

For more information, see the GData specification.

New in version 0.2.0.

GData.Entry.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

A permanent, universally unique identifier for the entry, in IRI form. This is None for new entries (i.e. ones which haven’t yet been inserted on the server, created with GData.Entry.new()), and a non-empty IRI string for all other entries.

For more information, see the Atom specification.

GData.Entry.props.is_inserted
Name:

is-inserted

Type:

bool

Default Value:

False

Flags:

READABLE

Whether the entry has been inserted on the server. This is False for entries which have just been created using GData.Entry.new() and True for entries returned from the server by queries. It is set to True when an entry is inserted using GData.Service.insert_entry().

GData.Entry.props.published
Name:

published

Type:

int

Default Value:

-1

Flags:

READABLE

The date and time the entry was first published or made available.

For more information, see the Atom specification.

GData.Entry.props.rights
Name:

rights

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The ownership rights pertaining to the entry.

For more information, see the Atom specification.

New in version 0.5.0.

GData.Entry.props.summary
Name:

summary

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A short summary, abstract, or excerpt of the entry.

For more information, see the Atom specification.

New in version 0.4.0.

GData.Entry.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A human-readable title for the entry.

For more information, see the Atom specification.

GData.Entry.props.updated
Name:

updated

Type:

int

Default Value:

-1

Flags:

READABLE

The date and time when the entry was most recently updated significantly.

For more information, see the Atom specification.