Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Commit

Permalink
fix documentation #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mshd committed Sep 26, 2020
1 parent b5e4a09 commit 56853b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ app.get('/api/image/info/:id(\\d+)', imageController.imageInfo);
const v1ImageController = require('./controllers/api/v1image');

app.get('/api/v1/image/:type/id/:id(\\d+)', v1ImageController.showImageById);
app.get('/api/v1/image/:type/wikidata/:id(\\d+)' , v1ImageController.showImageByWikidata);
app.get('/api/v1/image/info/wikidata/:id(\\d+)' , v1ImageController.imageInfo);
app.get('/api/v1/image/:type/wikidata/:id(\\d+)' , v1ImageController.showImageByWikidata);

// app.route('/images')
// .get(imageController.getBooks)
Expand Down
14 changes: 8 additions & 6 deletions views/home.pug
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ block content
p Here you can upload pictures of Wikidata items, usually people. All images will be cropped using smart-crop to a resolution of 200 x 200 pixels. So it's best if you upload square photos.
hr

h3 Request an image
h3 API version 1: Request an image
div
span Please use a valid Wikidata item id, without the Q. The returned image will be thumbnail with dimensions 200 x 200 pixels.
ul
li
a(href='/api/image/info/4115189') /api/image/info/$ID
small(style='margin-left:10px') Get Json info about a file
a(href='/api/v1/image/info/wikidata/4115189') /api/v1/image/info/wikidata/$ID
small(style='margin-left:10px') Get Json info about a file, $ID wikidata entity ID
li
a(href='/api/getImage/4115189') /api/getImage/$ID
small(style='margin-left:10px') Get an image (return 404 on error)

a(href='/api/v1/image/thumbnail/wikidata/4115189') /api/v1/image/thumbnail/wikidata/4115189
small(style='margin-left:10px') Get an image using smartcrop (returns 404 on error)
li
a(href='/api/v1/image/facecrop/wikidata/4115189') /api/v1/image/facecrop/wikidata/4115189
small(style='margin-left:10px') Get an image using facecrop (returns 404 on error)
//.row
// .col-md-6
// h2 Heading
Expand Down

0 comments on commit 56853b9

Please sign in to comment.