1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-23 12:18:48 +02:00
Vitaly the Alpaca (bot) 4de7fa4268 Main build (Jenkins)
2024-12-16 19:38:57 +03:00

85 lines
1.7 KiB
Plaintext
Vendored

---
sidebar_position: 4
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get list of files
Gets a list of files with or without directory selection
`Function GetFilesList(Val Token, Val Path = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Auth token |
| Path | --path | String | ✖ | Selection of files by catalog. All 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...";
Path = "test";
Result = OPI_Neocities.GetFilesList(Token, Path);
Result = OPI_Neocities.GetFilesList(Token);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint neocities GetFilesList \
--token "***" \
--path "test"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint neocities GetFilesList ^
--token "***" ^
--path "test"
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": "success",
"files": [
{
"path": "test/gif.gif",
"is_directory": false,
"size": 805189,
"created_at": "Wed, 09 Oct 2024 06:27:52 -0000",
"updated_at": "Wed, 09 Oct 2024 06:27:52 -0000",
"sha1_hash": null
},
{
"path": "test/pic1.png",
"is_directory": false,
"size": 2114023,
"created_at": "Wed, 09 Oct 2024 06:27:52 -0000",
"updated_at": "Wed, 09 Oct 2024 06:27:52 -0000",
"sha1_hash": null
}
]
}
```