mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-18 03:07:51 +01:00
updated webapi docs
This commit is contained in:
@@ -75,6 +75,11 @@ These are the functions provided by the API:
|
||||
|
||||
/merge/directory List all recent files shared by peers based
|
||||
on the similar file shared
|
||||
/warehouse/create/uploadID Generates a UUID to track upload status
|
||||
/warehouse/create/track/uploadID Tracks upload status when a upload is
|
||||
ongoing to the warehaouse (Triggers after
|
||||
the route "/warehouse/create" is called).
|
||||
|
||||
```
|
||||
|
||||
# API Documentation
|
||||
@@ -277,29 +282,30 @@ The file type is an indication what type of content the file's data is:
|
||||
|
||||
The file format is a more granular indicator about the content of a file:
|
||||
|
||||
| Type | Constant | Info |
|
||||
| ---- | ---------------- | --------------------------------------------------- |
|
||||
| 0 | FormatBinary | Binary/unspecified |
|
||||
| 1 | FormatPDF | PDF document |
|
||||
| 2 | FormatWord | Word document |
|
||||
| 3 | FormatExcel | Excel |
|
||||
| 4 | FormatPowerpoint | Powerpoint |
|
||||
| 5 | FormatPicture | Pictures (including GIF, excluding icons) |
|
||||
| 6 | FormatAudio | Audio files |
|
||||
| 7 | FormatVideo | Video files |
|
||||
| Type | Constant | Info |
|
||||
|------| ---------------- |----------------------------------------------------|
|
||||
| 0 | FormatBinary | Binary/unspecified |
|
||||
| 1 | FormatPDF | PDF document |
|
||||
| 2 | FormatWord | Word document |
|
||||
| 3 | FormatExcel | Excel |
|
||||
| 4 | FormatPowerpoint | Powerpoint |
|
||||
| 5 | FormatPicture | Pictures (including GIF, excluding icons) |
|
||||
| 6 | FormatAudio | Audio files |
|
||||
| 7 | FormatVideo | Video files |
|
||||
| 8 | FormatContainer | Compressed files including ZIP, RAR, TAR and others |
|
||||
| 9 | FormatHTML | HTML file |
|
||||
| 10 | FormatText | Text file |
|
||||
| 11 | FormatEbook | Ebook file |
|
||||
| 12 | FormatCompressed | Compressed file |
|
||||
| 13 | FormatDatabase | Database file |
|
||||
| 14 | FormatEmail | Single email |
|
||||
| 15 | FormatCSV | CSV file |
|
||||
| 16 | FormatFolder | Virtual folder |
|
||||
| 17 | FormatExecutable | Executable file |
|
||||
| 18 | FormatInstaller | Installer |
|
||||
| 19 | FormatAPK | APK |
|
||||
| 20 | FormatISO | ISO |
|
||||
| 9 | FormatHTML | HTML file |
|
||||
| 10 | FormatText | Text file |
|
||||
| 11 | FormatEbook | Ebook file |
|
||||
| 12 | FormatCompressed | Compressed file |
|
||||
| 13 | FormatDatabase | Database file |
|
||||
| 14 | FormatEmail | Single email |
|
||||
| 15 | FormatCSV | CSV file |
|
||||
| 16 | FormatFolder | Virtual folder |
|
||||
| 17 | FormatExecutable | Executable file |
|
||||
| 18 | FormatInstaller | Installer |
|
||||
| 19 | FormatAPK | APK |
|
||||
| 20 | FormatISO | ISO |
|
||||
| 21 | FormatPeernetSearch | File type to store peernet search history |
|
||||
|
||||
### Add File
|
||||
|
||||
@@ -629,7 +635,6 @@ These are the available sort options:
|
||||
| 8 | SortSizeDesc | File size descending. Largest files first. |
|
||||
| 9 | SortSharedByCountAsc | Shared by count ascending. Files that are shared by the least count of peers first. |
|
||||
| 10 | SortSharedByCountDesc | Shared by count descending. Files that are shared by the most count of peers first. |
|
||||
| 11 | Node | Only provide files of a search term based on the NodeID provided |
|
||||
|
||||
|
||||
The following filters are supported:
|
||||
@@ -1031,7 +1036,8 @@ type WarehouseResult struct {
|
||||
Example POST request to `http://127.0.0.1:112/warehouse/create`:
|
||||
|
||||
```
|
||||
Test file.
|
||||
--form 'id="<uuid>"' \
|
||||
--form 'File=@"<file path>"'
|
||||
```
|
||||
|
||||
Example response:
|
||||
|
||||
Reference in New Issue
Block a user