https://github.com/wmde/catgraph-jsonp
[DISCONTINUED] jsonp interface to catgraph
https://github.com/wmde/catgraph-jsonp
Last synced: 3 months ago
JSON representation
[DISCONTINUED] jsonp interface to catgraph
- Host: GitHub
- URL: https://github.com/wmde/catgraph-jsonp
- Owner: wmde
- License: gpl-3.0
- Created: 2015-04-22T19:01:11.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-21T12:43:45.000Z (over 7 years ago)
- Last Synced: 2024-11-27T20:20:28.244Z (5 months ago)
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 4
- Watchers: 19
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# catgraph-jsonp
This is a JSONP interface to [Catgraph](https://wikitech.wikimedia.org/wiki/Nova_Resource:Catgraph/Documentation). It is used by the [DeepCat Gadget](https://github.com/wmde/DeepCat-Gadget).## Usage
Do a JSONP request to http://tools.wmflabs.org/catgraph-jsonp/GRAPHNAME/COMMAND?userparam=PARAM&callback=YOURFUNCTION where COMMAND is the graphcore command to execute on GRAPHNAME. YOURFUNCTION is your JSONP callback. It will be called with a dict with the following fields:
* 'status' is the [graphserv response](https://github.com/wmde/graphcore/blob/master/spec.rst#responses)
* 'statusMessage' contains the rest of the graphserv status message if present
* 'result' contains any graphcore result rows converted to arrays
* 'userparam' reflects the corresponding cgi parameter (optional).Example: Get the root categories (categories without a parent category) of frwiki. http://tools.wmflabs.org/catgraph-jsonp/frwiki_ns14/list-roots?callback=dostuff
http://tools.wmflabs.org/catgraph-jsonp is configured to return at most 500 result rows, larger results are truncated.
## Issue tracker
Please file bugs and feature requests on [Phabricator] (https://phabricator.wikimedia.org/maniphest/task/create/?projects=tcb-team,catgraph&title=%5BCatGraph-jsonp%5D).