From 247a3b788f3deea120c3f272eda7f7ce9ff54764 Mon Sep 17 00:00:00 2001 From: xray7224 Date: Thu, 14 Nov 2013 22:42:07 +0000 Subject: Adds the unit-tests for API and cleans up API --- docs/source/api/images.rst | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/source/api/images.rst (limited to 'docs/source/api') 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 + . + +================== +Uploading an Image +================== + +You must have fully authenticated with oauth to upload an image. + +The endpoint is: ``/api/user//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 | | 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. + -- cgit v1.2.3