1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-07 07:10:01 +02:00
Vitaly the Alpaca (bot) aab8f43a6e Main build (Jenkins)
2024-11-21 13:27:18 +03:00

75 lines
1.5 KiB
Plaintext

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