aurweb/doc/rpc.txt
Lukas Fleischer 1f6237ffa7 aurjson: Rename the search_by parameter to "by"
This parameter is only supported by the search command. We do not need
to repeat ourselves.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-09 17:35:51 +02:00

39 lines
1.2 KiB
Text

aurweb RPC Interface
====================
Package Search
--------------
Package searches can be performed by issuing HTTP GET requests of the form
+/rpc/?v=5&type=search&by=_field_&arg=_keywords_+ where _keywords_ is the
search argument and _field_ is one of the following values:
* `name` (search by package name only)
* `name-desc` (search by package name and description)
* `maintainer` (search by package maintainer)
The _by_ parameter can be skipped and defaults to `name-desc`.
If a maintainer search is performed and the search argument is left empty, a
list of orphan packages is returned.
Package Details
---------------
Package information can be obtained by issuing HTTP GET requests of the form
+/rpc/?v=5&type=info&arg[]=_pkg1_&arg[]=_pkg2_&...+ where _pkg1_, _pkg2_, ...
are the names of packages to retrieve package details for.
Examples
--------
`search`::
`/rpc/?v=5&type=search&arg=foobar`
`search` by maintainer::
`/rpc/?v=5&type=search&search_by=maintainer&arg=john`
`search` with callback::
`/rpc/?v=5&type=search&arg=foobar&callback=jsonp1192244621103`
`info`::
`/rpc/?v=5&type=info&arg[]=foobar`
`info` with multiple packages::
`/rpc/?v=5&type=info&arg[]=foo&arg[]=bar`