1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-25 12:24:39 +02:00

75 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-09-24 11:38:18 +03:00
sidebar_position: 1
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-09-24 11:38:18 +03:00
# Get site data
Gets information about a site by its name or token
`Function GetSiteData(Val Token, Val Website = "") Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Auth token |
| Website | --sitename | String | ✖ | Site name (login) for information. Current, if not filled in |
2024-09-24 11:38:18 +03:00
2024-10-09 09:42:00 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Neocities
2024-09-24 11:38:18 +03:00
<br/>
:::tip
Neocities API docs: [neocities.org/api](https://neocities.org/api)
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-09-24 11:38:18 +03:00
Token = "7419cd51de4037f7...";
Website = "2athenaeum";
Result = OPI_Neocities.GetSiteData(Token);
Result = OPI_Neocities.GetSiteData(Token, Website);
```
2024-10-15 09:53:37 +03:00
2024-09-24 11:38:18 +03:00
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint neocities GetSiteData \
2024-10-22 08:59:24 +03:00
--token "***" \
--sitename "2athenaeum"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint neocities GetSiteData ^
2024-10-22 08:59:24 +03:00
--token "***" ^
--sitename "2athenaeum"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-09-24 11:38:18 +03:00
```json title="Result"
2024-09-24 15:43:51 +03:00
{
"result": "success",
"info": {
"sitename": "opi-test",
2024-10-09 09:42:00 +03:00
"views": 9086,
"hits": 17120,
2024-09-24 15:43:51 +03:00
"created_at": "Thu, 20 Jun 2024 07:28:29 -0000",
2024-10-09 09:42:00 +03:00
"last_updated": "Wed, 09 Oct 2024 06:27:52 -0000",
2024-09-24 15:43:51 +03:00
"domain": null,
"tags": []
}
}
2024-09-24 11:38:18 +03:00
```