Update wiki links to the new short URL
[aur.git] / doc / rpc.txt
blobb0f5c4e10afc13d2aafcd9b22227d20829881ad9
1 aurweb RPC Interface
2 ====================
4 Package Search
5 --------------
7 Package searches can be performed by issuing HTTP GET requests of the form
8 +/rpc/?v=5&type=search&by=_field_&arg=_keywords_+ where _keywords_ is the
9 search argument and _field_ is one of the following values:
11 * `name` (search by package name only)
12 * `name-desc` (search by package name and description)
13 * `maintainer` (search by package maintainer)
14 * `depends` (search for packages that depend on _keywords_)
15 * `makedepends` (search for packages that makedepend on _keywords_)
16 * `optdepends` (search for packages that optdepend on _keywords_)
17 * `checkdepends` (search for packages that checkdepend on _keywords_)
19 The _by_ parameter can be skipped and defaults to `name-desc`.
21 If a maintainer search is performed and the search argument is left empty, a
22 list of orphan packages is returned.
24 Package Details
25 ---------------
27 Package information can be obtained by issuing HTTP GET requests of the form
28 +/rpc/?v=5&type=info&arg[]=_pkg1_&arg[]=_pkg2_&...+ where _pkg1_, _pkg2_, ...
29 are the names of packages to retrieve package details for.
31 Examples
32 --------
34 `search`::
35   `/rpc/?v=5&type=search&arg=foobar`
36 `search` by maintainer::
37   `/rpc/?v=5&type=search&by=maintainer&arg=john`
38 `search` packages that have _boost_ as `makedepends`::
39   `/rpc/?v=5&type=search&by=makedepends&arg=boost`
40 `search` with callback::
41   `/rpc/?v=5&type=search&arg=foobar&callback=jsonp1192244621103`
42 `search` with API Version 6 for packages containing `cookie` AND `milk`::
43   `/rpc/?v=6&type=search&arg=cookie%20milk`
44 `search` with API Version 6 for packages containing `cookie milk`::
45   `/rpc/?v=6&type=search&arg="cookie milk"`
46 `info`::
47   `/rpc/?v=5&type=info&arg[]=foobar`
48 `info` with multiple packages::
49   `/rpc/?v=5&type=info&arg[]=foo&arg[]=bar`