API Documents - ZJUCST/Phoenix GitHub Wiki
Collect Image
Description: for user to collect images from outside of our website
URL: /collect/image
Method: POST
Form Parameters:
- uri: Internet uri of image collected (Required)
- from: page url which image is collected (Required)
- tags: image tags which user chooses (Optional)
- description: user description of the image (Optional)
Return: Empty successful response
Exception: - Error Code 400004: Some parameters are missing.
Post Image
Description: for user to post image to our site
URL: /post/image
Method: POST
Form Parameters:
- tags: image tags which user chooses (Optional)
- description: user description of the image (Optional)
File Parameters: - image_upload: image file (Required)
Return: Empty successful response
Exception: - Error Code 400004: Some parameters are missing.
Get Images
Description: for user to get a page of images
URL: /get/image
Method: GET
URL Parameters:
- pre: id of last image item in current page, used to get next page (Optional)
- next: id of first image item in current page, used to get pre page (Optional)
if 'pre' and 'next' parameters are both not defined, return the first page of images
Return: A page of image objects in json format
Exception: - Error Code 400003: 'pre' must be a string of 24 hex characters.
- Error Code 400005: 'next' must be a string of 24 hex characters.