1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-10 04:18:47 +02:00
OpenIntegrations/docs/en/md/Neocities/Data-retrieving/Get-site-data.mdx

57 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-10-15 09:50:56 +02:00
---
2024-09-24 10:38:18 +02:00
sidebar_position: 1
---
2024-10-15 09:50:56 +02:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-09-24 10:38:18 +02:00
# Get site data
Gets information about a site by its name or token
`Function GetSiteData(Val Token, Val Website = "") Export`
2024-10-15 14:15:47 +02: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 10:38:18 +02:00
2024-10-09 08:42:00 +02:00
Returns: Map Of KeyAndValue - serialized JSON response from Neocities
2024-09-24 10:38:18 +02:00
<br/>
:::tip
Neocities API docs: [neocities.org/api](https://neocities.org/api)
:::
<br/>
2024-10-15 20:15:56 +02:00
```bsl title="1C:Enterprise/OneScript code example"
2024-09-24 10:38:18 +02:00
Token = "7419cd51de4037f7...";
Website = "2athenaeum";
Result = OPI_Neocities.GetSiteData(Token);
Result = OPI_Neocities.GetSiteData(Token, Website);
```
2024-10-15 08:53:37 +02:00
2024-09-24 10:38:18 +02:00
```json title="Result"
2024-09-24 14:43:51 +02:00
{
"result": "success",
"info": {
"sitename": "opi-test",
2024-10-09 08:42:00 +02:00
"views": 9086,
"hits": 17120,
2024-09-24 14:43:51 +02:00
"created_at": "Thu, 20 Jun 2024 07:28:29 -0000",
2024-10-09 08:42:00 +02:00
"last_updated": "Wed, 09 Oct 2024 06:27:52 -0000",
2024-09-24 14:43:51 +02:00
"domain": null,
"tags": []
}
}
2024-09-24 10:38:18 +02:00
```