пятница, 12 марта 2010 г.

Copying documents

http://code.google.com/intl/ru/apis/documents/docs/3.0/developers_guide_protocol.html#CopyingDocs

Note: The copy feature is only available for document, spreadsheet, and presentation types. Other formats (e.g. PDFs) do not support the copy command.

To duplicate a document in a user's document list, send an HTTP POST to the main feed. In the <entry>, set the <id> to the self link of the source entry (the document to be copied). Alternatively, you can use the resource id of the source entry. The following example uses the self link of the source entry:

POST /feeds/default/private/full/ HTTP/1.1
Host: docs.google.com
GData-Version: 3.0
Authorization: <your authorization header here>
Content-Length: 292
Content-Type: application/atom+xml

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>https://docs.google.com/feeds/default/private/full/document%3Adoc_id</id>
<title>My Twin</title>
</entry>

Note: a document cannot be copied directly into a folder. Intead, first issue the copy command, followed by a move operation. See Moving a resource into a folder.

Комментариев нет:

Отправить комментарий