Mark or Unmark Favorite Document in Zoho Writer
Table of Contents
Description
The zoho.writer.documents.favorite task marks or unmarks the document as favorite. This task is based on the Zoho Writer Make/Remove Favourite API.
Syntax
<response> = zoho.writer.documents.favorite(<document_id>, <operation_type>, <connection>)
where:
Params | Data type | Description |
<response> | KEY-VALUE | The response returned by Zoho Writer. It provides the details of the user who favorited the document. |
<document_id> | TEXT | The ID of the document to be favorited. The document ID can be obtained from the URL of the document which needs to be favorited. The URL is formatted as follows: |
<operation_type> | BOOLEAN | 1. If you would like to make the document as favorite, pass the value as true. 2. If you would like to remove the document from favorites, pass the value as false. |
<connection> | TEXT | The connection's link name. Note:
|
Example
The following script favorites the given Writer document.
document_id = "h36bc2a6c50b2754a405880c1d1679a5f5be9"; operation_type = "true"; //true|false response = zoho.writer.documents.favorite(document_id, operation_type, "writer_oauth_connection"); info response;
where:
response
"h36bc2a6c50b2754a405880c1d1679a5f5be9"
"true"
"writer_oauth_connection"
Response Format
{ "result": "success", "modified_by": { "email_id": "amelia@zylker.com", "profile_photo": "https://contacts.zoho.com/file?t=user&ID=1308724&fs=thumb", "user_id": "1308724", "display_name": "Amelia" }, "is_favourite": true, "message": "The document has been added to your favourites." }