diff options
author | xray7224 <xray7224@googlemail.com> | 2013-11-14 22:42:07 +0000 |
---|---|---|
committer | Jessica Tallon <jessica@megworld.co.uk> | 2014-07-22 23:13:15 +0100 |
commit | 247a3b788f3deea120c3f272eda7f7ce9ff54764 (patch) | |
tree | 74a2a4af48049d18e75953988a920c9f2eda657f /docs/source/api | |
parent | c64fc16b13c14d65544aa1185a457c5dee48b169 (diff) | |
download | mediagoblin-247a3b788f3deea120c3f272eda7f7ce9ff54764.tar.lz mediagoblin-247a3b788f3deea120c3f272eda7f7ce9ff54764.tar.xz mediagoblin-247a3b788f3deea120c3f272eda7f7ce9ff54764.zip |
Adds the unit-tests for API and cleans up API
Diffstat (limited to 'docs/source/api')
-rw-r--r-- | docs/source/api/images.rst | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/source/api/images.rst b/docs/source/api/images.rst new file mode 100644 index 00000000..6e4d3d48 --- /dev/null +++ b/docs/source/api/images.rst @@ -0,0 +1,41 @@ +.. MediaGoblin Documentation + + Written in 2011, 2012 by MediaGoblin contributors + + To the extent possible under law, the author(s) have dedicated all + copyright and related and neighboring rights to this software to + the public domain worldwide. This software is distributed without + any warranty. + + You should have received a copy of the CC0 Public Domain + Dedication along with this software. If not, see + <http://creativecommons.org/publicdomain/zero/1.0/>. + +================== +Uploading an Image +================== + +You must have fully authenticated with oauth to upload an image. + +The endpoint is: ``/api/user/<username>/uploads/`` (POST endpoint) + +There are four GET parameters available to use, if they're not specified the defaults (listed below) will be used, the parameters are: + ++-------------+-----------+---------------------+--------------------+ +| Parameter | Required | Default | Example | ++=============+===========+=====================+====================+ +| qqfile | No | unknown | my_picture.jpg | ++-------------+-----------+---------------------+--------------------+ +| title | No | <qqfile> | My Picture! | ++-------------+-----------+---------------------+--------------------+ +| description | No | None | My awesome picture | ++-------------+-----------+---------------------+--------------------+ +| licence | No | All rights reserved | CC BY-SA 3.0 | ++-------------+-----------+---------------------+--------------------+ + +*Note: licence is not part of the pump.io spec and is a GNU MediaGoblin specific parameter* + +Example URL (with parameters): /api/user/tsyesika/uploads/?qqfile=river.jpg&title=The%20River&description=The%20river%20that%20I%20use%20to%20visit%20as%20a%20child%20licence=CC%20BY-SA%203.0 + +Submit the binary image data in the POST parameter. + |