Skip to content

Commit 13dcf22

Browse files
committed
Merge readme from web interface
2 parents f9016ce + e82fdd4 commit 13dcf22

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# catgraph-jsonp
2+
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).
3+
4+
<h3>Usage</h3>
5+
Do a JSONP request to http://tools.wmflabs.org/catgraph-jsonp/GRAPHNAME/COMMAND?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:
6+
* 'status' is the [graphserv response](https://github.com/wmde/graphcore/blob/master/spec.rst#responses)
7+
* 'statusMessage' contains the rest of the graphserv status message if present
8+
* 'result' contains any graphcore result rows converted to arrays
9+
10+
Example: Get the root categories (categories without a parent category) of frwiki. http://tools.wmflabs.org/catgraph-jsonp/frwiki_ns14/list-roots?callback=dostuff
11+
12+
http://tools.wmflabs.org/catgraph-jsonp is configured to return at most 500 result rows, larger results are truncated.

0 commit comments

Comments
 (0)