-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
Jevex edited this page May 25, 2022
·
1 revision
Searches the CTM Repository for maps that best match the given query.
GET /search/maps?q={query}{&page,perPage,strict}
| Parameter | Type | Requirement Type | Description |
|---|---|---|---|
q |
string | Required | The search query string |
page |
integer | Optional | The page number of results to return [Default: 1] |
perPage |
integer | Optional | A number of results to return per page [Default: 1] [Range: 1-100] |
strict |
boolean | Optional | When false, search will also return close matches [Default: true] |
GET http://localhost:8080/search/maps?q=divinity&page=1&perPage=1
{
"maxPage": 1,
"data": [
{
"id": 2,
"name": "Divinity's End",
"author": "The DE Team",
"series": "Pantheon",
"length": "Long",
"difficulty": "Medium",
"descriptionShort": "Divinity's End is a massive collaborative CTM map...",
"downloadCount": 21850,
"type": "Branching",
"imageUrl": "/images/div.webp",
"minecraftVersion": "1.16.5",
"published": true,
"upload_date": 0,
"objectiveMain": 13,
"objectiveBonus": 16
}
]
}This request queries a single map specified by id.
GET /map/{id}
| Parameter | Type | Requirement Type | Description |
|---|---|---|---|
id |
integer | Required | The database identifier for the requested map |
GET http://localhost:8080/maps/1
{
"id": 1,
"name": "Moonlight",
"author": "The CTMC",
"series": "Rookiewreck",
"length": "Long",
"difficulty": "Medium",
"descriptionShort": "Moonlight is the lovechild of the Rookiewreck mapping event...",
"downloadCount": 899,
"type": "Linear Branching",
"imageUrl": "/images/5886020644119590.webp",
"minecraftVersion": "1.17.1",
"uploadDate": 0,
"objectiveMain": 17,
"objectiveBonus": 54
}