Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Routes Account needed

Michael edited this page Jan 10, 2019 · 3 revisions

This page contains all the routes available to regular users that require authentication.

NOTE: Authentication is done by having an Authentication header with a valid token, or with a Authentication cookie with a valid token.
Incorrect information will return a 403 FORBIDDEN

Mods

Method Route Action Returns Expected Data
POST /api/v1/mods Uploads and registers a mod 200 OK - The mod has been registered and data has been returned
400 BAD REQUEST - The mod had no file zipfle multipart content
400 BAD REQUEST - POST request was missing a parameter, see reponse for more information
{ 
    "title": "mod name", 
    "authors": ["author_id", "author_id"], 
    "tagline": "short description of the mod", 
    "description": "long description of the mod", 
    "website": "website for more info about the mod" 
    // OPTIONAL: 
    "icon": "URL to an icon image", 
    "status": "development status of the mod" 
}
+ A multipart zipfile file
PATCH /api/v1/mods/ Edits a mod 200 OK - The mod has been edited and data has been returned
400 BAD REQUEST - The mod had no file zipfle multipart content
404 NOT FOUND - A mod with id mod_id was not found on the server
{
    // ALL OPTIONAL
    "title": "mod name",
    "authors": ["author_id", "author_id"],
    "tagline": "short description of the mod",
    "description": "long description of the mod",
    "website": "website for more info about the mod"
    "icon": "URL to an icon image",
    "status": "development status of the mod"
}
+ A multipart zipfile file
POST /api/v1/mods//reviews Create a review 200 OK - A review was placed
400 BAD REQUEST - A POST parameter was missing from the request body
404 NOT FOUND - A mod with id mod_id was not found on the server
{
    "author": "your username",
    "content": "review content",
    "rating": 5  // Integer between 0 and 5
}
Clone this wiki locally