Returns the model information for the specified model id.
GET /api/info/<int:modelid>Sample (prettified) Response:
{
"id": 423,
"title": "Eiffel Tower",
"lat": 48.8583,
"lon": 2.2945,
"desc": "A model of the world famous Eiffel Tower",
"tags": {
"shape": "pyramidal",
"building": "yes",
"tourism": "attraction",
}
"author": "n42k",
"date": "2017-03-28",
"categories": ["monuments", "tall"],
"comments": [
{
"author": "n42k",
"body": "I've technically been here!"
},
{
"author": "n42k",
"body": "test comment"
}
]
}
Returns a zip with the model of the specified model id.
GET /api/model/<int:modelid>Sample Response: a zip file.
Returns a listing of all the files present in the model zip.
GET /api/filelist/<int:modelid>Sample Response:
EiffelTowerLarge_copy.png
EiffelTowerLarge_copy_0.png
eiffel.mtl
eiffel.obj
et.jpg
Returns a file from the model zip.
GET /api/filelatest/<int:modelid>/<string:filename>Sample Response: a file.
Returns model ids that have the specified tag as one of their tags.
GET /api/tag/<string:tag>Sample Response:
[3, 5]
Returns model ids that have the specified category as one of their categories.
GET /api/category/<string:tag>Sample Response:
[6, 8]
Returns model ids that have the specified author as one of their categories.
GET /api/author/<string:username>Sample Response:
[6, 8]
Returns model ids that contain the specified string in their title.
GET /api/search/title/<string:title>Sample Response:
[2, 10, 17]
Returns model ids that have the specified category as one of their categories.
GET /api/search/<float:lat>/<float:lon>/<float:range>Sample Response:
[2, 10, 17]
Permits combining various criteria to find the exact kinds of models we need. Search query is sent in the request body. If any parameter is not specified, it's ignored and won't be filtered from the results.
Notes:
Live request body (try pressing Submit!):
Response:
(None yet)
Sample request body:
{
"lat": 48.8583,
"lon": 2.2945,
"range": 1000,
"title": "Eiffel",
"tags": {
"shape": "pyramidal",
"building": "yes"
},
"categories": [
"monuments",
"tall"
],
"page": 1,
"author": "n42k"
}
Sample Response:
[6, 8]
Sample request body with format attribute:
{
"lat": 48.8583,
"lon": 2.2945,
"range": 1000,
"format": ["id", "latitude", "longitude", "title"]
}
Sample Response:
[[1, 48.8583, 2.2945, "Eiffel Tower"], [64, 48.85831, 2.2945, "Near Eiffel Tower"]]