2024-10-15 10:50:56 +03:00
|
|
|
---
|
2024-09-24 11:38:18 +03:00
|
|
|
sidebar_position: 4
|
|
|
|
---
|
|
|
|
|
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 list of files
|
|
|
|
Gets a list of files with or without directory selection
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Function GetFilesList(Val Token, Val Path = "") Export`
|
|
|
|
|
2024-10-15 15:15:47 +03:00
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|
|
|-|-|-|-|-|
|
|
|
|
| Token | --token | String | ✔ | Auth token |
|
|
|
|
| Path | --path | String | ✖ | Selection of files by catalog. All 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
|
2024-11-21 13:27:18 +03:00
|
|
|
Neocities API docs: [neocities.org/api](https://neocities.org/api)
|
2024-09-24 11:38:18 +03:00
|
|
|
:::
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
2024-12-16 19:38:57 +03:00
|
|
|
|
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...";
|
|
|
|
Path = "test";
|
|
|
|
|
|
|
|
Result = OPI_Neocities.GetFilesList(Token, Path);
|
2024-09-24 22:46:18 +03:00
|
|
|
|
|
|
|
Result = OPI_Neocities.GetFilesList(Token);
|
2024-09-24 11:38:18 +03:00
|
|
|
```
|
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 GetFilesList \
|
2024-10-22 08:59:24 +03:00
|
|
|
--token "***" \
|
|
|
|
--path "test"
|
2024-10-20 22:36:03 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
|
|
```batch
|
|
|
|
oint neocities GetFilesList ^
|
2024-10-22 08:59:24 +03:00
|
|
|
--token "***" ^
|
|
|
|
--path "test"
|
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",
|
|
|
|
"files": [
|
|
|
|
{
|
2024-10-06 16:55:08 +03:00
|
|
|
"path": "test/gif.gif",
|
2024-09-24 15:43:51 +03:00
|
|
|
"is_directory": false,
|
2024-10-06 16:55:08 +03:00
|
|
|
"size": 805189,
|
2024-10-09 09:42:00 +03:00
|
|
|
"created_at": "Wed, 09 Oct 2024 06:27:52 -0000",
|
|
|
|
"updated_at": "Wed, 09 Oct 2024 06:27:52 -0000",
|
2024-10-06 16:55:08 +03:00
|
|
|
"sha1_hash": null
|
2024-09-24 15:43:51 +03:00
|
|
|
},
|
|
|
|
{
|
2024-10-06 16:55:08 +03:00
|
|
|
"path": "test/pic1.png",
|
2024-09-24 15:43:51 +03:00
|
|
|
"is_directory": false,
|
2024-10-06 16:55:08 +03:00
|
|
|
"size": 2114023,
|
2024-10-09 09:42:00 +03:00
|
|
|
"created_at": "Wed, 09 Oct 2024 06:27:52 -0000",
|
|
|
|
"updated_at": "Wed, 09 Oct 2024 06:27:52 -0000",
|
2024-10-06 16:55:08 +03:00
|
|
|
"sha1_hash": null
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2024-09-24 11:38:18 +03:00
|
|
|
```
|