2024-06-05 10:19:46 +00:00
|
|
|
---
|
|
|
|
sidebar_position: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# Get user data
|
|
|
|
Gets user data by ID
|
|
|
|
|
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
`Function GetUserData(Val Token, Val UserID) Export`
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| UserID | --user | String | Target user ID |
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from Notion
|
2024-06-05 10:19:46 +00:00
|
|
|
|
2024-07-10 14:05:58 +03:00
|
|
|
<br/>
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 10:19:46 +00:00
|
|
|
```bsl title="Code example"
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
Token = "secret_9RsfMrRMqZwqp0Zl0B...";
|
|
|
|
UserID = "ed71865a989146bc86cdwdf24...";
|
|
|
|
|
|
|
|
Response = OPI_Notion.GetUserData(Token, UserID);
|
|
|
|
Response = OPI_Tools.JSONString(Response);
|
2024-06-05 10:19:46 +00:00
|
|
|
```
|
2024-08-13 15:52:26 +03:00
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-06-05 10:19:46 +00:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
oint notion GetUserData --token "secret_9RsfMrRMqZwqp0Zl0B..." --user "ed71865a989146bc86cdwdf24..."
|
2024-06-05 10:19:46 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-08-14 09:06:31 +03:00
|
|
|
{
|
2024-08-13 15:52:26 +03:00
|
|
|
"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"
|
|
|
|
}
|
2024-06-05 10:19:46 +00:00
|
|
|
```
|