jsonp interface to catgraph
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gpClient @ b3cf016
.gitignore
.gitmodules
LICENSE
README.md
catgraph-jsonp.conf
catgraph-jsonp.fcgi
config.json.example
gp
report.py

README.md

catgraph-jsonp

This is a JSONP interface to Catgraph. It is used by the 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
  • '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).