You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-07-17 01:42:25 +02:00
Создание MD файлов документации
This commit is contained in:
committed by
Vitaly the Alpaca (bot)
parent
9c2d012d41
commit
09822c04ec
@ -1,102 +1,102 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create block
|
||||
Creates a new block based on an existing block
|
||||
|
||||
|
||||
*Function CreateBlock(Val Token, Val Parent, Val Block, Val InsertAfter = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --page | String | Parent block or page ID |
|
||||
| Block | --block | String, Map Of KeyAndValue | Block ID or block sample itself |
|
||||
| InsertAfter | --prev | String | Block ID after which to insert the new one |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
|
||||
Block = OPI_Notion.ReturnBlock(Token, "ca18df269bd24407852b91c30e..."); //Block as map. Can be changed.
|
||||
|
||||
Response = OPI_Notion.CreateBlock(Token, Parent, Block);
|
||||
Response = OPI_Notion.CreateBlock(Token, Parent, "46c1500ed40c4e89ba6a229003...");
|
||||
Response = OPI_Notion.CreateBlock(Token, Parent, "aa4137d4c8cc445d9f969c3968...");
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreateBlock --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --block %block% --prev %prev%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "4de46f5b-d38b-4df5-b26e-32127db1096b",
|
||||
"block": {},
|
||||
"type": "block",
|
||||
"has_more": false,
|
||||
"next_cursor": null,
|
||||
"results": [
|
||||
{
|
||||
"type": "numbered_list_item",
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T17:11:00.000Z",
|
||||
"created_time": "2024-01-26T17:11:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "b147fabd-53ea-42d5-bd23-85968f627f88",
|
||||
"numbered_list_item": {
|
||||
"color": "default",
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Description",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Description"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object": "block"
|
||||
}
|
||||
],
|
||||
"object": "list"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create block
|
||||
Creates a new block based on an existing block
|
||||
|
||||
|
||||
*Function CreateBlock(Val Token, Val Parent, Val Block, Val InsertAfter = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --page | String | Parent block or page ID |
|
||||
| Block | --block | String, Map Of KeyAndValue | Block ID or block sample itself |
|
||||
| InsertAfter | --prev | String | Block ID after which to insert the new one |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
|
||||
Block = OPI_Notion.ReturnBlock(Token, "ca18df269bd24407852b91c30e..."); //Block as map. Can be changed.
|
||||
|
||||
Response = OPI_Notion.CreateBlock(Token, Parent, Block);
|
||||
Response = OPI_Notion.CreateBlock(Token, Parent, "46c1500ed40c4e89ba6a229003...");
|
||||
Response = OPI_Notion.CreateBlock(Token, Parent, "aa4137d4c8cc445d9f969c3968...");
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreateBlock --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --block %block% --prev %prev%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "4de46f5b-d38b-4df5-b26e-32127db1096b",
|
||||
"block": {},
|
||||
"type": "block",
|
||||
"has_more": false,
|
||||
"next_cursor": null,
|
||||
"results": [
|
||||
{
|
||||
"type": "numbered_list_item",
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T17:11:00.000Z",
|
||||
"created_time": "2024-01-26T17:11:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "b147fabd-53ea-42d5-bd23-85968f627f88",
|
||||
"numbered_list_item": {
|
||||
"color": "default",
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Description",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Description"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object": "block"
|
||||
}
|
||||
],
|
||||
"object": "list"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,88 +1,88 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Delete block
|
||||
Deletes block by ID
|
||||
|
||||
|
||||
*Function DeleteBlock(Val Token, Val BlockID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| BlockID | --block | String | Block ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Block = "ca18df269bd24407852b91c30...";
|
||||
|
||||
Response = OPI_Notion.DeleteBlock(Token, BlockID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion DeleteBlock --token "secret_9RsfMrRMqZwqp0Zl0B..." --block %block%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "62b95ed2-c9af-4be8-b75a-f6e4f69aef14",
|
||||
"to_do": {
|
||||
"color": "default",
|
||||
"checked": false,
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Hello",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Hello"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "to_do",
|
||||
"archived": true,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:43:00.000Z",
|
||||
"created_time": "2024-01-26T11:03:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "d7021bdd-15b9-44ab-abcb-02bd2b1a5f6a",
|
||||
"object": "block"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Delete block
|
||||
Deletes block by ID
|
||||
|
||||
|
||||
*Function DeleteBlock(Val Token, Val BlockID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| BlockID | --block | String | Block ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Block = "ca18df269bd24407852b91c30...";
|
||||
|
||||
Response = OPI_Notion.DeleteBlock(Token, BlockID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion DeleteBlock --token "secret_9RsfMrRMqZwqp0Zl0B..." --block %block%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "62b95ed2-c9af-4be8-b75a-f6e4f69aef14",
|
||||
"to_do": {
|
||||
"color": "default",
|
||||
"checked": false,
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Hello",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Hello"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "to_do",
|
||||
"archived": true,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:43:00.000Z",
|
||||
"created_time": "2024-01-26T11:03:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "d7021bdd-15b9-44ab-abcb-02bd2b1a5f6a",
|
||||
"object": "block"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,89 +1,89 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Return block.
|
||||
|
||||
|
||||
|
||||
*Function ReturnBlock(Val Token, Val BlockID, Val OnlyBase = True) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| BlockID | --block | String | Block ID |
|
||||
| OnlyBase | --core | Boolean | True > service fields are deleted, only the block itself remains |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Block = "ca18df269bd24407852b91c30...";
|
||||
|
||||
Response = OPI_Notion.ReturnBlock(Token, BlockID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion ReturnBlock --token "secret_9RsfMrRMqZwqp0Zl0B..." --block %block% --core %core%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "031886cc-537d-4025-b480-ecfdc9f2870c",
|
||||
"to_do": {
|
||||
"color": "default",
|
||||
"checked": false,
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Hello",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Hello"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "to_do",
|
||||
"archived": true,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:43:00.000Z",
|
||||
"created_time": "2024-01-26T11:03:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "d7021bdd-15b9-44ab-abcb-02bd2b1a5f6a",
|
||||
"object": "block"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Return block.
|
||||
|
||||
|
||||
|
||||
*Function ReturnBlock(Val Token, Val BlockID, Val OnlyBase = True) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| BlockID | --block | String | Block ID |
|
||||
| OnlyBase | --core | Boolean | True > service fields are deleted, only the block itself remains |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Block = "ca18df269bd24407852b91c30...";
|
||||
|
||||
Response = OPI_Notion.ReturnBlock(Token, BlockID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion ReturnBlock --token "secret_9RsfMrRMqZwqp0Zl0B..." --block %block% --core %core%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "031886cc-537d-4025-b480-ecfdc9f2870c",
|
||||
"to_do": {
|
||||
"color": "default",
|
||||
"checked": false,
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Hello",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Hello"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "to_do",
|
||||
"archived": true,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:43:00.000Z",
|
||||
"created_time": "2024-01-26T11:03:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "d7021bdd-15b9-44ab-abcb-02bd2b1a5f6a",
|
||||
"object": "block"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,139 +1,139 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Return child blocks
|
||||
Returns list of child blocks of parent block
|
||||
|
||||
|
||||
*Function ReturnChildBlocks(Val Token, Val BlockID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| BlockID | --block | String | Parent block ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Block = "46c1500ed40c4e89ba6a22900...";
|
||||
|
||||
Response = OPI_Notion.ReturnChildBlocks(Token, BlockID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion ReturnChildBlocks --token "secret_9RsfMrRMqZwqp0Zl0B..." --block %block%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "fea2a37b-5507-451d-a4be-14433811a69e",
|
||||
"block": {},
|
||||
"type": "block",
|
||||
"has_more": false,
|
||||
"next_cursor": null,
|
||||
"results": [
|
||||
{
|
||||
"type": "numbered_list_item",
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T20:33:00.000Z",
|
||||
"created_time": "2024-01-26T17:02:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"block_id": "46c1500e-d40c-4e89-ba6a-229003d81ded",
|
||||
"type": "block_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "aa4137d4-c8cc-445d-9f96-9c3968334e74",
|
||||
"numbered_list_item": {
|
||||
"color": "default",
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Two",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Two"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object": "block"
|
||||
},
|
||||
{
|
||||
"type": "numbered_list_item",
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T20:33:00.000Z",
|
||||
"created_time": "2024-01-26T20:30:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"block_id": "46c1500e-d40c-4e89-ba6a-229003d81ded",
|
||||
"type": "block_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "6fb45895-0350-49d3-a5c7-e0cb1e24061e",
|
||||
"numbered_list_item": {
|
||||
"color": "default",
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Three",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Three"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object": "block"
|
||||
}
|
||||
],
|
||||
"object": "list"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Return child blocks
|
||||
Returns list of child blocks of parent block
|
||||
|
||||
|
||||
*Function ReturnChildBlocks(Val Token, Val BlockID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| BlockID | --block | String | Parent block ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Block = "46c1500ed40c4e89ba6a22900...";
|
||||
|
||||
Response = OPI_Notion.ReturnChildBlocks(Token, BlockID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion ReturnChildBlocks --token "secret_9RsfMrRMqZwqp0Zl0B..." --block %block%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "fea2a37b-5507-451d-a4be-14433811a69e",
|
||||
"block": {},
|
||||
"type": "block",
|
||||
"has_more": false,
|
||||
"next_cursor": null,
|
||||
"results": [
|
||||
{
|
||||
"type": "numbered_list_item",
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T20:33:00.000Z",
|
||||
"created_time": "2024-01-26T17:02:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"block_id": "46c1500e-d40c-4e89-ba6a-229003d81ded",
|
||||
"type": "block_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "aa4137d4-c8cc-445d-9f96-9c3968334e74",
|
||||
"numbered_list_item": {
|
||||
"color": "default",
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Two",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Two"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object": "block"
|
||||
},
|
||||
{
|
||||
"type": "numbered_list_item",
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T20:33:00.000Z",
|
||||
"created_time": "2024-01-26T20:30:00.000Z",
|
||||
"has_children": false,
|
||||
"parent": {
|
||||
"block_id": "46c1500e-d40c-4e89-ba6a-229003d81ded",
|
||||
"type": "block_id"
|
||||
},
|
||||
"last_edited_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "6fb45895-0350-49d3-a5c7-e0cb1e24061e",
|
||||
"numbered_list_item": {
|
||||
"color": "default",
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "Three",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Three"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object": "block"
|
||||
}
|
||||
],
|
||||
"object": "list"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Blocks managment",
|
||||
"position": "4"
|
||||
}
|
||||
{
|
||||
"label": "Blocks managment",
|
||||
"position": "4"
|
||||
}
|
||||
|
@ -1,201 +1,201 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create database
|
||||
Creates a database
|
||||
|
||||
|
||||
*Function CreateDatabase(Val Token, Val Parent, Val Title, Val Properties = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --page | String | Parent page ID |
|
||||
| Title | --title | String | Database title |
|
||||
| Properties | --props | Structure Of String | Database properties |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
Title = "This base is from 1C";
|
||||
|
||||
Properties = New Map;
|
||||
Properties.Insert("Name", "title"); //Title field required
|
||||
Properties.Insert("Description", "rich_text");
|
||||
Properties.Insert("Number", "number");
|
||||
Properties.Insert("Status", "status");
|
||||
Properties.Insert("CreationDate", "date");
|
||||
Properties.Insert("Image", "files");
|
||||
Properties.Insert("Active", "checkbox");
|
||||
Properties.Insert("Website", "url");
|
||||
Properties.Insert("Email", "email");
|
||||
Properties.Insert("Phone", "phone_number");
|
||||
Properties.Insert("User", "people");
|
||||
|
||||
ValueSelection = New Map;
|
||||
ValueSelection.Insert("New", "green");
|
||||
ValueSelection.Insert("InProgress", "yellow");
|
||||
ValueSelection.Insert("Remote", "red");
|
||||
Properties.Insert("Status", ValueSelection);
|
||||
|
||||
Response = OPI_Notion.CreateDatabase(Token, Parent, Title, Properties);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreateDatabase --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --title "This base is from 1C" --props %props%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "43adcae7-c8ee-4a7d-aba6-c2c43ad2c33b",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/048ba0ce4f474e33900540d249b01949",
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": {},
|
||||
"type": "files",
|
||||
"name": "Image",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": {},
|
||||
"type": "checkbox",
|
||||
"name": "Active",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": {},
|
||||
"type": "phone_number",
|
||||
"name": "Phone",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": {},
|
||||
"type": "people",
|
||||
"name": "User",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Website": {
|
||||
"url": {},
|
||||
"type": "url",
|
||||
"name": "Website",
|
||||
"id": "THre"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Description",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"options": [
|
||||
{
|
||||
"description": null,
|
||||
"color": "red",
|
||||
"name": "Remote",
|
||||
"id": "a71d6e8a-4f3e-4dfd-9f0e-4d90e400fde7"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "yellow",
|
||||
"name": "InProgress",
|
||||
"id": "aa6300b4-c635-4ab4-b5cd-87d14e45dd11"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "select",
|
||||
"name": "Status",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"name": "Number",
|
||||
"number": {
|
||||
"format": "number"
|
||||
},
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {},
|
||||
"type": "date",
|
||||
"name": "CreationDate",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": {},
|
||||
"type": "title",
|
||||
"name": "Name",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"email": {},
|
||||
"type": "email",
|
||||
"name": "Email",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"last_edited_time": "2024-01-26T16:49:00.000Z",
|
||||
"description": [],
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"archived": false,
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T16:49:00.000Z",
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "This base is from 1C",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "This base is from 1C"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"cover": null,
|
||||
"is_inline": false,
|
||||
"id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"object": "database"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create database
|
||||
Creates a database
|
||||
|
||||
|
||||
*Function CreateDatabase(Val Token, Val Parent, Val Title, Val Properties = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --page | String | Parent page ID |
|
||||
| Title | --title | String | Database title |
|
||||
| Properties | --props | Structure Of String | Database properties |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
Title = "This base is from 1C";
|
||||
|
||||
Properties = New Map;
|
||||
Properties.Insert("Name", "title"); //Title field required
|
||||
Properties.Insert("Description", "rich_text");
|
||||
Properties.Insert("Number", "number");
|
||||
Properties.Insert("Status", "status");
|
||||
Properties.Insert("CreationDate", "date");
|
||||
Properties.Insert("Image", "files");
|
||||
Properties.Insert("Active", "checkbox");
|
||||
Properties.Insert("Website", "url");
|
||||
Properties.Insert("Email", "email");
|
||||
Properties.Insert("Phone", "phone_number");
|
||||
Properties.Insert("User", "people");
|
||||
|
||||
ValueSelection = New Map;
|
||||
ValueSelection.Insert("New", "green");
|
||||
ValueSelection.Insert("InProgress", "yellow");
|
||||
ValueSelection.Insert("Remote", "red");
|
||||
Properties.Insert("Status", ValueSelection);
|
||||
|
||||
Response = OPI_Notion.CreateDatabase(Token, Parent, Title, Properties);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreateDatabase --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --title "This base is from 1C" --props %props%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "43adcae7-c8ee-4a7d-aba6-c2c43ad2c33b",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/048ba0ce4f474e33900540d249b01949",
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": {},
|
||||
"type": "files",
|
||||
"name": "Image",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": {},
|
||||
"type": "checkbox",
|
||||
"name": "Active",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": {},
|
||||
"type": "phone_number",
|
||||
"name": "Phone",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": {},
|
||||
"type": "people",
|
||||
"name": "User",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Website": {
|
||||
"url": {},
|
||||
"type": "url",
|
||||
"name": "Website",
|
||||
"id": "THre"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Description",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"options": [
|
||||
{
|
||||
"description": null,
|
||||
"color": "red",
|
||||
"name": "Remote",
|
||||
"id": "a71d6e8a-4f3e-4dfd-9f0e-4d90e400fde7"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "yellow",
|
||||
"name": "InProgress",
|
||||
"id": "aa6300b4-c635-4ab4-b5cd-87d14e45dd11"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "select",
|
||||
"name": "Status",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"name": "Number",
|
||||
"number": {
|
||||
"format": "number"
|
||||
},
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {},
|
||||
"type": "date",
|
||||
"name": "CreationDate",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": {},
|
||||
"type": "title",
|
||||
"name": "Name",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"email": {},
|
||||
"type": "email",
|
||||
"name": "Email",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"last_edited_time": "2024-01-26T16:49:00.000Z",
|
||||
"description": [],
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"archived": false,
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T16:49:00.000Z",
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "This base is from 1C",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "This base is from 1C"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"cover": null,
|
||||
"is_inline": false,
|
||||
"id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"object": "database"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,200 +1,200 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Edit database properties
|
||||
Edits properties of an existing database
|
||||
|
||||
|
||||
*Function EditDatabaseProperties(Val Token, Val Base, Val Properties = "", Val Title = "", Val Description = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Base | --base | String | Target database ID |
|
||||
| Properties | --props | Map of KeyAndValue | New or modified database properties |
|
||||
| Title | --title | String | New database title |
|
||||
| Description | --description | String | New database description |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Base = "5dd94c34fab04bff9...";
|
||||
Title = "Updated title";
|
||||
Description = "Updated base description";
|
||||
|
||||
Properties = New Map;
|
||||
Properties.Insert("Email", "rich_text"); //Type fields "Email" will changed with email to text
|
||||
Properties.Insert("Website"); //Field "Website" will deleted
|
||||
|
||||
Response = OPI_Notion.EditDatabaseProperties(Token, Base, Properties, Title, Description);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion EditDatabaseProperties --token "secret_9RsfMrRMqZwqp0Zl0B..." --base "5dd94c34fab04bff9..." --props %props% --title "Updated title" --description "Updated base description"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "d42b5700-9325-439e-98ce-252a007f5ed7",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/048ba0ce4f474e33900540d249b01949",
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": {},
|
||||
"type": "files",
|
||||
"name": "Image",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": {},
|
||||
"type": "checkbox",
|
||||
"name": "Active",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": {},
|
||||
"type": "phone_number",
|
||||
"name": "Phone",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": {},
|
||||
"type": "people",
|
||||
"name": "User",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Description",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"options": [
|
||||
{
|
||||
"description": null,
|
||||
"color": "red",
|
||||
"name": "Remote",
|
||||
"id": "a71d6e8a-4f3e-4dfd-9f0e-4d90e400fde7"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "yellow",
|
||||
"name": "InProgress",
|
||||
"id": "aa6300b4-c635-4ab4-b5cd-87d14e45dd11"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "select",
|
||||
"name": "Status",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"name": "Number",
|
||||
"number": {
|
||||
"format": "number"
|
||||
},
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {},
|
||||
"type": "date",
|
||||
"name": "CreationDate",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": {},
|
||||
"type": "title",
|
||||
"name": "Name",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Email",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"last_edited_time": "2024-01-26T18:26:00.000Z",
|
||||
"description": [
|
||||
{
|
||||
"plain_text": "Updated base description",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated base description"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"archived": false,
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T16:49:00.000Z",
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "Updated title",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated title"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"cover": null,
|
||||
"is_inline": false,
|
||||
"id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"object": "database"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Edit database properties
|
||||
Edits properties of an existing database
|
||||
|
||||
|
||||
*Function EditDatabaseProperties(Val Token, Val Base, Val Properties = "", Val Title = "", Val Description = "") Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Base | --base | String | Target database ID |
|
||||
| Properties | --props | Map of KeyAndValue | New or modified database properties |
|
||||
| Title | --title | String | New database title |
|
||||
| Description | --description | String | New database description |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Base = "5dd94c34fab04bff9...";
|
||||
Title = "Updated title";
|
||||
Description = "Updated base description";
|
||||
|
||||
Properties = New Map;
|
||||
Properties.Insert("Email", "rich_text"); //Type fields "Email" will changed with email to text
|
||||
Properties.Insert("Website"); //Field "Website" will deleted
|
||||
|
||||
Response = OPI_Notion.EditDatabaseProperties(Token, Base, Properties, Title, Description);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion EditDatabaseProperties --token "secret_9RsfMrRMqZwqp0Zl0B..." --base "5dd94c34fab04bff9..." --props %props% --title "Updated title" --description "Updated base description"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "d42b5700-9325-439e-98ce-252a007f5ed7",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/048ba0ce4f474e33900540d249b01949",
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": {},
|
||||
"type": "files",
|
||||
"name": "Image",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": {},
|
||||
"type": "checkbox",
|
||||
"name": "Active",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": {},
|
||||
"type": "phone_number",
|
||||
"name": "Phone",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": {},
|
||||
"type": "people",
|
||||
"name": "User",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Description",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"options": [
|
||||
{
|
||||
"description": null,
|
||||
"color": "red",
|
||||
"name": "Remote",
|
||||
"id": "a71d6e8a-4f3e-4dfd-9f0e-4d90e400fde7"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "yellow",
|
||||
"name": "InProgress",
|
||||
"id": "aa6300b4-c635-4ab4-b5cd-87d14e45dd11"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "select",
|
||||
"name": "Status",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"name": "Number",
|
||||
"number": {
|
||||
"format": "number"
|
||||
},
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {},
|
||||
"type": "date",
|
||||
"name": "CreationDate",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": {},
|
||||
"type": "title",
|
||||
"name": "Name",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Email",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"last_edited_time": "2024-01-26T18:26:00.000Z",
|
||||
"description": [
|
||||
{
|
||||
"plain_text": "Updated base description",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated base description"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"archived": false,
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T16:49:00.000Z",
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "Updated title",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated title"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"cover": null,
|
||||
"is_inline": false,
|
||||
"id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"object": "database"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,191 +1,191 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get database
|
||||
Get database information
|
||||
|
||||
|
||||
*Function GetDatabase(Val Token, Val Base) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Base | --base | String | Database ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Base = "048ba0ce4f474e33900540d24...";
|
||||
|
||||
Response = OPI_Notion.GetDatabase(Token, Base);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion GetDatabase --token "secret_9RsfMrRMqZwqp0Zl0B..." --base "048ba0ce4f474e33900540d24..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "9c6e06e9-ffa5-4a3c-b4ff-0368553ca066",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/048ba0ce4f474e33900540d249b01949",
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": {},
|
||||
"type": "files",
|
||||
"name": "Image",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": {},
|
||||
"type": "checkbox",
|
||||
"name": "Active",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": {},
|
||||
"type": "phone_number",
|
||||
"name": "Phone",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": {},
|
||||
"type": "people",
|
||||
"name": "User",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Description",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"options": [
|
||||
{
|
||||
"description": null,
|
||||
"color": "red",
|
||||
"name": "Remote",
|
||||
"id": "a71d6e8a-4f3e-4dfd-9f0e-4d90e400fde7"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "yellow",
|
||||
"name": "InProgress",
|
||||
"id": "aa6300b4-c635-4ab4-b5cd-87d14e45dd11"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "select",
|
||||
"name": "Status",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"name": "Number",
|
||||
"number": {
|
||||
"format": "number"
|
||||
},
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {},
|
||||
"type": "date",
|
||||
"name": "CreationDate",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": {},
|
||||
"type": "title",
|
||||
"name": "Name",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Email",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"last_edited_time": "2024-01-26T18:28:00.000Z",
|
||||
"description": [
|
||||
{
|
||||
"plain_text": "Updated base description",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated base description"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"archived": false,
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T16:49:00.000Z",
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "Updated title",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated title"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"cover": null,
|
||||
"is_inline": false,
|
||||
"id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"last_edited_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"object": "database"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get database
|
||||
Get database information
|
||||
|
||||
|
||||
*Function GetDatabase(Val Token, Val Base) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Base | --base | String | Database ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Base = "048ba0ce4f474e33900540d24...";
|
||||
|
||||
Response = OPI_Notion.GetDatabase(Token, Base);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion GetDatabase --token "secret_9RsfMrRMqZwqp0Zl0B..." --base "048ba0ce4f474e33900540d24..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "9c6e06e9-ffa5-4a3c-b4ff-0368553ca066",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/048ba0ce4f474e33900540d249b01949",
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": {},
|
||||
"type": "files",
|
||||
"name": "Image",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": {},
|
||||
"type": "checkbox",
|
||||
"name": "Active",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": {},
|
||||
"type": "phone_number",
|
||||
"name": "Phone",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": {},
|
||||
"type": "people",
|
||||
"name": "User",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Description",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"options": [
|
||||
{
|
||||
"description": null,
|
||||
"color": "red",
|
||||
"name": "Remote",
|
||||
"id": "a71d6e8a-4f3e-4dfd-9f0e-4d90e400fde7"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "yellow",
|
||||
"name": "InProgress",
|
||||
"id": "aa6300b4-c635-4ab4-b5cd-87d14e45dd11"
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "select",
|
||||
"name": "Status",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"name": "Number",
|
||||
"number": {
|
||||
"format": "number"
|
||||
},
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {},
|
||||
"type": "date",
|
||||
"name": "CreationDate",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": {},
|
||||
"type": "title",
|
||||
"name": "Name",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": {},
|
||||
"type": "rich_text",
|
||||
"name": "Email",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"last_edited_time": "2024-01-26T18:28:00.000Z",
|
||||
"description": [
|
||||
{
|
||||
"plain_text": "Updated base description",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated base description"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"archived": false,
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T16:49:00.000Z",
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "Updated title",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Updated title"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"cover": null,
|
||||
"is_inline": false,
|
||||
"id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"last_edited_by": {
|
||||
"id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
|
||||
"object": "user"
|
||||
},
|
||||
"object": "database"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Database management",
|
||||
"position": "3"
|
||||
}
|
||||
{
|
||||
"label": "Database management",
|
||||
"position": "3"
|
||||
}
|
||||
|
@ -1,38 +1,38 @@
|
||||
---
|
||||
id: Notion
|
||||
sidebar_class_name: Notion
|
||||
---
|
||||
|
||||
<img src={require('../../static/img/APIs/Notion.png').default} width='64px' />
|
||||
|
||||
# Notion
|
||||
|
||||
Этот раздел поwithinящен библиотеtoе for work with Notion API. Nа данной withтранице опиwithаны inwithе дейwithтinия, необходимые for полноценного of start work
|
||||
|
||||
## Getting started
|
||||
|
||||
1. Перейдите **[in раздел интеграций портала for разработчиtoоin](https://www.notion.so/my-integrations)**
|
||||
|
||||

|
||||
|
||||
2. Ininедите name inашей интеграции
|
||||
|
||||

|
||||
|
||||
3. Towithле заinершения withоздания интеграции, toжмите *Show* и withtoопируйте **Token (Secret)**
|
||||
|
||||

|
||||
|
||||
4. Перейдите in **[mainоinной интерфейwith Notion](https://notion.so)** и withоздайте ноinую page. Эта withтраница will родительwithtoой for all оwithтальных объеtoтоin, withоздаinаемых через API
|
||||
|
||||

|
||||
|
||||
5. Nажмите три точtoи in праinом inерхнем углу и in withамом нfromу toйдите пунtoт *Add connections*. Inыберите там withinою интеграцию from пунtoтоin 1-3
|
||||
|
||||

|
||||
|
||||
6. Toлучите ID this withтраинцы. Это можно withделать toжаin Share -> Copy link or проwithто withtoопироinаin from URL
|
||||
|
||||

|
||||
|
||||
**Token** и **Page ID** - дinа параметра, необходимые for work через API
|
||||
---
|
||||
id: Notion
|
||||
sidebar_class_name: Notion
|
||||
---
|
||||
|
||||
<img src={require('../../static/img/APIs/Notion.png').default} width='64px' />
|
||||
|
||||
# Notion
|
||||
|
||||
Этот раздел поwithinящен библиотеtoе for work with Notion API. Nа данной withтранице опиwithаны inwithе дейwithтinия, необходимые for полноценного of start work
|
||||
|
||||
## Getting started
|
||||
|
||||
1. Перейдите **[in раздел интеграций портала for разработчиtoоin](https://www.notion.so/my-integrations)**
|
||||
|
||||

|
||||
|
||||
2. Ininедите name inашей интеграции
|
||||
|
||||

|
||||
|
||||
3. Towithле заinершения withоздания интеграции, toжмите *Show* и withtoопируйте **Token (Secret)**
|
||||
|
||||

|
||||
|
||||
4. Перейдите in **[mainоinной интерфейwith Notion](https://notion.so)** и withоздайте ноinую page. Эта withтраница will родительwithtoой for all оwithтальных объеtoтоin, withоздаinаемых через API
|
||||
|
||||

|
||||
|
||||
5. Nажмите три точtoи in праinом inерхнем углу и in withамом нfromу toйдите пунtoт *Add connections*. Inыберите там withinою интеграцию from пунtoтоin 1-3
|
||||
|
||||

|
||||
|
||||
6. Toлучите ID this withтраинцы. Это можно withделать toжаin Share -> Copy link or проwithто withtoопироinаin from URL
|
||||
|
||||

|
||||
|
||||
**Token** и **Page ID** - дinа параметра, необходимые for work через API
|
||||
|
@ -1,204 +1,204 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Create page in database
|
||||
Creates a page in the parent database
|
||||
|
||||
|
||||
*Function CreatePageInDatabase(Val Token, Val Parent, Val Data) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --base | String | Parent database ID |
|
||||
| Data | --data | Key-Value Pair | Properties match |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
Image = New Map;
|
||||
Image.Insert("Logo", "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg");
|
||||
|
||||
Data = New Map;
|
||||
Data.Insert("Name", "LLC Vector");
|
||||
Data.Insert("Description", "OurFirstClient");
|
||||
Data.Insert("Number", 1);
|
||||
Data.Insert("Status", "Regular");
|
||||
Data.Insert("CreationDate", CurrentSessionDate());
|
||||
Data.Insert("Image", Image);
|
||||
Data.Insert("Active", True);
|
||||
Data.Insert("Email", "mail@vector.ru");
|
||||
Data.Insert("Phone", "88005553535");
|
||||
Data.Insert("Status", "New");
|
||||
|
||||
Response = OPI_Notion.CreatePageInDatabase(Token, Base, Data);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreatePageInDatabase --token "secret_9RsfMrRMqZwqp0Zl0B..." --base "5dd94c34fab04bff9..." --data %data%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "03fd3bd2-6dd1-4ca2-bf85-9233748a745f",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/a574281614174169bf55dbae44f46d9c",
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": [
|
||||
{
|
||||
"external": {
|
||||
"url": "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg"
|
||||
},
|
||||
"type": "external",
|
||||
"name": "Logo"
|
||||
}
|
||||
],
|
||||
"type": "files",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": true,
|
||||
"type": "checkbox",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": "88005553535",
|
||||
"type": "phone_number",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": [],
|
||||
"type": "people",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "OurFirstClient",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "OurFirstClient"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
},
|
||||
"type": "select",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"number": 1,
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {
|
||||
"time_zone": null,
|
||||
"end": null,
|
||||
"start": "2024-01-26T09:45:00.000+00:00"
|
||||
},
|
||||
"type": "date",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "LLC Vector",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "LLC Vector"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "mail@vector.ru",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "mail@vector.ru"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"database_id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"type": "database_id"
|
||||
},
|
||||
"cover": null,
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T18:45:00.000Z",
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T18:45:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "a5742816-1417-4169-bf55-dbae44f46d9c",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Create page in database
|
||||
Creates a page in the parent database
|
||||
|
||||
|
||||
*Function CreatePageInDatabase(Val Token, Val Parent, Val Data) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --base | String | Parent database ID |
|
||||
| Data | --data | Key-Value Pair | Properties match |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
Image = New Map;
|
||||
Image.Insert("Logo", "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg");
|
||||
|
||||
Data = New Map;
|
||||
Data.Insert("Name", "LLC Vector");
|
||||
Data.Insert("Description", "OurFirstClient");
|
||||
Data.Insert("Number", 1);
|
||||
Data.Insert("Status", "Regular");
|
||||
Data.Insert("CreationDate", CurrentSessionDate());
|
||||
Data.Insert("Image", Image);
|
||||
Data.Insert("Active", True);
|
||||
Data.Insert("Email", "mail@vector.ru");
|
||||
Data.Insert("Phone", "88005553535");
|
||||
Data.Insert("Status", "New");
|
||||
|
||||
Response = OPI_Notion.CreatePageInDatabase(Token, Base, Data);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreatePageInDatabase --token "secret_9RsfMrRMqZwqp0Zl0B..." --base "5dd94c34fab04bff9..." --data %data%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "03fd3bd2-6dd1-4ca2-bf85-9233748a745f",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/a574281614174169bf55dbae44f46d9c",
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": [
|
||||
{
|
||||
"external": {
|
||||
"url": "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg"
|
||||
},
|
||||
"type": "external",
|
||||
"name": "Logo"
|
||||
}
|
||||
],
|
||||
"type": "files",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": true,
|
||||
"type": "checkbox",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": "88005553535",
|
||||
"type": "phone_number",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": [],
|
||||
"type": "people",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "OurFirstClient",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "OurFirstClient"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
},
|
||||
"type": "select",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"number": 1,
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {
|
||||
"time_zone": null,
|
||||
"end": null,
|
||||
"start": "2024-01-26T09:45:00.000+00:00"
|
||||
},
|
||||
"type": "date",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "LLC Vector",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "LLC Vector"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "mail@vector.ru",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "mail@vector.ru"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"database_id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"type": "database_id"
|
||||
},
|
||||
"cover": null,
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T18:45:00.000Z",
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T18:45:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "a5742816-1417-4169-bf55-dbae44f46d9c",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,94 +1,94 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create page
|
||||
Creates a child page above another parent page
|
||||
|
||||
|
||||
*Function CreatePage(Val Token, Val Parent, Val Title) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --page | String | Parent ID |
|
||||
| Title | --title | String | Page title |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
Title = "Created by 1C";
|
||||
|
||||
Response = OPI_Notion.CreatePage(Token, Parent, Title);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreatePage --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --title "Created by 1C"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "f145f634-ea3a-4f74-b079-f365ecbcf583",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/1-4392f919813c4c8d84017d973bddaabf",
|
||||
"properties": {
|
||||
"title": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "Created by 1C",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Created by 1C"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"cover": null,
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T17:20:00.000Z",
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T17:20:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "4392f919-813c-4c8d-8401-7d973bddaabf",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create page
|
||||
Creates a child page above another parent page
|
||||
|
||||
|
||||
*Function CreatePage(Val Token, Val Parent, Val Title) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Parent | --page | String | Parent ID |
|
||||
| Title | --title | String | Page title |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Parent = "5dd94c34fab04bff9...";
|
||||
Title = "Created by 1C";
|
||||
|
||||
Response = OPI_Notion.CreatePage(Token, Parent, Title);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion CreatePage --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --title "Created by 1C"
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "f145f634-ea3a-4f74-b079-f365ecbcf583",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/1-4392f919813c4c8d84017d973bddaabf",
|
||||
"properties": {
|
||||
"title": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "Created by 1C",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "Created by 1C"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"page_id": "5dd94c34-fab0-4bff-986b-7511c0779f77",
|
||||
"type": "page_id"
|
||||
},
|
||||
"cover": null,
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T17:20:00.000Z",
|
||||
"icon": null,
|
||||
"created_time": "2024-01-26T17:20:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "4392f919-813c-4c8d-8401-7d973bddaabf",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,215 +1,215 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Edit page properties.
|
||||
|
||||
|
||||
|
||||
*Function EditPageProperties(Val Token, Val Page, Val Data = "", Val Icon = "", Val Cover = "", Val Archived = False) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Page | --page | String | ID of the page being modified |
|
||||
| Data | --data | Key-Value Pair | Matching of editable parameters |
|
||||
| Icon | --icon | String | URL of the page icon image |
|
||||
| Cover | --cover | String | URL of the page cover image |
|
||||
| Archived | --archive | Boolean | Archive page or not (boolean) |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Page = "5dd94c34fab04bff9...";
|
||||
Icon = "https://opi.neocities.org/img/logo.png";
|
||||
Cover = "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png";
|
||||
|
||||
Properties = New Map;
|
||||
Properties.Insert("Active", False);
|
||||
Properties.Insert("Email", "vector@mail.ru");
|
||||
|
||||
Response = OPI_Notion.EditPageProperties(Token
|
||||
, Page
|
||||
, Properties
|
||||
, Icon
|
||||
, Cover
|
||||
, Archive);
|
||||
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion EditPageProperties --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --data %data% --icon "https://opi.neocities.org/img/logo.png" --cover "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png" --archive %archive%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "a02741b2-4eb8-43ae-9a2e-542d5dd10687",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/a574281614174169bf55dbae44f46d9c",
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": [
|
||||
{
|
||||
"external": {
|
||||
"url": "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg"
|
||||
},
|
||||
"type": "external",
|
||||
"name": "Logo"
|
||||
}
|
||||
],
|
||||
"type": "files",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": false,
|
||||
"type": "checkbox",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": "88005553535",
|
||||
"type": "phone_number",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": [],
|
||||
"type": "people",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "OurFirstClient",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "OurFirstClient"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
},
|
||||
"type": "select",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"number": 1,
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {
|
||||
"time_zone": null,
|
||||
"end": null,
|
||||
"start": "2024-01-26T09:45:00.000+00:00"
|
||||
},
|
||||
"type": "date",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "LLC Vector",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "LLC Vector"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "vector@mail.ru",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "vector@mail.ru"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"database_id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"type": "database_id"
|
||||
},
|
||||
"cover": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:30:00.000Z",
|
||||
"icon": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/img/logo.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"created_time": "2024-01-26T18:45:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "a5742816-1417-4169-bf55-dbae44f46d9c",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Edit page properties.
|
||||
|
||||
|
||||
|
||||
*Function EditPageProperties(Val Token, Val Page, Val Data = "", Val Icon = "", Val Cover = "", Val Archived = False) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Page | --page | String | ID of the page being modified |
|
||||
| Data | --data | Key-Value Pair | Matching of editable parameters |
|
||||
| Icon | --icon | String | URL of the page icon image |
|
||||
| Cover | --cover | String | URL of the page cover image |
|
||||
| Archived | --archive | Boolean | Archive page or not (boolean) |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Page = "5dd94c34fab04bff9...";
|
||||
Icon = "https://opi.neocities.org/img/logo.png";
|
||||
Cover = "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png";
|
||||
|
||||
Properties = New Map;
|
||||
Properties.Insert("Active", False);
|
||||
Properties.Insert("Email", "vector@mail.ru");
|
||||
|
||||
Response = OPI_Notion.EditPageProperties(Token
|
||||
, Page
|
||||
, Properties
|
||||
, Icon
|
||||
, Cover
|
||||
, Archive);
|
||||
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion EditPageProperties --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "5dd94c34fab04bff9..." --data %data% --icon "https://opi.neocities.org/img/logo.png" --cover "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png" --archive %archive%
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "a02741b2-4eb8-43ae-9a2e-542d5dd10687",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/a574281614174169bf55dbae44f46d9c",
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": [
|
||||
{
|
||||
"external": {
|
||||
"url": "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg"
|
||||
},
|
||||
"type": "external",
|
||||
"name": "Logo"
|
||||
}
|
||||
],
|
||||
"type": "files",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": false,
|
||||
"type": "checkbox",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": "88005553535",
|
||||
"type": "phone_number",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": [],
|
||||
"type": "people",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "OurFirstClient",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "OurFirstClient"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
},
|
||||
"type": "select",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"number": 1,
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {
|
||||
"time_zone": null,
|
||||
"end": null,
|
||||
"start": "2024-01-26T09:45:00.000+00:00"
|
||||
},
|
||||
"type": "date",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "LLC Vector",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "LLC Vector"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "vector@mail.ru",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "vector@mail.ru"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"database_id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"type": "database_id"
|
||||
},
|
||||
"cover": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:30:00.000Z",
|
||||
"icon": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/img/logo.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"created_time": "2024-01-26T18:45:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "a5742816-1417-4169-bf55-dbae44f46d9c",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,199 +1,199 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get page
|
||||
Gets information about the page by ID
|
||||
|
||||
|
||||
*Function GetPage(Val Token, Val Page) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Page | --page | String | Page ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Page = "a574281614174169bf55dbae4...";
|
||||
|
||||
Response = OPI_Notion.GetPage(Token, Page);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion GetPage --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "a574281614174169bf55dbae4..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "61eaaa91-41fc-4523-a445-602805afb281",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/a574281614174169bf55dbae44f46d9c",
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": [
|
||||
{
|
||||
"external": {
|
||||
"url": "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg"
|
||||
},
|
||||
"type": "external",
|
||||
"name": "Logo"
|
||||
}
|
||||
],
|
||||
"type": "files",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": false,
|
||||
"type": "checkbox",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": "88005553535",
|
||||
"type": "phone_number",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": [],
|
||||
"type": "people",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "OurFirstClient",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "OurFirstClient"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
},
|
||||
"type": "select",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"number": 1,
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {
|
||||
"time_zone": null,
|
||||
"end": null,
|
||||
"start": "2024-01-26T09:45:00.000+00:00"
|
||||
},
|
||||
"type": "date",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "LLC Vector",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "LLC Vector"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "vector@mail.ru",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "vector@mail.ru"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"database_id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"type": "database_id"
|
||||
},
|
||||
"cover": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:30:00.000Z",
|
||||
"icon": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/img/logo.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"created_time": "2024-01-26T18:45:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "a5742816-1417-4169-bf55-dbae44f46d9c",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Get page
|
||||
Gets information about the page by ID
|
||||
|
||||
|
||||
*Function GetPage(Val Token, Val Page) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| Page | --page | String | Page ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Page = "a574281614174169bf55dbae4...";
|
||||
|
||||
Response = OPI_Notion.GetPage(Token, Page);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion GetPage --token "secret_9RsfMrRMqZwqp0Zl0B..." --page "a574281614174169bf55dbae4..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "61eaaa91-41fc-4523-a445-602805afb281",
|
||||
"public_url": null,
|
||||
"url": "https://www.notion.so/a574281614174169bf55dbae44f46d9c",
|
||||
"properties": {
|
||||
"Image": {
|
||||
"files": [
|
||||
{
|
||||
"external": {
|
||||
"url": "https://pricep-farkop.ru/wp-content/uploads/2017/02/17.jpg"
|
||||
},
|
||||
"type": "external",
|
||||
"name": "Logo"
|
||||
}
|
||||
],
|
||||
"type": "files",
|
||||
"id": "r%3Dfa"
|
||||
},
|
||||
"Active": {
|
||||
"checkbox": false,
|
||||
"type": "checkbox",
|
||||
"id": "q%3FQF"
|
||||
},
|
||||
"Phone": {
|
||||
"phone_number": "88005553535",
|
||||
"type": "phone_number",
|
||||
"id": "hDII"
|
||||
},
|
||||
"User": {
|
||||
"people": [],
|
||||
"type": "people",
|
||||
"id": "%5D%40Md"
|
||||
},
|
||||
"Description": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "OurFirstClient",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "OurFirstClient"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "KnG%3F"
|
||||
},
|
||||
"Status": {
|
||||
"select": {
|
||||
"color": "green",
|
||||
"name": "New",
|
||||
"id": "202b1d30-2095-40f1-8b91-f627d475d560"
|
||||
},
|
||||
"type": "select",
|
||||
"id": "IDW%3C"
|
||||
},
|
||||
"Number": {
|
||||
"type": "number",
|
||||
"number": 1,
|
||||
"id": "CH__"
|
||||
},
|
||||
"CreationDate": {
|
||||
"date": {
|
||||
"time_zone": null,
|
||||
"end": null,
|
||||
"start": "2024-01-26T09:45:00.000+00:00"
|
||||
},
|
||||
"type": "date",
|
||||
"id": "BQN%5B"
|
||||
},
|
||||
"Name": {
|
||||
"title": [
|
||||
{
|
||||
"plain_text": "LLC Vector",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "LLC Vector"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "title",
|
||||
"id": "title"
|
||||
},
|
||||
"Email": {
|
||||
"rich_text": [
|
||||
{
|
||||
"plain_text": "vector@mail.ru",
|
||||
"annotations": {
|
||||
"color": "default",
|
||||
"code": false,
|
||||
"underline": false,
|
||||
"strikethrough": false,
|
||||
"italic": false,
|
||||
"bold": false
|
||||
},
|
||||
"text": {
|
||||
"link": null,
|
||||
"content": "vector@mail.ru"
|
||||
},
|
||||
"href": null,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "rich_text",
|
||||
"id": "%3CO%3AD"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"database_id": "048ba0ce-4f47-4e33-9005-40d249b01949",
|
||||
"type": "database_id"
|
||||
},
|
||||
"cover": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/assets/images/logo_long-e69f28017feff1759ffcfe3f4e7bbf2a.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"archived": false,
|
||||
"created_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"last_edited_time": "2024-01-26T19:30:00.000Z",
|
||||
"icon": {
|
||||
"external": {
|
||||
"url": "https://opi.neocities.org/img/logo.png"
|
||||
},
|
||||
"type": "external"
|
||||
},
|
||||
"created_time": "2024-01-26T18:45:00.000Z",
|
||||
"last_edited_by": {
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
},
|
||||
"id": "a5742816-1417-4169-bf55-dbae44f46d9c",
|
||||
"object": "page"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Page management",
|
||||
"position": "2"
|
||||
}
|
||||
{
|
||||
"label": "Page management",
|
||||
"position": "2"
|
||||
}
|
||||
|
@ -1,54 +1,54 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get user data
|
||||
Gets user data by ID
|
||||
|
||||
|
||||
*Function GetUserData(Val Token, Val UserID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| UserID | --user | String | Target user ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
UserID = "ed71865a989146bc86cdwdf24...";
|
||||
|
||||
Response = OPI_Notion.GetUserData(Token, UserID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion GetUserData --token "secret_9RsfMrRMqZwqp0Zl0B..." --user "ed71865a989146bc86cdwdf24..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "f33d34a8-f3cf-41b5-bdf5-4a07cf7d7118",
|
||||
"person": {
|
||||
"email": "ex@gmail.com"
|
||||
},
|
||||
"type": "person",
|
||||
"avatar_url": null,
|
||||
"name": "Bayselonarrend",
|
||||
"id": "ed71865a-9891-1111-86cd-1111111",
|
||||
"object": "user"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Get user data
|
||||
Gets user data by ID
|
||||
|
||||
|
||||
*Function GetUserData(Val Token, Val UserID) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
| UserID | --user | String | Target user ID |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
UserID = "ed71865a989146bc86cdwdf24...";
|
||||
|
||||
Response = OPI_Notion.GetUserData(Token, UserID);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion GetUserData --token "secret_9RsfMrRMqZwqp0Zl0B..." --user "ed71865a989146bc86cdwdf24..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "f33d34a8-f3cf-41b5-bdf5-4a07cf7d7118",
|
||||
"person": {
|
||||
"email": "ex@gmail.com"
|
||||
},
|
||||
"type": "person",
|
||||
"avatar_url": null,
|
||||
"name": "Bayselonarrend",
|
||||
"id": "ed71865a-9891-1111-86cd-1111111",
|
||||
"object": "user"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,74 +1,74 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# User list
|
||||
Returns a list of workspace users
|
||||
|
||||
|
||||
*Function UserList(Val Token) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Response = OPI_Notion.UserList(Token);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion UserList --token "secret_9RsfMrRMqZwqp0Zl0B..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "ea9a6b96-0b02-4866-a60a-2958e514af38",
|
||||
"user": {},
|
||||
"type": "user",
|
||||
"has_more": false,
|
||||
"next_cursor": null,
|
||||
"results": [
|
||||
{
|
||||
"person": {
|
||||
"email": "ex@gmail.com"
|
||||
},
|
||||
"type": "person",
|
||||
"avatar_url": null,
|
||||
"name": "Bayselonarrends",
|
||||
"id": "ed71865a-9891-1111-86cd-11111111",
|
||||
"object": "user"
|
||||
},
|
||||
{
|
||||
"type": "bot",
|
||||
"avatar_url": null,
|
||||
"name": "1C Integration",
|
||||
"bot": {
|
||||
"workspace_name": "Bayselonarrends Notion",
|
||||
"owner": {
|
||||
"workspace": true,
|
||||
"type": "workspace"
|
||||
}
|
||||
},
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
}
|
||||
],
|
||||
"object": "list"
|
||||
}
|
||||
|
||||
```
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# User list
|
||||
Returns a list of workspace users
|
||||
|
||||
|
||||
*Function UserList(Val Token) Export*
|
||||
|
||||
| Parameter | CLI option | Type | Destination |
|
||||
|-|-|-|-|
|
||||
| Token | --token | String | Token |
|
||||
|
||||
|
||||
Returns: Key-Value Pair - Serialized JSON response from Notion
|
||||
|
||||
```bsl title="Code example"
|
||||
|
||||
|
||||
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
||||
Response = OPI_Notion.UserList(Token);
|
||||
Response = OPI_Tools.JSONString(Response);
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```sh title="CLI command example"
|
||||
|
||||
oint notion UserList --token "secret_9RsfMrRMqZwqp0Zl0B..."
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
```json title="Result"
|
||||
|
||||
{
|
||||
"request_id": "ea9a6b96-0b02-4866-a60a-2958e514af38",
|
||||
"user": {},
|
||||
"type": "user",
|
||||
"has_more": false,
|
||||
"next_cursor": null,
|
||||
"results": [
|
||||
{
|
||||
"person": {
|
||||
"email": "ex@gmail.com"
|
||||
},
|
||||
"type": "person",
|
||||
"avatar_url": null,
|
||||
"name": "Bayselonarrends",
|
||||
"id": "ed71865a-9891-1111-86cd-11111111",
|
||||
"object": "user"
|
||||
},
|
||||
{
|
||||
"type": "bot",
|
||||
"avatar_url": null,
|
||||
"name": "1C Integration",
|
||||
"bot": {
|
||||
"workspace_name": "Bayselonarrends Notion",
|
||||
"owner": {
|
||||
"workspace": true,
|
||||
"type": "workspace"
|
||||
}
|
||||
},
|
||||
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0",
|
||||
"object": "user"
|
||||
}
|
||||
],
|
||||
"object": "list"
|
||||
}
|
||||
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Users",
|
||||
"position": "5"
|
||||
}
|
||||
{
|
||||
"label": "Users",
|
||||
"position": "5"
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"label": "Notion",
|
||||
"position": 6,
|
||||
"link": {
|
||||
"type": "doc",
|
||||
"id": "Notion"
|
||||
}
|
||||
}
|
||||
{
|
||||
"label": "Notion",
|
||||
"position": 6,
|
||||
"link": {
|
||||
"type": "doc",
|
||||
"id": "Notion"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user