1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-22 10:05:29 +02:00
Files
OpenIntegrations/docs/en/md/Google_Drive/Comment-management/Create-comment.mdx
T
Vitaly the Alpaca (bot) 6473088320 Main build (Jenkins)
2024-11-05 13:10:27 +03:00

78 lines
1.9 KiB
Plaintext

---
sidebar_position: 1
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Create comment
Creates a comment for a file or directory
`Function CreateComment(Val Token, Val Identifier, Val Comment) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Identifier | --object | String | ✔ | Identifier of the object that needs a comment |
| Comment | --text | String | ✔ | Comment text |
Returns: Map Of KeyAndValue - serialized JSON response from Google
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "ya29.a0AeDClZCyyq2tOx0JRD_XVIaMyzhn2uw2tXz5q_8IavFpdrB2btMzTnCCZO3k0K-cq5rv7dXqrg2-ddLdFJqrq0HqLeTkWJkeFqI6iaoCX...";
Identifier = "1g5oQGNJXwcA4L3f6ug0vuw95AKhI7ZJQ";
Comment = "Comment text";
Result = OPI_GoogleDrive.CreateComment(Token, Identifier, Comment);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint gdrive CreateComment \
--token "***" \
--object "1dmhuOLP_48faG6m9_HjpBiTrUL53Qcem" \
--text "Comment text"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint gdrive CreateComment ^
--token "***" ^
--object "1dmhuOLP_48faG6m9_HjpBiTrUL53Qcem" ^
--text "Comment text"
```
</TabItem>
</Tabs>
```json title="Result"
{
"id": "AAABW5rdEaE",
"kind": "drive#comment",
"createdTime": "2024-10-09T06:13:52.313Z",
"modifiedTime": "2024-10-09T06:13:52.313Z",
"replies": [],
"author": {
"displayName": "Антон Титовец",
"kind": "drive#user",
"me": true,
"photoLink": "//lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s50-c-k-no"
},
"deleted": false,
"htmlContent": "Comment text",
"content": "Comment text"
}
```