You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-12-03 22:39:12 +02:00
Создание MD файлов документации
This commit is contained in:
committed by
Vitaly the Alpaca (bot)
parent
9c2d012d41
commit
09822c04ec
@@ -1,60 +1,60 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create comment
|
||||
Creates a comment for a file or directory
|
||||
|
||||
|
||||
*Function CreateComment(Val Token, Val Identifier, Val Comment) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the object that needs a comment |
|
||||
| Comment | --text | String | Comment text |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW";
|
||||
Comment = "NewComment";
|
||||
|
||||
Response = OPI_GoogleDrive.CreateComment(Token, Identifier, Comment); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive CreateComment --token %token% --object "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW" --text %text%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"content": "NewComment",
|
||||
"htmlContent": "NewComment",
|
||||
"author": {
|
||||
"photoLink": "//lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s50-c-k-no",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"replies": [],
|
||||
"modifiedTime": "2024-03-17T12:53:45.469Z",
|
||||
"createdTime": "2024-03-17T12:53:45.469Z",
|
||||
"kind": "drive#comment",
|
||||
"deleted": false,
|
||||
"id": "AAABI3NNNAY"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create comment
|
||||
Creates a comment for a file or directory
|
||||
|
||||
|
||||
*Function CreateComment(Val Token, Val Identifier, Val Comment) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the object that needs a comment |
|
||||
| Comment | --text | String | Comment text |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW";
|
||||
Comment = "NewComment";
|
||||
|
||||
Response = OPI_GoogleDrive.CreateComment(Token, Identifier, Comment); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive CreateComment --token %token% --object "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW" --text %text%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"content": "NewComment",
|
||||
"htmlContent": "NewComment",
|
||||
"author": {
|
||||
"photoLink": "//lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s50-c-k-no",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"replies": [],
|
||||
"modifiedTime": "2024-03-17T12:53:45.469Z",
|
||||
"createdTime": "2024-03-17T12:53:45.469Z",
|
||||
"kind": "drive#comment",
|
||||
"deleted": false,
|
||||
"id": "AAABI3NNNAY"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Delete comment
|
||||
Deletes comment by ID
|
||||
|
||||
|
||||
*Function DeleteComment(Val Token, Val ObjectID, Val CommentID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| ObjectID | --object | String | Identifier of the file or directory where the comment is located |
|
||||
| CommentID | --comment | String | Comment identifier |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.DeleteComment(Token, Identifier, Comment); //Map
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive DeleteComment --token %token% --object %object% --comment %comment%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
''
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Delete comment
|
||||
Deletes comment by ID
|
||||
|
||||
|
||||
*Function DeleteComment(Val Token, Val ObjectID, Val CommentID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| ObjectID | --object | String | Identifier of the file or directory where the comment is located |
|
||||
| CommentID | --comment | String | Comment identifier |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.DeleteComment(Token, Identifier, Comment); //Map
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive DeleteComment --token %token% --object %object% --comment %comment%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
''
|
||||
|
||||
```
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get list of comments
|
||||
Gets the list of all comments of the object
|
||||
|
||||
|
||||
*Function GetCommentList(Val Token, Val ObjectID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| ObjectID | --object | String | Object identifier |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
AndДFile = "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW";
|
||||
|
||||
Response = OPI_GoogleDrive.GetCommentList(Token, AndДFile); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetCommentList --token %token% --object %object%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"comments": [
|
||||
{
|
||||
"content": "NewComment",
|
||||
"htmlContent": "NewComment",
|
||||
"author": {
|
||||
"photoLink": "//lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s50-c-k-no",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"replies": [],
|
||||
"modifiedTime": "2024-03-17T12:53:45.469Z",
|
||||
"createdTime": "2024-03-17T12:53:45.469Z",
|
||||
"kind": "drive#comment",
|
||||
"deleted": false,
|
||||
"id": "AAABI3NNNAY"
|
||||
}
|
||||
],
|
||||
"kind": "drive#commentList"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get list of comments
|
||||
Gets the list of all comments of the object
|
||||
|
||||
|
||||
*Function GetCommentList(Val Token, Val ObjectID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| ObjectID | --object | String | Object identifier |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
AndДFile = "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW";
|
||||
|
||||
Response = OPI_GoogleDrive.GetCommentList(Token, AndДFile); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetCommentList --token %token% --object %object%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"comments": [
|
||||
{
|
||||
"content": "NewComment",
|
||||
"htmlContent": "NewComment",
|
||||
"author": {
|
||||
"photoLink": "//lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s50-c-k-no",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"replies": [],
|
||||
"modifiedTime": "2024-03-17T12:53:45.469Z",
|
||||
"createdTime": "2024-03-17T12:53:45.469Z",
|
||||
"kind": "drive#comment",
|
||||
"deleted": false,
|
||||
"id": "AAABI3NNNAY"
|
||||
}
|
||||
],
|
||||
"kind": "drive#commentList"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get comment
|
||||
Gets comment by ID
|
||||
|
||||
|
||||
*Function GetComment(Val Token, Val ObjectID, Val CommentID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| ObjectID | --object | String | Identifier of the file or directory where the comment is located |
|
||||
| CommentID | --comment | String | Comment identifier |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
AndДFile = "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW";
|
||||
CommentID = AAABI3NNNAY;
|
||||
|
||||
Response = OPI_GoogleDrive.GetComment(Token, AndДFile, CommentID); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetComment --token %token% --object %object% --comment "AAABI3NNNAY"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"content": "NewComment",
|
||||
"htmlContent": "NewComment",
|
||||
"author": {
|
||||
"photoLink": "//lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s50-c-k-no",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"replies": [],
|
||||
"modifiedTime": "2024-03-17T12:53:45.469Z",
|
||||
"createdTime": "2024-03-17T12:53:45.469Z",
|
||||
"kind": "drive#comment",
|
||||
"deleted": false,
|
||||
"id": "AAABI3NNNAY"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get comment
|
||||
Gets comment by ID
|
||||
|
||||
|
||||
*Function GetComment(Val Token, Val ObjectID, Val CommentID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| ObjectID | --object | String | Identifier of the file or directory where the comment is located |
|
||||
| CommentID | --comment | String | Comment identifier |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
AndДFile = "1rCyOc4A8VYw7DM3HV55P9BuKWayJOSvW";
|
||||
CommentID = AAABI3NNNAY;
|
||||
|
||||
Response = OPI_GoogleDrive.GetComment(Token, AndДFile, CommentID); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetComment --token %token% --object %object% --comment "AAABI3NNNAY"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"content": "NewComment",
|
||||
"htmlContent": "NewComment",
|
||||
"author": {
|
||||
"photoLink": "//lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s50-c-k-no",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"replies": [],
|
||||
"modifiedTime": "2024-03-17T12:53:45.469Z",
|
||||
"createdTime": "2024-03-17T12:53:45.469Z",
|
||||
"kind": "drive#comment",
|
||||
"deleted": false,
|
||||
"id": "AAABI3NNNAY"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Comment management",
|
||||
"position": "3"
|
||||
}
|
||||
{
|
||||
"label": "Comment management",
|
||||
"position": "3"
|
||||
}
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Copy object
|
||||
Copies file or directory
|
||||
|
||||
|
||||
*Function CopyObject(Val Token, Val Identifier, Val NewName = "", Val NewParent = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Object identifier |
|
||||
| NewName | --title | String | New object name |
|
||||
| NewParent | --catalog | String | New parent directory |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
NewName = "CopiedFile.jpeg";
|
||||
NewLocation = "1603PU_Hrkvj4HeFJKYSVxZJDRoGvd3SJ";
|
||||
Identifier = "1F8pfXPgltiOG2fPv88uStwegYj1tRoFk";
|
||||
|
||||
Response = OPI_GoogleDrive.CopyObject(Token, Identifier, NewName, NewLocation) //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive CopyObject --token %token% --object "1F8pfXPgltiOG2fPv88uStwegYj1tRoFk" --title "CopiedFile.jpeg" --catalog %catalog%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "image/jpeg",
|
||||
"name": "CopiedFile.jpeg",
|
||||
"id": "1uxsMaxL1W5Y7z6-HhjE6QpyDxFPgW4Fy",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Copy object
|
||||
Copies file or directory
|
||||
|
||||
|
||||
*Function CopyObject(Val Token, Val Identifier, Val NewName = "", Val NewParent = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Object identifier |
|
||||
| NewName | --title | String | New object name |
|
||||
| NewParent | --catalog | String | New parent directory |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
NewName = "CopiedFile.jpeg";
|
||||
NewLocation = "1603PU_Hrkvj4HeFJKYSVxZJDRoGvd3SJ";
|
||||
Identifier = "1F8pfXPgltiOG2fPv88uStwegYj1tRoFk";
|
||||
|
||||
Response = OPI_GoogleDrive.CopyObject(Token, Identifier, NewName, NewLocation) //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive CopyObject --token %token% --object "1F8pfXPgltiOG2fPv88uStwegYj1tRoFk" --title "CopiedFile.jpeg" --catalog %catalog%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "image/jpeg",
|
||||
"name": "CopiedFile.jpeg",
|
||||
"id": "1uxsMaxL1W5Y7z6-HhjE6QpyDxFPgW4Fy",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Create folder
|
||||
Creates an empty directory on the drive
|
||||
|
||||
|
||||
*Function CreateFolder(Val Token, Val Name, Val Parent = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Name | --title | String | Folder name |
|
||||
| Parent | --catalog | String | Parent |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "TestFolder";
|
||||
|
||||
Response = OPI_GoogleDrive.CreateFolder(Token, Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive CreateFolder --token %token% --title "TestFolder" --catalog %catalog%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"name": "TestFolder",
|
||||
"id": "1fIqr5pJV3QybT5sPeZhBD_0TIvtL5Ovc",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Create folder
|
||||
Creates an empty directory on the drive
|
||||
|
||||
|
||||
*Function CreateFolder(Val Token, Val Name, Val Parent = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Name | --title | String | Folder name |
|
||||
| Parent | --catalog | String | Parent |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "TestFolder";
|
||||
|
||||
Response = OPI_GoogleDrive.CreateFolder(Token, Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive CreateFolder --token %token% --title "TestFolder" --catalog %catalog%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"name": "TestFolder",
|
||||
"id": "1fIqr5pJV3QybT5sPeZhBD_0TIvtL5Ovc",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
---
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Delete object
|
||||
Deletes file or directory by ID
|
||||
|
||||
|
||||
*Function DeleteObject(Val Token, Val Identifier) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the object to delete |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.DeleteObject(Token, Identifier); //Map
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive DeleteObject --token %token% --object "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
''
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Delete object
|
||||
Deletes file or directory by ID
|
||||
|
||||
|
||||
*Function DeleteObject(Val Token, Val Identifier) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the object to delete |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.DeleteObject(Token, Identifier); //Map
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive DeleteObject --token %token% --object "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
''
|
||||
|
||||
```
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Download file
|
||||
Gets file by ID
|
||||
|
||||
|
||||
*Function DownloadFile(Val Token, Val Identifier, Val SavePath = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | File identifier |
|
||||
| SavePath | --out | String | File save path |
|
||||
|
||||
|
||||
Returns: BinaryData,String - Binary data or file path when SavePath parameter is specified
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.DownloadFile(Token, Identifier); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive DownloadFile --token %token% --object "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa" --out %out%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Download file
|
||||
Gets file by ID
|
||||
|
||||
|
||||
*Function DownloadFile(Val Token, Val Identifier, Val SavePath = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | File identifier |
|
||||
| SavePath | --out | String | File save path |
|
||||
|
||||
|
||||
Returns: BinaryData,String - Binary data or file path when SavePath parameter is specified
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.DownloadFile(Token, Identifier); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive DownloadFile --token %token% --object "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa" --out %out%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
@@ -1,148 +1,148 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get list of directories
|
||||
Gets the list of drive directories
|
||||
|
||||
|
||||
*Function GetDirectoriesList(Val Token, Val NameContains = "", Val Detailed = False) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| NameContains | --querry | String | Filter by name |
|
||||
| Detailed | --depth | Boolean | Adds a list of files to the directory fields |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Array of directory mappings
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Description";
|
||||
Response = OPI_GoogleDrive.GetDirectoriesList(Token, Name, False); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetDirectoriesList --token %token% --querry %querry% --depth %depth%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
[
|
||||
{
|
||||
"linkShareMetadata": {
|
||||
"securityUpdateEnabled": true,
|
||||
"securityUpdateEligible": false
|
||||
},
|
||||
"modifiedByMe": true,
|
||||
"quotaBytesUsed": "0",
|
||||
"viewedByMeTime": "2024-03-13T06:02:50.470Z",
|
||||
"createdTime": "2024-03-13T06:02:50.470Z",
|
||||
"permissionIds": [
|
||||
"07468399490707249352"
|
||||
],
|
||||
"modifiedByMeTime": "2024-03-13T06:02:50.470Z",
|
||||
"explicitlyTrashed": false,
|
||||
"trashed": true,
|
||||
"id": "1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4",
|
||||
"starred": false,
|
||||
"name": "MovesDescription",
|
||||
"permissions": [
|
||||
{
|
||||
"pendingOwner": false,
|
||||
"role": "owner",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"kind": "drive#permission",
|
||||
"type": "user",
|
||||
"deleted": false,
|
||||
"displayName": "Anton Titovets",
|
||||
"id": "07468399490707249352"
|
||||
}
|
||||
],
|
||||
"spaces": [
|
||||
"drive"
|
||||
],
|
||||
"webViewLink": "https://drive.google.com/drive/folders/1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4",
|
||||
"isAppAuthorized": false,
|
||||
"owners": [
|
||||
{
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
}
|
||||
],
|
||||
"version": "2",
|
||||
"lastModifyingUser": {
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"shared": false,
|
||||
"hasThumbnail": false,
|
||||
"parents": [
|
||||
"1PAFI1-rThB46uix012xmLQ01h-JARjaz"
|
||||
],
|
||||
"ownedByMe": true,
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"viewersCanCopyContent": true,
|
||||
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder",
|
||||
"viewedByMe": true,
|
||||
"writersCanShare": true,
|
||||
"folderColorRgb": "#8f8f8f",
|
||||
"copyRequiresWriterPermission": false,
|
||||
"capabilities": {
|
||||
"canRemoveContentRestriction": false,
|
||||
"canModifyOwnerContentRestriction": false,
|
||||
"canModifyLabels": false,
|
||||
"canAcceptOwnership": false,
|
||||
"canChangeSecurityUpdateEnabled": false,
|
||||
"canMoveItemWithinDrive": true,
|
||||
"canRemoveMyDriveParent": true,
|
||||
"canReadLabels": false,
|
||||
"canAddMyDriveParent": false,
|
||||
"canShare": true,
|
||||
"canModifyContent": true,
|
||||
"canUntrash": true,
|
||||
"canMoveItemOutOfDrive": false,
|
||||
"canMoveItemIntoTeamDrive": false,
|
||||
"canModifyContentRestriction": false,
|
||||
"canReadRevisions": false,
|
||||
"canTrash": true,
|
||||
"canRemoveChildren": true,
|
||||
"canListChildren": true,
|
||||
"canDownload": true,
|
||||
"canDelete": true,
|
||||
"canRename": true,
|
||||
"canChangeCopyRequiresWriterPermission": false,
|
||||
"canAddChildren": true,
|
||||
"canComment": true,
|
||||
"canModifyEditorContentRestriction": false,
|
||||
"canMoveChildrenWithinDrive": true,
|
||||
"canCopy": false,
|
||||
"canChangeViewersCanCopyContent": false,
|
||||
"canEdit": true
|
||||
},
|
||||
"modifiedTime": "2024-03-13T06:02:50.470Z",
|
||||
"thumbnailVersion": "0",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get list of directories
|
||||
Gets the list of drive directories
|
||||
|
||||
|
||||
*Function GetDirectoriesList(Val Token, Val NameContains = "", Val Detailed = False) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| NameContains | --querry | String | Filter by name |
|
||||
| Detailed | --depth | Boolean | Adds a list of files to the directory fields |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Array of directory mappings
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Description";
|
||||
Response = OPI_GoogleDrive.GetDirectoriesList(Token, Name, False); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetDirectoriesList --token %token% --querry %querry% --depth %depth%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
[
|
||||
{
|
||||
"linkShareMetadata": {
|
||||
"securityUpdateEnabled": true,
|
||||
"securityUpdateEligible": false
|
||||
},
|
||||
"modifiedByMe": true,
|
||||
"quotaBytesUsed": "0",
|
||||
"viewedByMeTime": "2024-03-13T06:02:50.470Z",
|
||||
"createdTime": "2024-03-13T06:02:50.470Z",
|
||||
"permissionIds": [
|
||||
"07468399490707249352"
|
||||
],
|
||||
"modifiedByMeTime": "2024-03-13T06:02:50.470Z",
|
||||
"explicitlyTrashed": false,
|
||||
"trashed": true,
|
||||
"id": "1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4",
|
||||
"starred": false,
|
||||
"name": "MovesDescription",
|
||||
"permissions": [
|
||||
{
|
||||
"pendingOwner": false,
|
||||
"role": "owner",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"kind": "drive#permission",
|
||||
"type": "user",
|
||||
"deleted": false,
|
||||
"displayName": "Anton Titovets",
|
||||
"id": "07468399490707249352"
|
||||
}
|
||||
],
|
||||
"spaces": [
|
||||
"drive"
|
||||
],
|
||||
"webViewLink": "https://drive.google.com/drive/folders/1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4",
|
||||
"isAppAuthorized": false,
|
||||
"owners": [
|
||||
{
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
}
|
||||
],
|
||||
"version": "2",
|
||||
"lastModifyingUser": {
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"shared": false,
|
||||
"hasThumbnail": false,
|
||||
"parents": [
|
||||
"1PAFI1-rThB46uix012xmLQ01h-JARjaz"
|
||||
],
|
||||
"ownedByMe": true,
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"viewersCanCopyContent": true,
|
||||
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder",
|
||||
"viewedByMe": true,
|
||||
"writersCanShare": true,
|
||||
"folderColorRgb": "#8f8f8f",
|
||||
"copyRequiresWriterPermission": false,
|
||||
"capabilities": {
|
||||
"canRemoveContentRestriction": false,
|
||||
"canModifyOwnerContentRestriction": false,
|
||||
"canModifyLabels": false,
|
||||
"canAcceptOwnership": false,
|
||||
"canChangeSecurityUpdateEnabled": false,
|
||||
"canMoveItemWithinDrive": true,
|
||||
"canRemoveMyDriveParent": true,
|
||||
"canReadLabels": false,
|
||||
"canAddMyDriveParent": false,
|
||||
"canShare": true,
|
||||
"canModifyContent": true,
|
||||
"canUntrash": true,
|
||||
"canMoveItemOutOfDrive": false,
|
||||
"canMoveItemIntoTeamDrive": false,
|
||||
"canModifyContentRestriction": false,
|
||||
"canReadRevisions": false,
|
||||
"canTrash": true,
|
||||
"canRemoveChildren": true,
|
||||
"canListChildren": true,
|
||||
"canDownload": true,
|
||||
"canDelete": true,
|
||||
"canRename": true,
|
||||
"canChangeCopyRequiresWriterPermission": false,
|
||||
"canAddChildren": true,
|
||||
"canComment": true,
|
||||
"canModifyEditorContentRestriction": false,
|
||||
"canMoveChildrenWithinDrive": true,
|
||||
"canCopy": false,
|
||||
"canChangeViewersCanCopyContent": false,
|
||||
"canEdit": true
|
||||
},
|
||||
"modifiedTime": "2024-03-13T06:02:50.470Z",
|
||||
"thumbnailVersion": "0",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Get description file
|
||||
|
||||
|
||||
|
||||
*Function GetFileDescription() Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
|
||||
|
||||
Returns: Key-Value Pair - File description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Description = New Map;
|
||||
Description.Insert("MIME", "image/jpeg"); // MIME-type uploading file
|
||||
Description.Insert("Name", "New file.jpg"); // File name with extension
|
||||
Description.Insert("Description", "This is a new file"); // File description
|
||||
Description.Insert("Parent", "root"); // ID directory upload or "root" for upload in root
|
||||
|
||||
Return Description;
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetFileDescription
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Get description file
|
||||
|
||||
|
||||
|
||||
*Function GetFileDescription() Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
|
||||
|
||||
Returns: Key-Value Pair - File description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Description = New Map;
|
||||
Description.Insert("MIME", "image/jpeg"); // MIME-type uploading file
|
||||
Description.Insert("Name", "New file.jpg"); // File name with extension
|
||||
Description.Insert("Description", "This is a new file"); // File description
|
||||
Description.Insert("Parent", "root"); // ID directory upload or "root" for upload in root
|
||||
|
||||
Return Description;
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetFileDescription
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
@@ -1,177 +1,177 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get list of files
|
||||
Gets the list of files
|
||||
|
||||
|
||||
*Function GetFilesList(Val Token, Val NameContains = "", Val Directory = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| NameContains | --querry | String | Filter by name |
|
||||
| Directory | --catalog | String | Filter by parent directory ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Array of file mappings
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Directory = "1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4";
|
||||
Response = OPI_GoogleDrive.GetFilesList(Token,, Directory); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetFilesList --token %token% --querry %querry% --catalog "1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
[
|
||||
{
|
||||
"sha256Checksum": "1a03612de72929ef42a272cb17123871bf9b7723c89f9659765a49f744b6162b",
|
||||
"linkShareMetadata": {
|
||||
"securityUpdateEnabled": true,
|
||||
"securityUpdateEligible": false
|
||||
},
|
||||
"imageMediaMetadata": {
|
||||
"exposureBias": 0,
|
||||
"focalLength": 5.2,
|
||||
"exposureTime": 0.00125,
|
||||
"cameraMake": "SONY",
|
||||
"isoSpeed": 100,
|
||||
"time": "2012:08:03 08:21:50",
|
||||
"width": 3264,
|
||||
"cameraModel": "DSC-H7",
|
||||
"whiteBalance": "Auto",
|
||||
"colorSpace": "sRGB",
|
||||
"aperture": 5.6,
|
||||
"exposureMode": "Auto",
|
||||
"rotation": 0,
|
||||
"height": 2448,
|
||||
"meteringMode": "Pattern",
|
||||
"maxApertureValue": 2.875,
|
||||
"flashUsed": true
|
||||
},
|
||||
"modifiedByMe": true,
|
||||
"thumbnailVersion": "1",
|
||||
"fullFileExtension": "jpg",
|
||||
"quotaBytesUsed": "2114025",
|
||||
"viewedByMeTime": "2024-03-17T08:09:01.753Z",
|
||||
"permissionIds": [
|
||||
"07468399490707249352"
|
||||
],
|
||||
"modifiedByMeTime": "2024-03-17T08:05:59.327Z",
|
||||
"explicitlyTrashed": false,
|
||||
"trashed": false,
|
||||
"description": "This is a new file",
|
||||
"createdTime": "2024-03-17T08:05:59.327Z",
|
||||
"id": "1_3QPKWfAhAT0pl0QA1QSC6mRKZndwUrD",
|
||||
"starred": false,
|
||||
"spaces": [
|
||||
"drive"
|
||||
],
|
||||
"name": "New file.jpg",
|
||||
"permissions": [
|
||||
{
|
||||
"pendingOwner": false,
|
||||
"role": "owner",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"kind": "drive#permission",
|
||||
"type": "user",
|
||||
"deleted": false,
|
||||
"displayName": "Anton Titovets",
|
||||
"id": "07468399490707249352"
|
||||
}
|
||||
],
|
||||
"webContentLink": "https://drive.google.com/uc?id=1_3QPKWfAhAT0pl0QA1QSC6mRKZndwUrD&export=download",
|
||||
"isAppAuthorized": true,
|
||||
"webViewLink": "https://drive.google.com/file/d/1_3QPKWfAhAT0pl0QA1QSC6mRKZndwUrD/view?usp=drivesdk",
|
||||
"version": "4",
|
||||
"owners": [
|
||||
{
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
}
|
||||
],
|
||||
"lastModifyingUser": {
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"hasThumbnail": true,
|
||||
"shared": false,
|
||||
"ownedByMe": true,
|
||||
"parents": [
|
||||
"1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4"
|
||||
],
|
||||
"sha1Checksum": "ebdbaf8ed7fe21f6562fde438a2bb12ba49750f2",
|
||||
"viewedByMe": true,
|
||||
"headRevisionId": "0B92vrbrhqfJrN1VxL1Nib01LOVV1V3ArN3pGRytVMUNKQWs4PQ",
|
||||
"writersCanShare": true,
|
||||
"thumbnailLink": "https://lh3.googleusercontent.com/drive-storage/AJQWtBNcYDmfZOJX84IFS9WFTZXNjlIFg8qaIfYni7xr0ILGZ2rGr_-R2ixRuP9zBMHCp6bpROqLp3WtddBL1p1mwc7Zv8je0Ru2dVbDTKLryg=s220",
|
||||
"modifiedTime": "2024-03-17T08:05:59.327Z",
|
||||
"capabilities": {
|
||||
"canRemoveContentRestriction": false,
|
||||
"canModifyOwnerContentRestriction": true,
|
||||
"canModifyLabels": false,
|
||||
"canAcceptOwnership": false,
|
||||
"canChangeSecurityUpdateEnabled": false,
|
||||
"canMoveItemWithinDrive": true,
|
||||
"canRemoveMyDriveParent": true,
|
||||
"canReadLabels": false,
|
||||
"canAddMyDriveParent": false,
|
||||
"canShare": true,
|
||||
"canModifyContent": true,
|
||||
"canUntrash": true,
|
||||
"canMoveItemOutOfDrive": true,
|
||||
"canMoveItemIntoTeamDrive": true,
|
||||
"canModifyContentRestriction": true,
|
||||
"canReadRevisions": true,
|
||||
"canTrash": true,
|
||||
"canRemoveChildren": false,
|
||||
"canListChildren": false,
|
||||
"canDownload": true,
|
||||
"canDelete": true,
|
||||
"canRename": true,
|
||||
"canChangeCopyRequiresWriterPermission": true,
|
||||
"canAddChildren": false,
|
||||
"canComment": true,
|
||||
"canModifyEditorContentRestriction": true,
|
||||
"canMoveChildrenWithinDrive": false,
|
||||
"canCopy": true,
|
||||
"canChangeViewersCanCopyContent": true,
|
||||
"canEdit": true
|
||||
},
|
||||
"md5Checksum": "85b6518b95b58536480354d9d5fc3d8b",
|
||||
"copyRequiresWriterPermission": false,
|
||||
"fileExtension": "jpg",
|
||||
"originalFilename": "New file.jpg",
|
||||
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/image/jpeg",
|
||||
"viewersCanCopyContent": true,
|
||||
"mimeType": "image/jpeg",
|
||||
"kind": "drive#file",
|
||||
"size": "2114025"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get list of files
|
||||
Gets the list of files
|
||||
|
||||
|
||||
*Function GetFilesList(Val Token, Val NameContains = "", Val Directory = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| NameContains | --querry | String | Filter by name |
|
||||
| Directory | --catalog | String | Filter by parent directory ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Array of file mappings
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Directory = "1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4";
|
||||
Response = OPI_GoogleDrive.GetFilesList(Token,, Directory); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetFilesList --token %token% --querry %querry% --catalog "1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
[
|
||||
{
|
||||
"sha256Checksum": "1a03612de72929ef42a272cb17123871bf9b7723c89f9659765a49f744b6162b",
|
||||
"linkShareMetadata": {
|
||||
"securityUpdateEnabled": true,
|
||||
"securityUpdateEligible": false
|
||||
},
|
||||
"imageMediaMetadata": {
|
||||
"exposureBias": 0,
|
||||
"focalLength": 5.2,
|
||||
"exposureTime": 0.00125,
|
||||
"cameraMake": "SONY",
|
||||
"isoSpeed": 100,
|
||||
"time": "2012:08:03 08:21:50",
|
||||
"width": 3264,
|
||||
"cameraModel": "DSC-H7",
|
||||
"whiteBalance": "Auto",
|
||||
"colorSpace": "sRGB",
|
||||
"aperture": 5.6,
|
||||
"exposureMode": "Auto",
|
||||
"rotation": 0,
|
||||
"height": 2448,
|
||||
"meteringMode": "Pattern",
|
||||
"maxApertureValue": 2.875,
|
||||
"flashUsed": true
|
||||
},
|
||||
"modifiedByMe": true,
|
||||
"thumbnailVersion": "1",
|
||||
"fullFileExtension": "jpg",
|
||||
"quotaBytesUsed": "2114025",
|
||||
"viewedByMeTime": "2024-03-17T08:09:01.753Z",
|
||||
"permissionIds": [
|
||||
"07468399490707249352"
|
||||
],
|
||||
"modifiedByMeTime": "2024-03-17T08:05:59.327Z",
|
||||
"explicitlyTrashed": false,
|
||||
"trashed": false,
|
||||
"description": "This is a new file",
|
||||
"createdTime": "2024-03-17T08:05:59.327Z",
|
||||
"id": "1_3QPKWfAhAT0pl0QA1QSC6mRKZndwUrD",
|
||||
"starred": false,
|
||||
"spaces": [
|
||||
"drive"
|
||||
],
|
||||
"name": "New file.jpg",
|
||||
"permissions": [
|
||||
{
|
||||
"pendingOwner": false,
|
||||
"role": "owner",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"kind": "drive#permission",
|
||||
"type": "user",
|
||||
"deleted": false,
|
||||
"displayName": "Anton Titovets",
|
||||
"id": "07468399490707249352"
|
||||
}
|
||||
],
|
||||
"webContentLink": "https://drive.google.com/uc?id=1_3QPKWfAhAT0pl0QA1QSC6mRKZndwUrD&export=download",
|
||||
"isAppAuthorized": true,
|
||||
"webViewLink": "https://drive.google.com/file/d/1_3QPKWfAhAT0pl0QA1QSC6mRKZndwUrD/view?usp=drivesdk",
|
||||
"version": "4",
|
||||
"owners": [
|
||||
{
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
}
|
||||
],
|
||||
"lastModifyingUser": {
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"kind": "drive#user",
|
||||
"displayName": "Anton Titovets"
|
||||
},
|
||||
"hasThumbnail": true,
|
||||
"shared": false,
|
||||
"ownedByMe": true,
|
||||
"parents": [
|
||||
"1VWoLK5w0uPVSjK3oyIXeiMtINN4jDOz4"
|
||||
],
|
||||
"sha1Checksum": "ebdbaf8ed7fe21f6562fde438a2bb12ba49750f2",
|
||||
"viewedByMe": true,
|
||||
"headRevisionId": "0B92vrbrhqfJrN1VxL1Nib01LOVV1V3ArN3pGRytVMUNKQWs4PQ",
|
||||
"writersCanShare": true,
|
||||
"thumbnailLink": "https://lh3.googleusercontent.com/drive-storage/AJQWtBNcYDmfZOJX84IFS9WFTZXNjlIFg8qaIfYni7xr0ILGZ2rGr_-R2ixRuP9zBMHCp6bpROqLp3WtddBL1p1mwc7Zv8je0Ru2dVbDTKLryg=s220",
|
||||
"modifiedTime": "2024-03-17T08:05:59.327Z",
|
||||
"capabilities": {
|
||||
"canRemoveContentRestriction": false,
|
||||
"canModifyOwnerContentRestriction": true,
|
||||
"canModifyLabels": false,
|
||||
"canAcceptOwnership": false,
|
||||
"canChangeSecurityUpdateEnabled": false,
|
||||
"canMoveItemWithinDrive": true,
|
||||
"canRemoveMyDriveParent": true,
|
||||
"canReadLabels": false,
|
||||
"canAddMyDriveParent": false,
|
||||
"canShare": true,
|
||||
"canModifyContent": true,
|
||||
"canUntrash": true,
|
||||
"canMoveItemOutOfDrive": true,
|
||||
"canMoveItemIntoTeamDrive": true,
|
||||
"canModifyContentRestriction": true,
|
||||
"canReadRevisions": true,
|
||||
"canTrash": true,
|
||||
"canRemoveChildren": false,
|
||||
"canListChildren": false,
|
||||
"canDownload": true,
|
||||
"canDelete": true,
|
||||
"canRename": true,
|
||||
"canChangeCopyRequiresWriterPermission": true,
|
||||
"canAddChildren": false,
|
||||
"canComment": true,
|
||||
"canModifyEditorContentRestriction": true,
|
||||
"canMoveChildrenWithinDrive": false,
|
||||
"canCopy": true,
|
||||
"canChangeViewersCanCopyContent": true,
|
||||
"canEdit": true
|
||||
},
|
||||
"md5Checksum": "85b6518b95b58536480354d9d5fc3d8b",
|
||||
"copyRequiresWriterPermission": false,
|
||||
"fileExtension": "jpg",
|
||||
"originalFilename": "New file.jpg",
|
||||
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/image/jpeg",
|
||||
"viewersCanCopyContent": true,
|
||||
"mimeType": "image/jpeg",
|
||||
"kind": "drive#file",
|
||||
"size": "2114025"
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
@@ -1,146 +1,146 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Get object information
|
||||
Gets information about a folder or file by ID
|
||||
|
||||
|
||||
*Function GetObjectInformation(Val Token, Val Identifier) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the file or folder |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.GetObjectInformation(Token, Identifier); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetObjectInformation --token %token% --object "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"linkShareMetadata": {
|
||||
"securityUpdateEnabled": true,
|
||||
"securityUpdateEligible": false
|
||||
},
|
||||
"quotaBytesUsed": "0",
|
||||
"folderColorRgb": "#8f8f8f",
|
||||
"writersCanShare": true,
|
||||
"lastModifyingUser": {
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"displayName": "Anton Titovets",
|
||||
"kind": "drive#user"
|
||||
},
|
||||
"modifiedByMe": true,
|
||||
"capabilities": {
|
||||
"canUntrash": true,
|
||||
"canTrash": true,
|
||||
"canRemoveMyDriveParent": true,
|
||||
"canRemoveContentRestriction": false,
|
||||
"canRemoveChildren": true,
|
||||
"canMoveItemWithinDrive": true,
|
||||
"canMoveItemOutOfDrive": true,
|
||||
"canMoveItemIntoTeamDrive": true,
|
||||
"canModifyLabels": false,
|
||||
"canModifyOwnerContentRestriction": false,
|
||||
"canReadRevisions": false,
|
||||
"canModifyContentRestriction": false,
|
||||
"canShare": true,
|
||||
"canModifyContent": true,
|
||||
"canDownload": true,
|
||||
"canMoveChildrenWithinDrive": true,
|
||||
"canCopy": false,
|
||||
"canModifyEditorContentRestriction": false,
|
||||
"canChangeSecurityUpdateEnabled": false,
|
||||
"canRename": true,
|
||||
"canChangeCopyRequiresWriterPermission": false,
|
||||
"canDelete": true,
|
||||
"canChangeViewersCanCopyContent": false,
|
||||
"canEdit": true,
|
||||
"canReadLabels": false,
|
||||
"canAddMyDriveParent": false,
|
||||
"canComment": true,
|
||||
"canAddChildren": true,
|
||||
"canListChildren": true,
|
||||
"canAcceptOwnership": false
|
||||
},
|
||||
"copyRequiresWriterPermission": false,
|
||||
"modifiedTime": "2023-12-28T13:22:03.333Z",
|
||||
"createdTime": "2023-12-28T13:22:00.683Z",
|
||||
"viewedByMeTime": "2023-12-28T13:22:00.683Z",
|
||||
"viewedByMe": true,
|
||||
"shared": false,
|
||||
"hasThumbnail": false,
|
||||
"version": "3",
|
||||
"owners": [
|
||||
{
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"displayName": "Anton Titovets",
|
||||
"kind": "drive#user"
|
||||
}
|
||||
],
|
||||
"isAppAuthorized": false,
|
||||
"webViewLink": "https://drive.google.com/drive/folders/1dg_MhZrLoPSPYT0p3y-8dvGWoapbwiDm",
|
||||
"spaces": [
|
||||
"drive"
|
||||
],
|
||||
"modifiedByMeTime": "2023-12-28T13:22:03.333Z",
|
||||
"permissionIds": [
|
||||
"07468399490707249352"
|
||||
],
|
||||
"explicitlyTrashed": false,
|
||||
"parents": [
|
||||
"1603PU_Hrkvj4HeFJKYSVxZJDRoGvd3SJ"
|
||||
],
|
||||
"ownedByMe": true,
|
||||
"trashed": false,
|
||||
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder",
|
||||
"viewersCanCopyContent": true,
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"permissions": [
|
||||
{
|
||||
"pendingOwner": false,
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"role": "owner",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"type": "user",
|
||||
"deleted": false,
|
||||
"displayName": "Anton Titovets",
|
||||
"id": "07468399490707249352",
|
||||
"kind": "drive#permission"
|
||||
}
|
||||
],
|
||||
"name": "OPI",
|
||||
"starred": false,
|
||||
"id": "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa",
|
||||
"kind": "drive#file",
|
||||
"thumbnailVersion": "0"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Get object information
|
||||
Gets information about a folder or file by ID
|
||||
|
||||
|
||||
*Function GetObjectInformation(Val Token, Val Identifier) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the file or folder |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa";
|
||||
|
||||
Response = OPI_GoogleDrive.GetObjectInformation(Token, Identifier); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive GetObjectInformation --token %token% --object "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"linkShareMetadata": {
|
||||
"securityUpdateEnabled": true,
|
||||
"securityUpdateEligible": false
|
||||
},
|
||||
"quotaBytesUsed": "0",
|
||||
"folderColorRgb": "#8f8f8f",
|
||||
"writersCanShare": true,
|
||||
"lastModifyingUser": {
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"displayName": "Anton Titovets",
|
||||
"kind": "drive#user"
|
||||
},
|
||||
"modifiedByMe": true,
|
||||
"capabilities": {
|
||||
"canUntrash": true,
|
||||
"canTrash": true,
|
||||
"canRemoveMyDriveParent": true,
|
||||
"canRemoveContentRestriction": false,
|
||||
"canRemoveChildren": true,
|
||||
"canMoveItemWithinDrive": true,
|
||||
"canMoveItemOutOfDrive": true,
|
||||
"canMoveItemIntoTeamDrive": true,
|
||||
"canModifyLabels": false,
|
||||
"canModifyOwnerContentRestriction": false,
|
||||
"canReadRevisions": false,
|
||||
"canModifyContentRestriction": false,
|
||||
"canShare": true,
|
||||
"canModifyContent": true,
|
||||
"canDownload": true,
|
||||
"canMoveChildrenWithinDrive": true,
|
||||
"canCopy": false,
|
||||
"canModifyEditorContentRestriction": false,
|
||||
"canChangeSecurityUpdateEnabled": false,
|
||||
"canRename": true,
|
||||
"canChangeCopyRequiresWriterPermission": false,
|
||||
"canDelete": true,
|
||||
"canChangeViewersCanCopyContent": false,
|
||||
"canEdit": true,
|
||||
"canReadLabels": false,
|
||||
"canAddMyDriveParent": false,
|
||||
"canComment": true,
|
||||
"canAddChildren": true,
|
||||
"canListChildren": true,
|
||||
"canAcceptOwnership": false
|
||||
},
|
||||
"copyRequiresWriterPermission": false,
|
||||
"modifiedTime": "2023-12-28T13:22:03.333Z",
|
||||
"createdTime": "2023-12-28T13:22:00.683Z",
|
||||
"viewedByMeTime": "2023-12-28T13:22:00.683Z",
|
||||
"viewedByMe": true,
|
||||
"shared": false,
|
||||
"hasThumbnail": false,
|
||||
"version": "3",
|
||||
"owners": [
|
||||
{
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"permissionId": "07468399490707249352",
|
||||
"me": true,
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"displayName": "Anton Titovets",
|
||||
"kind": "drive#user"
|
||||
}
|
||||
],
|
||||
"isAppAuthorized": false,
|
||||
"webViewLink": "https://drive.google.com/drive/folders/1dg_MhZrLoPSPYT0p3y-8dvGWoapbwiDm",
|
||||
"spaces": [
|
||||
"drive"
|
||||
],
|
||||
"modifiedByMeTime": "2023-12-28T13:22:03.333Z",
|
||||
"permissionIds": [
|
||||
"07468399490707249352"
|
||||
],
|
||||
"explicitlyTrashed": false,
|
||||
"parents": [
|
||||
"1603PU_Hrkvj4HeFJKYSVxZJDRoGvd3SJ"
|
||||
],
|
||||
"ownedByMe": true,
|
||||
"trashed": false,
|
||||
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder",
|
||||
"viewersCanCopyContent": true,
|
||||
"mimeType": "application/vnd.google-apps.folder",
|
||||
"permissions": [
|
||||
{
|
||||
"pendingOwner": false,
|
||||
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocLx8JGurt0UjXFwwTiB6ZoDPWslW1EnfCTahrwrIllM6Q=s64",
|
||||
"role": "owner",
|
||||
"emailAddress": "bayselonarrend@gmail.com",
|
||||
"type": "user",
|
||||
"deleted": false,
|
||||
"displayName": "Anton Titovets",
|
||||
"id": "07468399490707249352",
|
||||
"kind": "drive#permission"
|
||||
}
|
||||
],
|
||||
"name": "OPI",
|
||||
"starred": false,
|
||||
"id": "1dg_MwwwPSPYT0p3y-8dvGWoapbwaaaaa",
|
||||
"kind": "drive#file",
|
||||
"thumbnailVersion": "0"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Update file
|
||||
Updates file binary data
|
||||
|
||||
|
||||
*Function UpdateFile(Val Token, Val Identifier, Val File, Val NewName = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the object to update |
|
||||
| File | --file | BinaryData,String | File source for update |
|
||||
| NewName | --title | String | New file name (if necessary) |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
NewName = "Updated file.jpeg";
|
||||
ReplacementImage = "C:\OPI\image2.jpg";
|
||||
Identifier = "1V0oaZh3qQZ7-wbARC8-vrErAFllsBGSJ";
|
||||
|
||||
Response = OPI_GoogleDrive.UpdateFile(Token, Identifier, ReplacementImage, NewName) //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive UpdateFile --token %token% --object "1V0oaZh3qQZ7-wbARC8-vrErAFllsBGSJ" --file %file% --title "Updated file.jpeg"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "image/jpeg",
|
||||
"name": "UpdatedFile.jpg",
|
||||
"id": "1V0oaZh3qQZ7-wbARC8-vrErAFllsBGSJ",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Update file
|
||||
Updates file binary data
|
||||
|
||||
|
||||
*Function UpdateFile(Val Token, Val Identifier, Val File, Val NewName = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --object | String | Identifier of the object to update |
|
||||
| File | --file | BinaryData,String | File source for update |
|
||||
| NewName | --title | String | New file name (if necessary) |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
NewName = "Updated file.jpeg";
|
||||
ReplacementImage = "C:\OPI\image2.jpg";
|
||||
Identifier = "1V0oaZh3qQZ7-wbARC8-vrErAFllsBGSJ";
|
||||
|
||||
Response = OPI_GoogleDrive.UpdateFile(Token, Identifier, ReplacementImage, NewName) //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive UpdateFile --token %token% --object "1V0oaZh3qQZ7-wbARC8-vrErAFllsBGSJ" --file %file% --title "Updated file.jpeg"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "image/jpeg",
|
||||
"name": "UpdatedFile.jpg",
|
||||
"id": "1V0oaZh3qQZ7-wbARC8-vrErAFllsBGSJ",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Upload file
|
||||
Uploads a file to the drive
|
||||
|
||||
|
||||
*Function UploadFile(Val Token, Val File, Val Description) ExportReturn FileManagement(Token, File, Description);EndFunction*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| File | --file | BinaryData,String | File to be uploaded |
|
||||
| Description | --props | Key-Value Pair | JSON description or path to .json |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Description = New Map;
|
||||
Description.Insert("MIME", "image/jpeg");
|
||||
Description.Insert("Name", "New file.jpg");
|
||||
Description.Insert("Description", "This is a new file");
|
||||
Description.Insert("Parent", "root");
|
||||
|
||||
Image = "C:\OPI\image.jpg";
|
||||
|
||||
Response = OPI_GoogleDrive.UploadFile(Token, Image, Description); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive UploadFile --token %token% --file %file% --props %props%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "image/jpeg",
|
||||
"name": "New file.jpg",
|
||||
"id": "16hPGNTMmbnXhz_g0vjGbrLP19h56RwIg",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Upload file
|
||||
Uploads a file to the drive
|
||||
|
||||
|
||||
*Function UploadFile(Val Token, Val File, Val Description) ExportReturn FileManagement(Token, File, Description);EndFunction*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| File | --file | BinaryData,String | File to be uploaded |
|
||||
| Description | --props | Key-Value Pair | JSON description or path to .json |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Description = New Map;
|
||||
Description.Insert("MIME", "image/jpeg");
|
||||
Description.Insert("Name", "New file.jpg");
|
||||
Description.Insert("Description", "This is a new file");
|
||||
Description.Insert("Parent", "root");
|
||||
|
||||
Image = "C:\OPI\image.jpg";
|
||||
|
||||
Response = OPI_GoogleDrive.UploadFile(Token, Image, Description); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //String
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gdrive UploadFile --token %token% --file %file% --props %props%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"mimeType": "image/jpeg",
|
||||
"name": "New file.jpg",
|
||||
"id": "16hPGNTMmbnXhz_g0vjGbrLP19h56RwIg",
|
||||
"kind": "drive#file"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "File and directory management",
|
||||
"position": "2"
|
||||
}
|
||||
{
|
||||
"label": "File and directory management",
|
||||
"position": "2"
|
||||
}
|
||||
|
||||
@@ -1,98 +1,98 @@
|
||||
---
|
||||
id: GoogleDrive
|
||||
sidebar_class_name: GoogleDrive
|
||||
---
|
||||
|
||||
<img src={require('../../static/img/APIs/GoogleDrive.png').default} width='64px' />
|
||||
|
||||
# Google Drive
|
||||
|
||||
Этот раздел поwithinящен библиотеtoе for work with API Google Drive. Nа данной withтранице опиwithаны inwithе дейwithтinия, необходимые for полноценного of start work
|
||||
|
||||
:::important
|
||||
If inы уже иwithпользуете OPI for work with другими withерinиwithами Google Workspase и inыполняли withтартоinую towithтройtoу, то пунtoты **Создание проеtoта** и **Nаwithтройtoа OAuth** можно пропуwithтить. Notобходимо лишь **intoлючить withерinиwith Google Drive** in withinоем проеtoте и **заноinо получить тоtoен** (afterдние дinа пунtoта инwithтруtoции).
|
||||
:::
|
||||
|
||||
## Getting started
|
||||
|
||||
<hr/>
|
||||
|
||||
### Создание проеtoта
|
||||
|
||||
1. Перейдите to [main page Google Cloud](https://console.cloud.google.com) и withоздайте проеtoт
|
||||
|
||||

|
||||
|
||||
2. Inыберите withозданный проеtoт и in боtoоinом меню перейдите APIs and Services -> OAuth consent screen
|
||||
|
||||

|
||||
|
||||
3. Inыберите пунtoт External
|
||||
|
||||

|
||||
|
||||
4. Заполните fields App name, User support email и Email addresses (inwithе fields withо зinездочtoами)
|
||||
|
||||

|
||||
|
||||
5. Nажимайте далее и Save and continue to afterдней intoладtoе
|
||||
|
||||

|
||||
|
||||
6. Nажмите Publish App
|
||||
|
||||

|
||||
|
||||
<hr/>
|
||||
|
||||
### Nаwithтройtoа OAuth
|
||||
|
||||
1. In боtoоinом меню inыберите пунtoт Credentials -> Create Credentials -> OAuth client ID
|
||||
|
||||

|
||||
|
||||
2. Ininедите имя и inыберите Application type - Desktop app
|
||||
|
||||

|
||||
|
||||
3. Сохраните ClientID и Client Secret
|
||||
|
||||

|
||||
|
||||
<hr/>
|
||||
|
||||
### Intoлючение withерinиwithа Google Drive
|
||||
|
||||
1. Перейдите to [page Drive in Marketplace](https://console.cloud.google.com/marketplace/product/google/drive.googleapis.com)
|
||||
|
||||
2. Nажмите Enable
|
||||
|
||||

|
||||
|
||||
<hr/>
|
||||
|
||||
### Toлучение Tokenа
|
||||
|
||||
1. Передайте ClientID in фунtoцию OPI_GoogleWorkspace.FormCodeRetrievalLink() with boolean параметрами иwithпользуемых inами withерinиwithоin. Resultом фунtoции will URL, toоторый необходимо отtoрыть in браузере. Authorfromуйтеwithь при помощи withinоего аtotoаунта Google
|
||||
|
||||

|
||||
|
||||
2. Сtoопируйте toод from URL after аinторfromации
|
||||
|
||||

|
||||
|
||||
3. Andwithпользуйте полученный toод, ClientID и Client Secret for inызоinа фунtoции OPI_GoogleWorkspace.GetTokenByCode(ClientID, ClientSecret, Code)
|
||||
|
||||
```json title="Result фунtoции GetTokenByCode(), еwithли переinеwithти его in JSON"
|
||||
|
||||
{
|
||||
"token_type": "Bearer",
|
||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
||||
"scope": "https://www.googleapis.com/auth/...",
|
||||
"expires_in": 3599,
|
||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
4. Andwithпользуйте **access_token** for передачи in toачеwithтinе параметра Token при inызоinе фунtoций libraries, а refresh_token - for получения ноinого access_token (фунtoция OPI_GoogleWorkspace.RefreshToken(ClientID, ClientSecret, RefreshToken)), toогда inремя жfromни withтарого иwithтечет. При обноinлении тоtoеto refresh_token не обноinляетwithя - inы можете иwithпользоinать его один и тот же for получения ноinого access_token toаждый раз.
|
||||
---
|
||||
id: GoogleDrive
|
||||
sidebar_class_name: GoogleDrive
|
||||
---
|
||||
|
||||
<img src={require('../../static/img/APIs/GoogleDrive.png').default} width='64px' />
|
||||
|
||||
# Google Drive
|
||||
|
||||
Этот раздел поwithinящен библиотеtoе for work with API Google Drive. Nа данной withтранице опиwithаны inwithе дейwithтinия, необходимые for полноценного of start work
|
||||
|
||||
:::important
|
||||
If inы уже иwithпользуете OPI for work with другими withерinиwithами Google Workspase и inыполняли withтартоinую towithтройtoу, то пунtoты **Создание проеtoта** и **Nаwithтройtoа OAuth** можно пропуwithтить. Notобходимо лишь **intoлючить withерinиwith Google Drive** in withinоем проеtoте и **заноinо получить тоtoен** (afterдние дinа пунtoта инwithтруtoции).
|
||||
:::
|
||||
|
||||
## Getting started
|
||||
|
||||
<hr/>
|
||||
|
||||
### Создание проеtoта
|
||||
|
||||
1. Перейдите to [main page Google Cloud](https://console.cloud.google.com) и withоздайте проеtoт
|
||||
|
||||

|
||||
|
||||
2. Inыберите withозданный проеtoт и in боtoоinом меню перейдите APIs and Services -> OAuth consent screen
|
||||
|
||||

|
||||
|
||||
3. Inыберите пунtoт External
|
||||
|
||||

|
||||
|
||||
4. Заполните fields App name, User support email и Email addresses (inwithе fields withо зinездочtoами)
|
||||
|
||||

|
||||
|
||||
5. Nажимайте далее и Save and continue to afterдней intoладtoе
|
||||
|
||||

|
||||
|
||||
6. Nажмите Publish App
|
||||
|
||||

|
||||
|
||||
<hr/>
|
||||
|
||||
### Nаwithтройtoа OAuth
|
||||
|
||||
1. In боtoоinом меню inыберите пунtoт Credentials -> Create Credentials -> OAuth client ID
|
||||
|
||||

|
||||
|
||||
2. Ininедите имя и inыберите Application type - Desktop app
|
||||
|
||||

|
||||
|
||||
3. Сохраните ClientID и Client Secret
|
||||
|
||||

|
||||
|
||||
<hr/>
|
||||
|
||||
### Intoлючение withерinиwithа Google Drive
|
||||
|
||||
1. Перейдите to [page Drive in Marketplace](https://console.cloud.google.com/marketplace/product/google/drive.googleapis.com)
|
||||
|
||||
2. Nажмите Enable
|
||||
|
||||

|
||||
|
||||
<hr/>
|
||||
|
||||
### Toлучение Tokenа
|
||||
|
||||
1. Передайте ClientID in фунtoцию OPI_GoogleWorkspace.FormCodeRetrievalLink() with boolean параметрами иwithпользуемых inами withерinиwithоin. Resultом фунtoции will URL, toоторый необходимо отtoрыть in браузере. Authorfromуйтеwithь при помощи withinоего аtotoаунта Google
|
||||
|
||||

|
||||
|
||||
2. Сtoопируйте toод from URL after аinторfromации
|
||||
|
||||

|
||||
|
||||
3. Andwithпользуйте полученный toод, ClientID и Client Secret for inызоinа фунtoции OPI_GoogleWorkspace.GetTokenByCode(ClientID, ClientSecret, Code)
|
||||
|
||||
```json title="Result фунtoции GetTokenByCode(), еwithли переinеwithти его in JSON"
|
||||
|
||||
{
|
||||
"token_type": "Bearer",
|
||||
"refresh_token": "1//09au6OES3JN9oCgYIARAAGAkSNwF-L9Ir1B7uawfwafT1wE0FKO519Xj6JxawfawfyjMyJ_QlUZYLHZqw",
|
||||
"scope": "https://www.googleapis.com/auth/...",
|
||||
"expires_in": 3599,
|
||||
"access_token": "ya29.a0AfB_byA344tXkIawdawdwadadhyZQV8bSZn_snNXtY2HLb7l71awdawdawdad-ASgpzyOSWIvEmPruhUa_1yCCq6jvoD0r_q-fNEsARrH8zpJ3c6LNGWvwdg8CXsSxYaCgYKAWkSawfwafawfrCK0EP5kZY_A0171"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
4. Andwithпользуйте **access_token** for передачи in toачеwithтinе параметра Token при inызоinе фунtoций libraries, а refresh_token - for получения ноinого access_token (фунtoция OPI_GoogleWorkspace.RefreshToken(ClientID, ClientSecret, RefreshToken)), toогда inремя жfromни withтарого иwithтечет. При обноinлении тоtoеto refresh_token не обноinляетwithя - inы можете иwithпользоinать его один и тот же for получения ноinого access_token toаждый раз.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
{
|
||||
"label": "Google Drive",
|
||||
"position": 8,
|
||||
"link": {
|
||||
"type": "doc",
|
||||
"id": "GoogleDrive"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
"label": "Google Drive",
|
||||
"position": 8,
|
||||
"link": {
|
||||
"type": "doc",
|
||||
"id": "GoogleDrive"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user