{ "info": { "author": "Alessandro Molina", "author_email": "alessandro.molina@axant.it", "bugtrack_url": null, "classifiers": [], "description": "=========================\nJSON Call\n=========================\n\nAbout\n=======\n\nThis extension adds a simple button to perform test calls to\nJSON based apis making also possible to change parameters\nvalues through a set of input fields.\n\nThe resulting JSON response from the API will be displayed\nunder the call button in a block as prettyfied and highlighted\nJSON.\n\nIt is meant to be used in conjunction with the ``sphinxcontrib.httpdomain``\nextension to document APIs and provide a way to play with them.\n\n .. image:: https://raw.github.com/amol-/sphinxcontrib.jsoncall/master/example.png\n\nCORS\n--------\n\nKeep in mind that the requests are performed using an ajax call\nso it is required that the documentation and the API server\nare on same domain, or that the API server provides a **Access-Control-Allow-Origin**\nheader\n\nUsage\n========\n\nFirst you must add the extension to your list of extensions in conf.py::\n\n extensions = ['sphinxcontrib.httpdomain', 'sphinxcontrib.jsoncall']\n\nNow simply providing the base url for your api calls is enough\nto start using the jsoncall directive::\n\n jsoncall_baseurl = 'http://somwhere.com/api'\n\nDirectives\n=============\n\nThis module defines a directive, `jsoncall` this directive takes\na single required argument which is the url of the API relative\nto the ``jsoncall_baseurl``::\n\n .. jsoncall:: /publicapitest\n\nIt is also possible to provide a bunch of arguments to the API call\nthrough the content of the directive. The content itself needs\nto be a JSON dictionary with all the parameters.\n\nSupposing we have a */movies/retrieve?id=movieid* API it would\nbe possible to test it with::\n\n .. jsoncall:: /movies/retrieve\n\n {\"id\": \"505c6a9d93681621aa0000fe\"}\n\nThis will also add an **id** input field which makes possible\nto modify the id value to try with different api calls.\n\nIt is possible to manually insert a response in the response field, just write\nit under the input fields::\n\n .. jsoncall:: /movies/retrieve\n\n {\"id\": \"505c6a9d93681621aa0000fe\"}\n\n {\"title\": \"The Hitchhiker's Guide to the Galaxy\"}\n\n\nSTYLING\n============\n\nThe extension provides a default CSS file which can be disabled\nusing the ``jsoncall_inject_css`` option.\n\n\n==================\nTGJSonAutodoc\n==================\n\nThis module provides a `tgjsonautodoc` directive inside the ``sphinxcontrib.tgjsonautodoc``\nwhich given a TurboGears2 application automatically inspects it looking for\ncontrollers that ``@expose`` a json template and documents their path,\ntheir arguments and validators. The docstring of the method is treated\nas the *sphinx* paragraph for that specific method.\n\nBy default if no ``.. jsoncall::`` directive is found inside the\ndocstring one is automatically generated.\n\nUsing TGJsonAutodoc\n=====================\n\nTo start using tgjsonautoc directive simply add to your ``conf.py`` the\nfollowing extensions::\n\n extensions = ['sphinxcontrib.httpdomain', 'sphinxcontrib.jsoncall', 'sphinxcontrib.tgjsonautodoc']\n\nthen you must specify the PasteDeploy compatible configuration file\nfrom where your application has to be loaded::\n\n tgjsonautodoc_app = '/home/myuser/myproject/development.ini'\n\nthen where you want to generate the documentation for all the found \nmethods::\n\n .. tgjsonautodoc::", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/amol-/sphinxcontrib.jsoncall", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "sphinxcontrib-jsoncall", "package_url": "https://pypi.org/project/sphinxcontrib-jsoncall/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sphinxcontrib-jsoncall/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/amol-/sphinxcontrib.jsoncall" }, "release_url": "https://pypi.org/project/sphinxcontrib-jsoncall/0.3/", "requires_dist": null, "requires_python": null, "summary": "Sphinx extension that adds a simple button to perform test calls to JSON based apis", "version": "0.3" }, "last_serial": 1098099, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "524a3c7803b046053d7a4a4c478f0493", "sha256": "bf843ec1e57b13a823cdedb0003bb447087e9709c85c76b958534a8a185b7579" }, "downloads": -1, "filename": "sphinxcontrib-jsoncall-0.1.tar.gz", "has_sig": false, "md5_digest": "524a3c7803b046053d7a4a4c478f0493", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6953, "upload_time": "2013-07-02T22:21:41", "url": "https://files.pythonhosted.org/packages/8d/e1/ce0dd3fb0725d422c6423f4c0aae0d0be1798ff941dd13158e27b8c50076/sphinxcontrib-jsoncall-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8acfa9f2fc5bfe1e0cab760bd20cb154", "sha256": "435035b121b3678d2cfc53923b1f840dd25387f48692813faad868f184b68e0a" }, "downloads": -1, "filename": "sphinxcontrib-jsoncall-0.2.tar.gz", "has_sig": false, "md5_digest": "8acfa9f2fc5bfe1e0cab760bd20cb154", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7339, "upload_time": "2013-12-11T11:57:46", "url": "https://files.pythonhosted.org/packages/f6/f9/b70b55aff3013e03bf9961cf7c56991b6f84e548f4d0509e34e9a20d5ac3/sphinxcontrib-jsoncall-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1c5a43a6fd17a65b096c6480f985270a", "sha256": "ad50ff4ff651a8712faee19f3d04d13db2a2d107d97ac57fcbe90b6f985ff177" }, "downloads": -1, "filename": "sphinxcontrib-jsoncall-0.3.tar.gz", "has_sig": false, "md5_digest": "1c5a43a6fd17a65b096c6480f985270a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7872, "upload_time": "2014-05-20T09:09:30", "url": "https://files.pythonhosted.org/packages/72/41/483b561f73eca3a66479a79101e4ba0ef212b69d21921185eecde2635614/sphinxcontrib-jsoncall-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c5a43a6fd17a65b096c6480f985270a", "sha256": "ad50ff4ff651a8712faee19f3d04d13db2a2d107d97ac57fcbe90b6f985ff177" }, "downloads": -1, "filename": "sphinxcontrib-jsoncall-0.3.tar.gz", "has_sig": false, "md5_digest": "1c5a43a6fd17a65b096c6480f985270a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7872, "upload_time": "2014-05-20T09:09:30", "url": "https://files.pythonhosted.org/packages/72/41/483b561f73eca3a66479a79101e4ba0ef212b69d21921185eecde2635614/sphinxcontrib-jsoncall-0.3.tar.gz" } ] }