GData.DocumentsEntry¶
- Subclasses:
Methods¶
- Inherited:
GData.Entry (24), GData.Parsable (5), GObject.Object (37), GData.AccessHandler (2)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
GData.Parsable (9), GObject.Object (7), GData.AccessHandler (1)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
Indicates whether the current user can edit this file. |
||
d/r |
The document ID of the document. |
||
d/r |
The last time the document was edited. |
||
r |
The size of the document. |
||
r/w |
Indicates whether the document entry has been deleted. |
||
r |
Indicates the author of the last modification. |
||
r |
The last time the document was viewed. |
||
r |
The amount of user quota the document is occupying. |
||
r |
The resource ID of the document. |
||
r |
The time at which this file was shared with the user. |
||
r/w |
Indicates whether writers can invite others to edit. |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class GData.DocumentsEntry(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
All the fields in the
GData.DocumentsEntrystructure are private and should never be accessed directly.New in version 0.4.0.
- add_documents_property(property)¶
- Parameters:
property (
GData.DocumentsProperty) – aGData.DocumentsProperty- Returns:
Trueif the property doesn’t exist in the “properties” list, or thatGData.DocumentsProperty:valueof property has been set toNoneby a call toGData.DocumentsEntry.remove_documents_property().Falseif property exists in “properties” list, or in the case that self or property aren’t of proper types.- Return type:
Inserts/updates property on “properties” list in self. Since, a
GData.DocumentsPropertyis uniquely identified byGData.DocumentsProperty:keyandGData.DocumentsProperty:visibility, if no such property exists in the “properties” list, then a property will be appended to the list after incrementing the reference count.In case that there already exists a property in “properties”, the
GData.DocumentsPropertyinside the list will be updated to property. Note thatGData.DocumentsProperty:valuehas no role in determining the uniqueness of aGData.DocumentsProperty.The changes made by this function will be local only and you need to explicitly update self by calling
GData.Service.update_entry().New in version 0.17.11.
- can_edit()¶
-
Gets the
GData.DocumentsEntry:can-editproperty.New in version 0.18.0.
- get_document_id()¶
- Returns:
the document’s document ID
- Return type:
Gets the
GData.DocumentsEntry:document-idproperty. Theonline GData Documentation refers to these as “untyped resource IDs”.
New in version 0.4.0.
Deprecated since version 0.11.0: Use
GData.DocumentsEntry.get_resource_id() instead. SeeGData.DocumentsEntry:document-id.
- get_document_properties()¶
- Returns:
a
GLib.Listof pointers toGData.DocumentsPropertys- Return type:
Gets a list of the
GData.DocumentsPropertysfor this entry.New in version 0.17.11.
- get_edited()¶
- Returns:
the UNIX timestamp for the time the document was last edited, or -1
- Return type:
Gets the
GData.DocumentsEntry:editedproperty. If the property is unset, -1 will be returned.New in version 0.4.0.
Deprecated since version 0.17.0: Use
GData.Entry.get_updated() instead. SeeGData.DocumentsEntry:edited.
- get_file_size()¶
- Returns:
the size of the document in bytes
- Return type:
Gets the
GData.DocumentsEntry:file-sizeproperty.New in version 0.17.7.
- get_last_modified_by()¶
- Returns:
the author who last modified the document
- Return type:
Gets the
GData.DocumentsEntry:last-modified-byproperty.New in version 0.4.0.
- get_last_viewed()¶
- Returns:
the UNIX timestamp for the time the document was last viewed, or -1
- Return type:
Gets the
GData.DocumentsEntry:last-viewedproperty. If the property is unset, -1 will be returned.New in version 0.4.0.
- get_path()¶
- Returns:
the folder hierarchy path containing the document, or
None; free withGLib.free()- Return type:
Builds a path for the
GData.DocumentsEntry, starting from a root node and traversing the folders containing the document, then ending with the document’s ID.An example path would be:
/folder_id1/folder_id2/document_id.Note: the path is based on the entry/document IDs of the folders (
GData.Entry:id) and document (GData.DocumentsEntry:document-id), and not the entries’ human-readable names (GData.Entry:title).New in version 0.4.0.
- get_quota_used()¶
- Returns:
the number of quota bytes used by the document
- Return type:
Gets the
GData.DocumentsEntry:quota-usedproperty.New in version 0.13.0.
- get_resource_id()¶
- Returns:
the document’s resource ID
- Return type:
Gets the
GData.DocumentsEntry:resource-idproperty.New in version 0.11.0.
- Returns:
the UNIX timestamp for the time at which this file was shared with the user, or
-1- Return type:
Gets the
GData.DocumentsEntry:shared-with-me-dateproperty. If the property is unset,-1will be returned.New in version 0.18.0.
- is_deleted()¶
-
Gets the
GData.DocumentsEntry:is-deletedproperty.New in version 0.5.0.
- remove_documents_property(property)¶
- Parameters:
property (
GData.DocumentsProperty) – aGData.DocumentsProperty- Returns:
Trueif property has been successfully removed from “properties” list on self,Falseotherwise.- Return type:
The property specified by property will be removed from the “properties” list on self.
Only
GData.DocumentsProperty:keyandGData.DocumentsProperty:visibilitywill be used to find property in “properties” list.GData.DocumentsProperty:valuehas no role in determining the uniqueness of aGData.DocumentsProperty.The changes made by this function will be local only and you need to explicitly update self by calling
GData.Service.update_entry().New in version 0.17.11.
- set_writers_can_invite(writers_can_invite)¶
- Parameters:
writers_can_invite (
bool) –Trueif writers can invite other people to edit the document,Falseotherwise
Sets the
GData.DocumentsEntry:writers-can-inviteproperty to writers_can_invite.New in version 0.4.0.
- writers_can_invite()¶
-
Gets the
GData.DocumentsEntry:writers-can-inviteproperty.New in version 0.4.0.
Property Details¶
- GData.DocumentsEntry.props.can_edit¶
-
Indicates whether the current user can edit this file.
New in version 0.18.0.
- GData.DocumentsEntry.props.document_id¶
- Name:
document-id- Type:
- Default Value:
- Flags:
The document ID of the document, which is different from its entry ID (
GData.Entry:id). Theonline GData Documentation refers to these as “untyped resource IDs”.
New in version 0.4.0.
Deprecated since version 0.11.0: This a substring of the
GData.DocumentsEntry:resource-id, which is more general and should be used instead.
- GData.DocumentsEntry.props.edited¶
- Name:
edited- Type:
- Default Value:
-1- Flags:
The last time the document was edited. If the document has not been edited yet, the content indicates the time it was created.
New in version 0.4.0.
Deprecated since version 0.17.0: This is identical to
GData.Entry:updated.
- GData.DocumentsEntry.props.file_size¶
-
The size of the document. This is only set for non-document files. Standard formats, such as
GData.DocumentsText,GData.DocumentsSpreadsheetandGData.DocumentsFolderare not binary data and so have no size. Measured in bytes.New in version 0.17.7.
- GData.DocumentsEntry.props.is_deleted¶
-
Indicates whether the document entry has been deleted (moved to the trash). Deleted documents will only appear in query results if the
GData.DocumentsQuery:show-deletedproperty isTrue.New in version 0.5.0.
- GData.DocumentsEntry.props.last_modified_by¶
- Name:
last-modified-by- Type:
- Default Value:
- Flags:
Indicates the author of the last modification.
New in version 0.4.0.
- GData.DocumentsEntry.props.last_viewed¶
-
The last time the document was viewed.
New in version 0.4.0.
- GData.DocumentsEntry.props.quota_used¶
-
The amount of user quota the document is occupying. Currently, only arbitrary files consume file space quota (whereas standard document formats, such as
GData.DocumentsText,GData.DocumentsSpreadsheetandGData.DocumentsFolderdon’t). Measured in bytes.This property will be 0 for documents which aren’t consuming any quota.
New in version 0.13.0.
- GData.DocumentsEntry.props.resource_id¶
-
The resource ID of the document. This should not normally need to be used in client code, and is mostly for internal use. To uniquely identify a given document or folder, use its
GData.Entry:id.Resource IDs have the form:
document|drawing|pdf|spreadsheet|presentation|folder:untyped resource ID; whereas entry IDs have the form:https://docs.google.com/feeds/id/resource IDin version 3 of the API.For more information, see the
Google Documents API reference.
New in version 0.11.0.
-
The UNIX timestamp for the time at which this file was shared with the user.
New in version 0.18.0.