-
Notifications
You must be signed in to change notification settings - Fork 2
1.2 Get Mod
Kelsier edited this page Feb 27, 2021
·
4 revisions
GET - /get_mod
Obtains a mod information and metadata.
Content-Type: application/json
// Always Returned:
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
// At least 1 or both will be present
// Both are git URIs
repository_git: Option<String>, // Git repo
repository_hg: Option<String>, // Mercurial repo
// Will not be sent if missing
authors: Option<String[]>, // List of authors
documentation: Option<String>, // The documentation URL
homepage: Option<String>, // The homepage URL,
readme: Option<String>, // The readme Markup text
license: Option<String>, // An OSI compatible license
keywords: Option<String[]>, // List of keywords of the mod
build_script: Option<String>, // Shell script to build the mod
metadata: Option<String[]>, // Additional metadataExample:
{
"name": "some_other_name",
"version": "0.0.1-alpha.1",
"description": "testing",
"verification": "None",
"files": [
"/public_api/download/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"/public_api/download/7dc23e48f8d020c9dea112e24eaef09c152728292648573f3b26963e57233391"
],
"downloads": 0,
"uploaded": "2020-12-18T23:40:40.644192+00:00",
"repository_git": "https://example.com/testing.git",
"authors": [
"<nitsuga5124 nitsuga5124@gmail.com>"
],
"documentation": "https://docs.rs/",
"readme": "#some text\n- oh wow\n-yeah",
"homepage": "https://5124.mywire.org/",
"license": "MPL-v2.0",
"keywords": [
"some",
"poly",
"mod"
],
"build_script": "#!/bin/bash\ndotnet build",
"metadata": [
"hi!!!"
]
}-
200The mod exists and the request is successful. -
204There's no mod with the current information. -
400Invalid semver.
-
name:- String.
- The name of the mod.
- This value can be obtained via
/search
-
version:- Semver String.
- The match of the version to get. (TIP: append = at the start to get the exact same version)
- Default to latest version.
-
verification:- Enum String.
- Minimum verification level to show.
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/get_mod?name=some_other_name&version=0.0.1-alpha.0&verification=Manual