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:

  1. uri: Internet uri of image collected (Required)
  2. from: page url which image is collected (Required)
  3. tags: image tags which user chooses (Optional)
  4. description: user description of the image (Optional)
    Return: Empty successful response
    Exception:
  5. 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:

  1. tags: image tags which user chooses (Optional)
  2. description: user description of the image (Optional)
    File Parameters:
  3. image_upload: image file (Required)
    Return: Empty successful response
    Exception:
  4. 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:

  1. pre: id of last image item in current page, used to get next page (Optional)
  2. 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:
  3. Error Code 400003: 'pre' must be a string of 24 hex characters.
  4. Error Code 400005: 'next' must be a string of 24 hex characters.