-
Notifications
You must be signed in to change notification settings - Fork 2
1.3 Search
Kelsier edited this page Feb 27, 2021
·
6 revisions
GET - /search
Searches for mods.
Content-Type: application/json
// Always Returned:
checksum: String, // The SHA256 checksum
name: String, // The name of the package
version: String, // The semver version of the package
description: String, // URL of the package documentation
verification: Verification, // Verification level Enum
files: String[], // List of download URIs
downloads: UnsignedInt, // The number of downloads
uploaded: String, // The rfc3339 version of the package
// Will not be sent if missing:
keywords: Option<String[]>, // List of keywords of the modExample:
[
{
"checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"name": "testing",
"version": "0.0.1-alpha.0",
"description": "testing",
"verification": "Manual",
"downloads": 41,
"uploaded": "2020-12-18T18:34:05.484383+00:00"
},
{
"checksum": "9dd189bf0b0e6e7a2ca60be5145b344bcc90203984433131abe44251d68e83de",
"name": "some_other_name2",
"version": "0.0.1-alpha.6",
"description": "testing",
"keywords": [
"some",
"poly",
"mod"
],
"verification": "None",
"downloads": 0,
"uploaded": "2020-12-28T22:32:31.217330+00:00"
}
]-
200There are mod results. -
204There's no mods found. -
400Invalid query parameters.
-
query:- String.
- Up to 64 characters.
- The search query.
- Default to Empty.
-
verification:- Enum String.
- Minimum verification level to show.
- Default to None.
-
keywords_only:- Boolean.
- Whether to only search the query for keywords.
- Incompatible with names_only.
- Default to False.
-
names_only:- Boolean.
- Whether to only search the query on names.
- Incompatible with keywords_only.
- Default to False.
-
sort_by:- SortBy enum.
- The key the results will sort to.
- Default to Name.
-
reverse:- Boolean.
- Whether to reverse the search or not.
- Default to False.
-
per_page:- Unsigned 8 bit integer. (min 1, max 255)
- The amount of results in a page.
- Default to 30.
-
before:- 64 hex characters String.
- SHA256.
- Show all results before this checksum.
- Default to null.
-
after:- 64 hex characters String.
- SHA256.
- Show all results after this checksum.
- Default to null.
SortBy Enum:
-
name: The name of the mod. -
downloads: The amount of downloads. -
uploaded: The upload date.
Verification Enum:
-
None: Not yet verified. -
Unsafe: Verified as not safe to use. -
Auto: Automatically verified. -
Manual: Manually verified. -
Core: A Core mod.
curl -i "http://5124.mywire.org:1232/public_api/search?sort_by=name&reverse=false&per_page=2"