mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-25 02:42:28 +02:00
Удаление лишней en документации
This commit is contained in:
parent
35e39aecaa
commit
4254e687f4
@ -1,86 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Create base
|
||||
Creates a new database
|
||||
|
||||
|
||||
*Function CreateDatabase(Val Token, Val Workspace, Val Name, Val TableCollection) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Workspace | --ws | String | Workspace identifier |
|
||||
| Name | --title | String | New base name |
|
||||
| TableCollection | --tablesdata | Map Of KeyAndValue | Table description: Key > name, Value > array of fields |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Workspace = "wspdf8yl1yZz3PmWZ";
|
||||
Name = "TestDatabase";
|
||||
|
||||
FieldArray = New Array;
|
||||
FieldArray.Add(OPI_Airtable.GetNumberField("Number"));
|
||||
FieldArray.Add(OPI_Airtable.GetStringField("String"));
|
||||
|
||||
TableName = "TestTable";
|
||||
|
||||
TableCollection = New Map;
|
||||
TableCollection.Insert(TableName, FieldArray);
|
||||
|
||||
Response = OPI_Airtable.CreateDatabase(Token, Workspace, Name, TableCollection); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable CreateDatabase --token %token% --ws "wspdf8yl1yZz3PmWZ" --title "TestDatabase" --tablesdata %tablesdata%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"id": "applEsyJmBRm12AuN",
|
||||
"tables": [
|
||||
{
|
||||
"id": "tblqZzW78Rvsdt9gt",
|
||||
"name": "TestTable",
|
||||
"primaryFieldId": "fldj9Z3fEpLzv40d0",
|
||||
"fields": [
|
||||
{
|
||||
"type": "number",
|
||||
"options": {
|
||||
"precision": 0
|
||||
},
|
||||
"id": "fldj9Z3fEpLzv40d0",
|
||||
"name": "Number"
|
||||
},
|
||||
{
|
||||
"type": "richText",
|
||||
"id": "fldX1kR7lienmcdEj",
|
||||
"name": "String"
|
||||
}
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"id": "viwbKE3PS9jl6bqJl",
|
||||
"name": "Grid view",
|
||||
"type": "grid"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,73 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get base tables
|
||||
Gets the schema of base tables
|
||||
|
||||
|
||||
*Function GetDatabaseTables(Val Token, Val Base) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Base | --base | String | Base identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Base = "apptm8Xqo7TwMaipQ";
|
||||
|
||||
Response = OPI_Airtable.GetDatabaseTables(Token, Base); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetDatabaseTables --token %token% --base "apptm8Xqo7TwMaipQ"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"tables": [
|
||||
{
|
||||
"id": "tblqZzW78Rvsdt9gt",
|
||||
"name": "TestTable",
|
||||
"primaryFieldId": "fldj9Z3fEpLzv40d0",
|
||||
"fields": [
|
||||
{
|
||||
"type": "number",
|
||||
"options": {
|
||||
"precision": 0
|
||||
},
|
||||
"id": "fldj9Z3fEpLzv40d0",
|
||||
"name": "Number"
|
||||
},
|
||||
{
|
||||
"type": "richText",
|
||||
"id": "fldX1kR7lienmcdEj",
|
||||
"name": "String"
|
||||
}
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"id": "viwbKE3PS9jl6bqJl",
|
||||
"name": "Grid view",
|
||||
"type": "grid"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,90 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Get list of bases
|
||||
Gets the list of available bases
|
||||
|
||||
|
||||
*Function GetListOfBases(Val Token, Val Indent = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Indent | --offset | String | Next page identifier of the base list from the previous request |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
|
||||
Response = OPI_Airtable.GetListOfBases(Token); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetListOfBases --token %token% --offset %offset%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"bases": [
|
||||
{
|
||||
"id": "appGarzKZ0lu3gzoa",
|
||||
"name": "Test",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "app9WRfJirwn3yXuG",
|
||||
"name": "Product catalog",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "app6gigUYTzlDEq4X",
|
||||
"name": "TestDatabase",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "app5hJGyK8asYYe1Q",
|
||||
"name": "TestDatabase",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "appRQ6VxxOZb40Uwi",
|
||||
"name": "TestDatabase",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "appM6FaGofV2XSfFA",
|
||||
"name": "TestDatabase",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "apptm8Xqo7TwMaipQ",
|
||||
"name": "TestDatabase",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "appsyQyGrF8aVN2Wm",
|
||||
"name": "TestDatabase",
|
||||
"permissionLevel": "create"
|
||||
},
|
||||
{
|
||||
"id": "applEsyJmBRm12AuN",
|
||||
"name": "TestDatabase",
|
||||
"permissionLevel": "create"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Working with databases",
|
||||
"position": "2"
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create field
|
||||
Creates a new field in the table
|
||||
|
||||
|
||||
*Function CreateField(Val Token, Val Base, Val Table, Val FieldStructure) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Base | --base | String | Base identifier |
|
||||
| Table | --table | String | Table identifier |
|
||||
| FieldStructure | --fielddata | Structure of Key-Value | Description of the new field |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Base = "apptm8Xqo7TwMaipQ";
|
||||
Table = "tbl9G4jVoTJpxYwSY";
|
||||
Name = String(New UUID);
|
||||
Field = OPI_Airtable.GetNumberField(Name);
|
||||
|
||||
Response = OPI_Airtable.CreateField(Token, Base, Table, FieldStructure); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable CreateField --token %token% --base "apptm8Xqo7TwMaipQ" --table "tbl9G4jVoTJpxYwSY" --fielddata %fielddata%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"type": "number",
|
||||
"options": {
|
||||
"precision": 0
|
||||
},
|
||||
"id": "fld3IbFtHZtBHQwsk",
|
||||
"name": "9c0d2a82-7bf9-40b7-8052-ae3ebadc72d5"
|
||||
}
|
||||
|
||||
```
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Get field (file)
|
||||
Gets the description of a file field
|
||||
|
||||
|
||||
*Function GetAttachmentField(Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | Field name |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Attachment";
|
||||
|
||||
Response = OPI_Airtable.GetAttachmentField(Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetAttachmentField --title "Attachment"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "Attachment",
|
||||
"type": "multipleAttachments"
|
||||
}
|
||||
|
||||
```
|
@ -1,49 +0,0 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Get field (checkbox)
|
||||
Gets the description of a boolean field
|
||||
|
||||
|
||||
*Function GetCheckboxField(Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | Field name |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Checkbox";
|
||||
|
||||
Response = OPI_Airtable.GetCheckboxField(Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetCheckboxField --title "Checkbox"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "Checkbox",
|
||||
"type": "checkbox",
|
||||
"options": {
|
||||
"icon": "check",
|
||||
"color": "yellowBright"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,51 +0,0 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Get field (date)
|
||||
Gets the description of a date field
|
||||
|
||||
|
||||
*Function GetDateField(Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | Field name |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Date";
|
||||
|
||||
Response = OPI_Airtable.GetDateField(Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetDateField --title "Date"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "Date",
|
||||
"type": "date",
|
||||
"options": {
|
||||
"dateFormat": {
|
||||
"format": "YYYY-MM-DD",
|
||||
"name": "iso"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Get field (email)
|
||||
Gets the description of an email field
|
||||
|
||||
|
||||
*Function GetEmailField(Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | Field name |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Email";
|
||||
|
||||
Response = OPI_Airtable.GetEmailField(Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetEmailField --title "Email"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "Email",
|
||||
"type": "email"
|
||||
}
|
||||
|
||||
```
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Get field (url)
|
||||
Gets the description of a URL field
|
||||
|
||||
|
||||
*Function GetLinkField(Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | Field name |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Link";
|
||||
|
||||
Response = OPI_Airtable.GetLinkField(Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetLinkField --title "Link"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "Link",
|
||||
"type": "url"
|
||||
}
|
||||
|
||||
```
|
@ -1,50 +0,0 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Get field (numeric)
|
||||
Gets the description of a numeric field
|
||||
|
||||
|
||||
*Function GetNumberField(Val Name, Val Precision = 0) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | New field name |
|
||||
| Precision | --precision | Number, String | Number of decimal places |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Number";
|
||||
Precision = "0";
|
||||
|
||||
Response = OPI_Airtable.GetNumberField(Name, Precision); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetNumberField --title "Number" --precision "0"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "Number",
|
||||
"type": "number",
|
||||
"options": {
|
||||
"precision": 0
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Get field (phone)
|
||||
Gets the description of a phone number field
|
||||
|
||||
|
||||
*Function GetPhoneField(Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | Field name |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "Phone";
|
||||
|
||||
Response = OPI_Airtable.GetPhoneField(Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetPhoneField --title "Phone"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "Phone",
|
||||
"type": "phoneNumber"
|
||||
}
|
||||
|
||||
```
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get field (string)
|
||||
Gets the description of a string field
|
||||
|
||||
|
||||
*Function GetStringField(Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Name | --title | String | New field name |
|
||||
|
||||
|
||||
Returns: Structure - Field description
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Name = "String";
|
||||
|
||||
Response = OPI_Airtable.GetStringField(Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable GetStringField --title "String"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"name": "String",
|
||||
"type": "richText"
|
||||
}
|
||||
|
||||
```
|
@ -1,59 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Modify field
|
||||
Changes the name and/or description of an existing table field
|
||||
|
||||
|
||||
*Function ModifyField(Val Token, Val Base, Val Table, Val Field, Val Name = "", Val Description = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Base | --base | String | Base identifier Base |
|
||||
| Table | --table | String | Table identifier |
|
||||
| Field | --field | String | Field identifier |
|
||||
| Name | --title | String | New name |
|
||||
| Description | --description | String | New description |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Airtable
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Base = "apptm8Xqo7TwMaipQ";
|
||||
Table = "tbl9G4jVoTJpxYwSY";
|
||||
Field = "fld3IbFtHZtBHQwsk";
|
||||
Name = String(New UUID) + "(change.)";
|
||||
Description = "New description";
|
||||
|
||||
Response = OPI_Airtable.ModifyField(Token, Base, Table, Field, Name, Description); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint airtable ModifyField --token %token% --base "apptm8Xqo7TwMaipQ" --table "tbl9G4jVoTJpxYwSY" --field "fld3IbFtHZtBHQwsk" --title %title% --description "New description"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"type": "number",
|
||||
"options": {
|
||||
"precision": 0
|
||||
},
|
||||
"id": "fld3IbFtHZtBHQwsk",
|
||||
"name": "9c0d2a82-7bf9-40b7-8052-ae3ebadc72d5(change.)",
|
||||
"description": "New description"
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Working with fields",
|
||||
"position": "4"
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Add tag
|
||||
Adds a new text tag to a file or directory
|
||||
|
||||
|
||||
*Function AddTag(Val Token, Val Path, Val Tag) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Path | --path | String | Path to the object for which the tag needs to be created |
|
||||
| Tag | --tag | String | Tag text |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
Tag = "Important";
|
||||
Token = "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L...";
|
||||
Path = "/New/mydoc.docx";
|
||||
|
||||
Result = OPI_Dropbox.AddTag(Token, Path, Tag);
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint dropbox AddTag --token "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L..." --path %path% --tag %tag%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{}
|
||||
|
||||
```
|
@ -1,43 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Delete tag
|
||||
Deletes the text tag of a file or directory
|
||||
|
||||
|
||||
*Function DeleteTag(Val Token, Val Path, Val Tag) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Path | --path | String | Path to the object whose tag needs to be deleted |
|
||||
| Tag | --tag | String | Tag text |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
Tag = "Important";
|
||||
Token = "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L...";
|
||||
Path = "/New/mydoc.docx";
|
||||
|
||||
Result = OPI_Dropbox.DeleteTag(Token, Path, Tag);
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint dropbox DeleteTag --token "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L..." --path %path% --tag %tag%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{}
|
||||
|
||||
```
|
@ -1,53 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Get list of tags
|
||||
Gets the list of tags of the selected files
|
||||
|
||||
|
||||
*Function GetTagList(Val Token, Val Paths) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Paths | --paths | String, Array of String | Path or set of paths to the files |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint dropbox GetTagList --token %token% --paths %paths%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"paths_to_tags": [
|
||||
{
|
||||
"path": "/New/Dogs.mp3",
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"path": "/New/mydoc.docx",
|
||||
"tags": [
|
||||
{
|
||||
".tag": "user_generated_tag",
|
||||
"tag_text": "important"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Tags managment",
|
||||
"position": "4"
|
||||
}
|
@ -1,208 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create spreadsheet
|
||||
Creates a new spreadsheet
|
||||
|
||||
|
||||
*Function CreateSpreadsheet(Val Token, Val Name, Val ArrayOfSheetNames) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Name | --title | String | Name |
|
||||
| ArrayOfSheetNames | --sheets | Array of String | Array of names to add new sheets to the spreadsheet |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
ArrayOfSheetNames = New Array;
|
||||
ArrayOfSheetNames.Add("Sheet1");
|
||||
ArrayOfSheetNames.Add("Sheet2");
|
||||
|
||||
Name = "TestTable";
|
||||
|
||||
Response = OPI_GoogleSheets.CreateSpreadsheet(Token, Name, ArrayOfSheetNames); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets CreateSpreadsheet --token %token% --title "TestTable" --sheets %sheets%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"properties": {
|
||||
"title": "TestTable",
|
||||
"locale": "ru_RU",
|
||||
"autoRecalc": "ON_CHANGE",
|
||||
"timeZone": "Etc/GMT",
|
||||
"defaultFormat": {
|
||||
"backgroundColor": {
|
||||
"red": 1,
|
||||
"green": 1,
|
||||
"blue": 1
|
||||
},
|
||||
"padding": {
|
||||
"top": 2,
|
||||
"right": 3,
|
||||
"bottom": 2,
|
||||
"left": 3
|
||||
},
|
||||
"verticalAlignment": "BOTTOM",
|
||||
"wrapStrategy": "OVERFLOW_CELL",
|
||||
"textFormat": {
|
||||
"foregroundColor": {},
|
||||
"fontFamily": "arial,sans,sans-serif",
|
||||
"fontSize": 10,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"foregroundColorStyle": {
|
||||
"rgbColor": {}
|
||||
}
|
||||
},
|
||||
"backgroundColorStyle": {
|
||||
"rgbColor": {
|
||||
"red": 1,
|
||||
"green": 1,
|
||||
"blue": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"spreadsheetTheme": {
|
||||
"primaryFontFamily": "Arial",
|
||||
"themeColors": [
|
||||
{
|
||||
"colorType": "TEXT",
|
||||
"color": {
|
||||
"rgbColor": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "BACKGROUND",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 1,
|
||||
"green": 1,
|
||||
"blue": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT1",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.25882354,
|
||||
"green": 0.52156866,
|
||||
"blue": 0.95686275
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT2",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.91764706,
|
||||
"green": 0.2627451,
|
||||
"blue": 0.20784314
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT3",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.9843137,
|
||||
"green": 0.7372549,
|
||||
"blue": 0.015686275
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT4",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.20392157,
|
||||
"green": 0.65882355,
|
||||
"blue": 0.3254902
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT5",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 1,
|
||||
"green": 0.42745098,
|
||||
"blue": 0.003921569
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT6",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.27450982,
|
||||
"green": 0.7411765,
|
||||
"blue": 0.7764706
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "LINK",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.06666667,
|
||||
"green": 0.33333334,
|
||||
"blue": 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sheets": [
|
||||
{
|
||||
"properties": {
|
||||
"sheetId": 1999766427,
|
||||
"title": "Sheet1",
|
||||
"index": 0,
|
||||
"sheetType": "GRID",
|
||||
"gridProperties": {
|
||||
"rowCount": 1000,
|
||||
"columnCount": 26
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"sheetId": 225184494,
|
||||
"title": "Sheet2",
|
||||
"index": 1,
|
||||
"sheetType": "GRID",
|
||||
"gridProperties": {
|
||||
"rowCount": 1000,
|
||||
"columnCount": 26
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"spreadsheetUrl": "https://docs.google.com/spreadsheets/d/1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc/edit"
|
||||
}
|
||||
|
||||
```
|
@ -1,50 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Change spreadsheet name
|
||||
Changes the name of the existing spreadsheet
|
||||
|
||||
|
||||
*Function EditSpreadsheetTitle(Val Token, Val Spreadsheet, Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Spreadsheet | --spreadsheet | String | SpreadsheetID |
|
||||
| Name | --title | String | New name |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Spreadsheet = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
Name = "Test table (change.)";
|
||||
|
||||
Response = OPI_GoogleSheets.EditSpreadsheetTitle(Token, Spreadsheet, Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets EditSpreadsheetTitle --token %token% --spreadsheet "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --title "Test table (change.)"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"replies": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,203 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get spreadsheet
|
||||
Gets information about the spreadsheet by ID
|
||||
|
||||
|
||||
*Function GetSpreadsheet(Val Token, Val Identifier) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Identifier | --spreadsheet | String | Spreadsheet identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Identifier = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
|
||||
Response = OPI_GoogleSheets.GetSpreadsheet(Token, Identifier); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets GetSpreadsheet --token %token% --spreadsheet "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"properties": {
|
||||
"title": "Test table (change.)",
|
||||
"locale": "ru_RU",
|
||||
"autoRecalc": "ON_CHANGE",
|
||||
"timeZone": "Etc/GMT",
|
||||
"defaultFormat": {
|
||||
"backgroundColor": {
|
||||
"red": 1,
|
||||
"green": 1,
|
||||
"blue": 1
|
||||
},
|
||||
"padding": {
|
||||
"top": 2,
|
||||
"right": 3,
|
||||
"bottom": 2,
|
||||
"left": 3
|
||||
},
|
||||
"verticalAlignment": "BOTTOM",
|
||||
"wrapStrategy": "OVERFLOW_CELL",
|
||||
"textFormat": {
|
||||
"foregroundColor": {},
|
||||
"fontFamily": "arial,sans,sans-serif",
|
||||
"fontSize": 10,
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"foregroundColorStyle": {
|
||||
"rgbColor": {}
|
||||
}
|
||||
},
|
||||
"backgroundColorStyle": {
|
||||
"rgbColor": {
|
||||
"red": 1,
|
||||
"green": 1,
|
||||
"blue": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"spreadsheetTheme": {
|
||||
"primaryFontFamily": "Arial",
|
||||
"themeColors": [
|
||||
{
|
||||
"colorType": "TEXT",
|
||||
"color": {
|
||||
"rgbColor": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "BACKGROUND",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 1,
|
||||
"green": 1,
|
||||
"blue": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT1",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.25882354,
|
||||
"green": 0.52156866,
|
||||
"blue": 0.95686275
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT2",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.91764706,
|
||||
"green": 0.2627451,
|
||||
"blue": 0.20784314
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT3",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.9843137,
|
||||
"green": 0.7372549,
|
||||
"blue": 0.015686275
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT4",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.20392157,
|
||||
"green": 0.65882355,
|
||||
"blue": 0.3254902
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT5",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 1,
|
||||
"green": 0.42745098,
|
||||
"blue": 0.003921569
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "ACCENT6",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.27450982,
|
||||
"green": 0.7411765,
|
||||
"blue": 0.7764706
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"colorType": "LINK",
|
||||
"color": {
|
||||
"rgbColor": {
|
||||
"red": 0.06666667,
|
||||
"green": 0.33333334,
|
||||
"blue": 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sheets": [
|
||||
{
|
||||
"properties": {
|
||||
"sheetId": 1999766427,
|
||||
"title": "Sheet1",
|
||||
"index": 0,
|
||||
"sheetType": "GRID",
|
||||
"gridProperties": {
|
||||
"rowCount": 1000,
|
||||
"columnCount": 26
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"sheetId": 225184494,
|
||||
"title": "Sheet2",
|
||||
"index": 1,
|
||||
"sheetType": "GRID",
|
||||
"gridProperties": {
|
||||
"rowCount": 1000,
|
||||
"columnCount": 26
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"spreadsheetUrl": "https://docs.google.com/spreadsheets/d/1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc/edit"
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Spreadsheets managment",
|
||||
"position": "2"
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Clear cells
|
||||
Clears the value in cells
|
||||
|
||||
|
||||
*Function ClearCells(Val Token, Val Spreadsheet, Val CellsArray, Val Sheet = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Spreadsheet | --spreadsheet | String | SpreadsheetID |
|
||||
| CellsArray | --cells | Array of String | Array of cells like A1 to be cleared |
|
||||
| Sheet | --sheetname | String | Sheet name (first sheet by default) |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
CellsArray = New Array;
|
||||
CellsArray.Add("B2");
|
||||
CellsArray.Add("A3");
|
||||
CellsArray.Add("B4");
|
||||
|
||||
Spreadsheet = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
Sheet = "Sheet2";
|
||||
|
||||
Response = OPI_GoogleSheets.ClearCells(Token, Spreadsheet, CellsArray, Sheet); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets ClearCells --token %token% --spreadsheet "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --cells %cells% --sheetname "Sheet2"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"clearedRanges": [
|
||||
"'Sheet2'!B2",
|
||||
"'Sheet2'!A3",
|
||||
"'Sheet2'!B4"
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,82 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get cell values
|
||||
Gets cell values of the table
|
||||
|
||||
|
||||
*Function GetCellValues(Val Token, Val Spreadsheet, Val CellsArray = "", Val Sheet = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Spreadsheet | --spreadsheet | String | SpreadsheetID |
|
||||
| CellsArray | --cells | Array of String | Array of A1 type cells to get (whole sheet if not filled) |
|
||||
| Sheet | --sheetname | String | Sheet name (first sheet by default) |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
CellsArray = New Array;
|
||||
CellsArray.Add("B2");
|
||||
CellsArray.Add("A3");
|
||||
CellsArray.Add("B4");
|
||||
|
||||
Spreadsheet = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
Sheet = "Sheet2";
|
||||
|
||||
Response = OPI_GoogleSheets.GetCellValues(Token, Spreadsheet, CellsArray, Sheet); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets GetCellValues --token %token% --spreadsheet "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --cells %cells% --sheetname "Sheet2"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"valueRanges": [
|
||||
{
|
||||
"range": "'Sheet2'!B2",
|
||||
"majorDimension": "ROWS",
|
||||
"values": [
|
||||
[
|
||||
"ThisIsB2"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"range": "'Sheet2'!A3",
|
||||
"majorDimension": "ROWS",
|
||||
"values": [
|
||||
[
|
||||
"ThisIsA3"
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"range": "'Sheet2'!B4",
|
||||
"majorDimension": "ROWS",
|
||||
"values": [
|
||||
[
|
||||
"ThisIsB4"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,121 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# SetCellValues
|
||||
Sets sheet cell values
|
||||
|
||||
|
||||
*Function SetCellValues(Val Token, Val Spreadsheet, Val ValueMapping, Val Sheet = "", Val MajorDimension = "COLUMNS") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Spreadsheet | --spreadsheet | String | SpreadsheetID |
|
||||
| ValueMapping | --data | Map Of KeyAndValue | Fill data where the key is the cell name like A1 |
|
||||
| Sheet | --sheetname | String | Sheet name (first sheet by default) |
|
||||
| MajorDimension | --dim | String | Main dimension when filling the array range |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
ValueMapping = New Map;
|
||||
ValueMapping.Insert("A1", "ThisIsA1");
|
||||
ValueMapping.Insert("A2", "ThisIsA2");
|
||||
ValueMapping.Insert("B2", "ThisIsB2");
|
||||
ValueMapping.Insert("B3", "ThisIsB3");
|
||||
ValueMapping.Insert("A3", "ThisIsA3");
|
||||
ValueMapping.Insert("A4", "ThisIsA4");
|
||||
ValueMapping.Insert("B1", "ThisIsB1");
|
||||
ValueMapping.Insert("B4", "ThisIsB4");
|
||||
|
||||
Spreadsheet = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
Sheet = "Sheet2";
|
||||
|
||||
Response = OPI_GoogleSheets.SetCellValues(Token, Spreadsheet, ValueMapping, Sheet); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets SetCellValues --token %token% --spreadsheet "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --data %data% --sheetname "Sheet2" --dim %dim%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"totalUpdatedRows": 4,
|
||||
"totalUpdatedColumns": 2,
|
||||
"totalUpdatedCells": 8,
|
||||
"totalUpdatedSheets": 1,
|
||||
"responses": [
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!A1",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
},
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!A2",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
},
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!B2",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
},
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!B3",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
},
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!A3",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
},
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!A4",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
},
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!B1",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
},
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"updatedRange": "'Sheet2'!B4",
|
||||
"updatedRows": 1,
|
||||
"updatedColumns": 1,
|
||||
"updatedCells": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Data managment",
|
||||
"position": "4"
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# AddSheet
|
||||
Adds a new sheet to the spreadsheet
|
||||
|
||||
|
||||
*Function AddSheet(Val Token, Val Spreadsheet, Val Name) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Spreadsheet | --spreadsheet | String | Spreadsheet identifier |
|
||||
| Name | --title | String | NewSheetName |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Spreadsheet = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
Name = "TestSheet";
|
||||
|
||||
Response = OPI_GoogleSheets.AddSheet(Token, Spreadsheet, Name); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets AddSheet --token %token% --spreadsheet "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --title "TestSheet"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"replies": [
|
||||
{
|
||||
"addSheet": {
|
||||
"properties": {
|
||||
"sheetId": 321892522,
|
||||
"title": "TestSheet",
|
||||
"index": 2,
|
||||
"sheetType": "GRID",
|
||||
"gridProperties": {
|
||||
"rowCount": 1000,
|
||||
"columnCount": 26
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,56 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# CopySheet
|
||||
Copies a sheet from one spreadsheet to another
|
||||
|
||||
|
||||
*Function CopySheet(Val Token, Val From, Val Target, Val Sheet) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| From | --from | String | Source spreadsheet ID |
|
||||
| Target | --to | String | Destination spreadsheet ID |
|
||||
| Sheet | --sheet | String | CopiedSheetID |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
From = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
Target = "1tPDQHmduH9NASRhy0I-a6--ebNNJ5A6wXhhTRcNhD7s";
|
||||
Sheet = "25093199";
|
||||
|
||||
Response = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets CopySheet --token %token% --from "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --to "1tPDQHmduH9NASRhy0I-a6--ebNNJ5A6wXhhTRcNhD7s" --sheet "25093199"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"sheetId": 1790807910,
|
||||
"title": "Sheet2 (copy)",
|
||||
"index": 2,
|
||||
"sheetType": "GRID",
|
||||
"gridProperties": {
|
||||
"rowCount": 1000,
|
||||
"columnCount": 26
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,50 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# DeleteSheet
|
||||
Deletes a sheet from the spreadsheet
|
||||
|
||||
|
||||
*Function DeleteSheet(Val Token, Val Spreadsheet, Val Sheet) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Spreadsheet | --spreadsheet | String | Spreadsheet identifier |
|
||||
| Sheet | --sheet | String | IdentifierOfSheetToDelete |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Spreadsheet = "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc";
|
||||
Sheet = "1790807910";
|
||||
|
||||
Response = OPI_GoogleSheets.DeleteSheet(Token, Spreadsheet, Sheet); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint gsheets DeleteSheet --token %token% --spreadsheet "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --sheet "1790807910"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"spreadsheetId": "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc",
|
||||
"replies": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Working with sheets",
|
||||
"position": "3"
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Add external file
|
||||
Adds a new external file
|
||||
|
||||
|
||||
*Function AddExternalFile(Val Token, Val URL, Val Title) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| URL | --url | String | URL to external file |
|
||||
| Title | --title | String | File title for Slack |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
URL = https://opi.neocities.org/test_data/document.docx;
|
||||
Title = "NewFile";
|
||||
|
||||
Response = OPI_Slack.AddExternalFile(Token, URL, Title); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack AddExternalFile --token %token% --url "https://opi.neocities.org/test_data/document.docx" --title %title%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true,
|
||||
"file": {
|
||||
"id": "F070P52CU94",
|
||||
"created": 1714146552,
|
||||
"timestamp": 1714146552,
|
||||
"name": "Novyj_fajl",
|
||||
"title": "NewFile",
|
||||
"mimetype": "application/vnd.slack-remote",
|
||||
"filetype": "remote",
|
||||
"pretty_type": "Remote",
|
||||
"user": "U06UG1CAYH2",
|
||||
"user_team": "T06UD92BS3C",
|
||||
"editable": false,
|
||||
"size": 0,
|
||||
"mode": "external",
|
||||
"is_external": true,
|
||||
"external_type": "app",
|
||||
"is_public": false,
|
||||
"public_url_shared": false,
|
||||
"display_as_bot": false,
|
||||
"username": "",
|
||||
"url_private": "https://slack.com/api/files.remote.add",
|
||||
"media_display_type": "unknown",
|
||||
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F070P52CU94/novyj_fajl",
|
||||
"comments_count": 0,
|
||||
"is_starred": false,
|
||||
"shares": {},
|
||||
"channels": [],
|
||||
"groups": [],
|
||||
"ims": [],
|
||||
"has_more_shares": false,
|
||||
"external_id": "d2a110a2-08eb-4f20-989f-8943f0816420",
|
||||
"external_url": "https://slack.com/api/files.remote.add",
|
||||
"has_rich_preview": false,
|
||||
"file_access": "visible"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Delete external file
|
||||
Deletes an external file from Slack
|
||||
|
||||
|
||||
*Function DeleteExternalFile(Val Token, Val FileID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| FileID | --fileid | String | File identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
FileID = "F070P52CU94";
|
||||
|
||||
Response = OPI_Slack.DeleteExternalFile(Token, FileID); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack DeleteExternalFile --token %token% --fileid "F070P52CU94"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true
|
||||
}
|
||||
|
||||
```
|
@ -1,50 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Get list of external files
|
||||
Gets a list of external files of a user or channel
|
||||
|
||||
|
||||
*Function GetExternalFileList(Val Token, Val Channel = "", Val Cursor = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| Channel | --channel | String | Channel for selection |
|
||||
| Cursor | --cursor | String | Pointer from the previous request, if the result rows > 100 |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Channel = "C070VPMKN8J";
|
||||
|
||||
Response = OPI_Slack.GetExternalFileList(Token, Channel); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack GetExternalFileList --token %token% --channel "C070VPMKN8J" --cursor %cursor%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true,
|
||||
"files": [],
|
||||
"response_metadata": {
|
||||
"next_cursor": ""
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,80 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get external file
|
||||
Gets information about the external file
|
||||
|
||||
|
||||
*Function GetExternalFile(Val Token, Val FileID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| FileID | --fileid | String | File identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
FileID = "F070P52CU94";
|
||||
|
||||
Response = OPI_Slack.GetExternalFile(Token, FileID); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack GetExternalFile --token %token% --fileid "F070P52CU94"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true,
|
||||
"file": {
|
||||
"id": "F070P52CU94",
|
||||
"created": 1714146552,
|
||||
"timestamp": 1714146552,
|
||||
"name": "Novyj_fajl",
|
||||
"title": "NewFile",
|
||||
"mimetype": "application/vnd.slack-remote",
|
||||
"filetype": "remote",
|
||||
"pretty_type": "Remote",
|
||||
"user": "U06UG1CAYH2",
|
||||
"user_team": "T06UD92BS3C",
|
||||
"editable": false,
|
||||
"size": 0,
|
||||
"mode": "external",
|
||||
"is_external": true,
|
||||
"external_type": "app",
|
||||
"is_public": false,
|
||||
"public_url_shared": false,
|
||||
"display_as_bot": false,
|
||||
"username": "",
|
||||
"url_private": "https://slack.com/api/files.remote.add",
|
||||
"media_display_type": "unknown",
|
||||
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F070P52CU94/novyj_fajl",
|
||||
"comments_count": 0,
|
||||
"is_starred": false,
|
||||
"shares": {},
|
||||
"channels": [],
|
||||
"groups": [],
|
||||
"ims": [],
|
||||
"has_more_shares": false,
|
||||
"external_id": "d2a110a2-08eb-4f20-989f-8943f0816420",
|
||||
"external_url": "https://slack.com/api/files.remote.add",
|
||||
"has_rich_preview": false,
|
||||
"file_access": "visible"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,99 +0,0 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Send external file
|
||||
Sends an external file to a list of channels
|
||||
|
||||
|
||||
*Function SendExternalFile(Val Token, Val FileID, Val ChannelArray) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| FileID | --fileid | String | File identifier |
|
||||
| ChannelArray | --channels | Array Of String | Array of channels for sending |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Channel = "C070VPMKN8J";
|
||||
FileID = "F070P52CU94";
|
||||
|
||||
Response = OPI_Slack.SendExternalFile(Token, FileID, Channel); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack SendExternalFile --token %token% --fileid "F070P52CU94" --channels %channels%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true,
|
||||
"file": {
|
||||
"id": "F070P52CU94",
|
||||
"created": 1714146552,
|
||||
"timestamp": 1714146552,
|
||||
"name": "Novyj_fajl",
|
||||
"title": "NewFile",
|
||||
"mimetype": "application/vnd.slack-remote",
|
||||
"filetype": "remote",
|
||||
"pretty_type": "Remote",
|
||||
"user": "U06UG1CAYH2",
|
||||
"user_team": "T06UD92BS3C",
|
||||
"editable": false,
|
||||
"size": 0,
|
||||
"mode": "external",
|
||||
"is_external": true,
|
||||
"external_type": "app",
|
||||
"is_public": true,
|
||||
"public_url_shared": false,
|
||||
"display_as_bot": false,
|
||||
"username": "",
|
||||
"url_private": "https://slack.com/api/files.remote.add",
|
||||
"media_display_type": "unknown",
|
||||
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F070P52CU94/novyj_fajl",
|
||||
"comments_count": 0,
|
||||
"is_starred": false,
|
||||
"shares": {
|
||||
"public": {
|
||||
"C06UFNUTKUL": [
|
||||
{
|
||||
"reply_users": [],
|
||||
"reply_users_count": 0,
|
||||
"reply_count": 0,
|
||||
"ts": "1714146553.217059",
|
||||
"channel_name": "slack-api-librarry",
|
||||
"team_id": "T06UD92BS3C",
|
||||
"share_user_id": "U06UG1CAYH2",
|
||||
"source": "UNKNOWN"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"channels": [
|
||||
"C06UFNUTKUL"
|
||||
],
|
||||
"groups": [],
|
||||
"ims": [],
|
||||
"has_more_shares": false,
|
||||
"external_id": "d2a110a2-08eb-4f20-989f-8943f0816420",
|
||||
"external_url": "https://slack.com/api/files.remote.add",
|
||||
"has_rich_preview": false,
|
||||
"file_access": "visible"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "External files management",
|
||||
"position": "7"
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Delete file
|
||||
Deletes a file on Slack
|
||||
|
||||
|
||||
*Function DeleteFile(Val Token, Val FileID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| FileID | --fileid | String | File identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
FileID = "F070VL6FQFM";
|
||||
|
||||
Response = OPI_Slack.DeleteFile(Token, FileID); //Map
|
||||
Response = OPI_Tools.JSONString(Response);//JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack DeleteFile --token %token% --fileid "F070VL6FQFM"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true
|
||||
}
|
||||
|
||||
```
|
@ -1,84 +0,0 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get file data
|
||||
Gets information about the file
|
||||
|
||||
|
||||
*Function GetFileData(Val Token, Val FileID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| FileID | --fileid | String | File identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
FileID = "F070VL6FQFM";
|
||||
|
||||
Response = OPI_Slack.GetFileData(Token, FileID); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack GetFileData --token %token% --fileid "F070VL6FQFM"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true,
|
||||
"file": {
|
||||
"id": "F070VL6FQFM",
|
||||
"created": 1714146550,
|
||||
"timestamp": 1714146550,
|
||||
"name": "megadoc.docx",
|
||||
"title": "NewFile",
|
||||
"mimetype": "",
|
||||
"filetype": "",
|
||||
"pretty_type": "",
|
||||
"user": "U06UG1CAYH2",
|
||||
"user_team": "T06UD92BS3C",
|
||||
"editable": false,
|
||||
"size": 24069,
|
||||
"mode": "hosted",
|
||||
"is_external": false,
|
||||
"external_type": "",
|
||||
"is_public": false,
|
||||
"public_url_shared": false,
|
||||
"display_as_bot": false,
|
||||
"username": "",
|
||||
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F070VL6FQFM/megadoc.docx",
|
||||
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F070VL6FQFM/download/megadoc.docx",
|
||||
"media_display_type": "unknown",
|
||||
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F070VL6FQFM/megadoc.docx",
|
||||
"permalink_public": "https://slack-files.com/T06UD92BS3C-F070VL6FQFM-9fb2618d36",
|
||||
"is_starred": false,
|
||||
"shares": {},
|
||||
"channels": [],
|
||||
"groups": [],
|
||||
"ims": [],
|
||||
"has_more_shares": false,
|
||||
"has_rich_preview": false,
|
||||
"file_access": "visible",
|
||||
"comments_count": 0
|
||||
},
|
||||
"comments": [],
|
||||
"response_metadata": {
|
||||
"next_cursor": ""
|
||||
}
|
||||
}
|
||||
|
||||
```
|
@ -1,84 +0,0 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Get list of files
|
||||
Gets a list of files of the bot or channel
|
||||
|
||||
|
||||
*Function GetFilesList(Val Token, Val Channel = "", Val PageNumber = 1) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| Channel | --channel | String | Channel for selection |
|
||||
| PageNumber | --page | Number, String | Page number |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
PageNumber = 1;
|
||||
Channel = "C123456";
|
||||
|
||||
Response = OPI_Slack.GetFilesList(Token, Channel, PageNumber); //Map
|
||||
Response = OPI_Tools.JSONString(Response); //JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack GetFilesList --token %token% --channel "C123456" --page "1"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true,
|
||||
"files": [
|
||||
{
|
||||
"id": "F070V4U7Y4R",
|
||||
"created": 1713978714,
|
||||
"timestamp": 1713978714,
|
||||
"name": "megadoc.docx",
|
||||
"title": "NewFile",
|
||||
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"filetype": "docx",
|
||||
"pretty_type": "Word Document",
|
||||
"user": "U06UG1CAYH2",
|
||||
"user_team": "T06UD92BS3C",
|
||||
"editable": false,
|
||||
"size": 24069,
|
||||
"mode": "hosted",
|
||||
"is_external": false,
|
||||
"external_type": "",
|
||||
"is_public": true,
|
||||
"public_url_shared": false,
|
||||
"display_as_bot": false,
|
||||
"username": "",
|
||||
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F070V4U7Y4R/megadoc.docx",
|
||||
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F070V4U7Y4R/download/megadoc.docx",
|
||||
"media_display_type": "unknown",
|
||||
"converted_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F070V4U7Y4R-417b34221e/megadoc_converted.pdf",
|
||||
"thumb_pdf": "https://files.slack.com/files-tmb/T06UD92BS3C-F070V4U7Y4R-417b34221e/megadoc_thumb_pdf.png",
|
||||
"thumb_pdf_w": 909,
|
||||
"thumb_pdf_h": 1286,
|
||||
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F070V4U7Y4R/megadoc.docx",
|
||||
"channels": [
|
||||
"C06UFNUTKUL"
|
||||
],
|
||||
"groups": [],
|
||||
"ims": [],
|
||||
"comments_count": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,37 +0,0 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Make file private
|
||||
Removes the public URL from the file. Requires user token
|
||||
|
||||
|
||||
*Function MakeFilePrivate(Val Token, Val FileID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | User token |
|
||||
| FileID | --fileid | String | File identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack MakeFilePrivate --token %token% --fileid %fileid%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
|
||||
|
||||
```
|
@ -1,37 +0,0 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Make file public
|
||||
Creates a public URL for the file. Requires user token
|
||||
|
||||
|
||||
*Function MakeFilePublic(Val Token, Val FileID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | User token |
|
||||
| FileID | --fileid | String | File identifier |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack MakeFilePublic --token %token% --fileid %fileid%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
|
||||
|
||||
```
|
@ -1,88 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Upload file
|
||||
Uploads a file to Slack servers
|
||||
|
||||
|
||||
*Function UploadFile(Val Token, Val File, Val FileName, Val Title, Val Channel = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Bot token |
|
||||
| File | --file | String, BinaryData | File for upload |
|
||||
| FileName | --filename | String | File name with extension |
|
||||
| Title | --title | String | File name in Slack |
|
||||
| Channel | --channel | String | Channel ID |
|
||||
|
||||
|
||||
Returns: Map Of KeyAndValue - Serialized JSON response from Slack
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
FileName = "megadoc.docx";
|
||||
File = New BinaryData("D:\" + FileName);
|
||||
Title = "NewFile";
|
||||
Channel = "C123456";
|
||||
|
||||
Response = OPI_Slack.UploadFile(Token, File, FileName, Title, Channel); //Map
|
||||
Response = OPI_Tools.JSONString(Response);//JSON string
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint slack UploadFile --token %token% --file %file% --filename "megadoc.docx" --title %title% --channel "C123456"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"ok": true,
|
||||
"files": [
|
||||
{
|
||||
"id": "F070SS4UHNZ",
|
||||
"created": 1714146549,
|
||||
"timestamp": 1714146549,
|
||||
"name": "megadoc.docx",
|
||||
"title": "NewFile",
|
||||
"mimetype": "",
|
||||
"filetype": "",
|
||||
"pretty_type": "",
|
||||
"user": "U06UG1CAYH2",
|
||||
"user_team": "T06UD92BS3C",
|
||||
"editable": false,
|
||||
"size": 24069,
|
||||
"mode": "hosted",
|
||||
"is_external": false,
|
||||
"external_type": "",
|
||||
"is_public": false,
|
||||
"public_url_shared": false,
|
||||
"display_as_bot": false,
|
||||
"username": "",
|
||||
"url_private": "https://files.slack.com/files-pri/T06UD92BS3C-F070SS4UHNZ/megadoc.docx",
|
||||
"url_private_download": "https://files.slack.com/files-pri/T06UD92BS3C-F070SS4UHNZ/download/megadoc.docx",
|
||||
"media_display_type": "unknown",
|
||||
"permalink": "https://openintegrationsgroup.slack.com/files/U06UG1CAYH2/F070SS4UHNZ/megadoc.docx",
|
||||
"permalink_public": "https://slack-files.com/T06UD92BS3C-F070SS4UHNZ-e68bef4a91",
|
||||
"comments_count": 0,
|
||||
"is_starred": false,
|
||||
"shares": {},
|
||||
"channels": [],
|
||||
"groups": [],
|
||||
"ims": [],
|
||||
"has_more_shares": false,
|
||||
"has_rich_preview": false,
|
||||
"file_access": "visible"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "File managment",
|
||||
"position": "6"
|
||||
}
|
Loading…
Reference in New Issue
Block a user