derpibooru / philomena

Next-generation imageboard
https://derpibooru.org/
GNU Affero General Public License v3.0
219 stars 56 forks source link

API documentation missing image fields. #162

Closed luckydonald closed 4 years ago

luckydonald commented 4 years ago

Describe the bug https://derpibooru.org/pages/api#image-response Is lacking the To Reproduce Steps to reproduce the behavior:

  1. Use the API to search for *
  2. Try to load the image object as documented

Expected behavior All fields are consumed when processing the ones in the documentation.

*Failing behavior Image's .size, .animated and .duration field is missing in the documentation.

Screenshots

image

Additional context derpi library: https://github.com/derpipy/derpi/issues/1

luckydonald commented 4 years ago

Would prepare a PR for you guys, but couldn't find the file for that.

luckydonald commented 4 years ago

Maybe something like

size Integer The image's file size in bytes.
animated Boolean Whether this image is animated.
duration Float Length of the animation. (Seems to always be set to `0.04` for images which aren't animated).
      <tr>
        <td><code>size</code></td>
        <td>Integer</td>
        <td>The image's file size in bytes.</td>
      </tr>
      <tr>
        <td><code>animated</code></td>
        <td>Boolean</td>
        <td>Whether this image is animated.</td>
      </tr>
      <tr>
        <td><code>duration</code></td>
        <td>Float</td>
        <td>Length of the animation. (Seems to always be set to `0.04` for images which aren't animated).</td>
      </tr>