mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Update RPC interface documentation
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
3c06716c72
commit
a8552f5444
1 changed files with 26 additions and 23 deletions
49
doc/rpc.txt
49
doc/rpc.txt
|
@ -1,33 +1,36 @@
|
||||||
aurweb RPC interface
|
aurweb RPC Interface
|
||||||
====================
|
====================
|
||||||
|
|
||||||
Allowed methods
|
Package Search
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Package searches can be performed by issuing HTTP GET requests of the form
|
||||||
|
+/rpc/?v=5&type=search&search_by=_by_&arg=_keywords_+ where _by_ is either
|
||||||
|
`name` (search by package name only), `name-desc` (search by package name and
|
||||||
|
description) or `maintainer` (search by package maintainer) and _keywords_ is
|
||||||
|
the search argument. The _search_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
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
* `search`
|
Package information can be obtained by issuing HTTP GET requests of the form
|
||||||
* `info`
|
+/rpc/?v=5&type=info&arg[]=_pkg1_&arg[]=_pkg2_&...+ where _pkg1_, _pkg2_, ...
|
||||||
* `multiinfo`
|
are the names of packages to retrieve package details for.
|
||||||
* `msearch`
|
|
||||||
|
|
||||||
Each method requires the following HTTP GET syntax:
|
|
||||||
+type=_methodname_&arg=_data_+
|
|
||||||
|
|
||||||
Where _methodname_ is the name of an allowed method, and _data_ is the argument
|
|
||||||
to the call.
|
|
||||||
|
|
||||||
If you need jsonp type callback specification, you can provide an additional
|
|
||||||
variable _callback_.
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
||||||
`search`::
|
`search`::
|
||||||
`http://aur-url/rpc.php?type=search&arg=foobar`
|
`/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`::
|
`info`::
|
||||||
`http://aur-url/rpc.php?type=info&arg=foobar`
|
`/rpc/?v=5&type=info&arg[]=foobar`
|
||||||
`multiinfo`::
|
`info` with multiple packages::
|
||||||
`http://aur-url/rpc.php?type=multiinfo&arg[]=foo&arg[]=bar`
|
`/rpc/?v=5&type=info&arg[]=foo&arg[]=bar`
|
||||||
`msearch`::
|
|
||||||
`http://aur-url/rpc.php?type=msearch&arg=john`
|
|
||||||
Callback::
|
|
||||||
`http://aur-url/rpc.php?type=search&arg=foobar&callback=jsonp1192244621103`
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue