mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Newly supported API Version 6 modifies `type=search` for _by_ type `name-desc`: it now behaves the same as `name-desc` search through the https://aur.archlinux.org/packages/ search page. Search for packages containing the literal keyword `blah blah` AND `haha`: https://aur.archlinux.org/rpc/?v=6&type=search&arg="blah blah"%20haha Search for packages containing the literal keyword `abc 123`: https://aur.archlinux.org/rpc/?v=6&type=search&arg="abc 123" The following example searches for packages that contain `blah` AND `abc`: https://aur.archlinux.org/rpc/?v=6&type=search&arg=blah%20abc The legacy method still searches for packages that contain `blah abc`: https://aur.archlinux.org/rpc/?v=5&type=search&arg=blah%20abc https://aur.archlinux.org/rpc/?v=5&type=search&arg=blah%20abc API Version 6 is currently only considered during a `search` of `name-desc`. Note: This change was written as a solution to https://bugs.archlinux.org/task/49133. PS: + Some spacing issues fixed in comments. Signed-off-by: Kevin Morris <kevr.gtalk@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
49 lines
1.8 KiB
Text
49 lines
1.8 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)
|
|
* `depends` (search for packages that depend on _keywords_)
|
|
* `makedepends` (search for packages that makedepend on _keywords_)
|
|
* `optdepends` (search for packages that optdepend on _keywords_)
|
|
* `checkdepends` (search for packages that checkdepend on _keywords_)
|
|
|
|
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&by=maintainer&arg=john`
|
|
`search` packages that have _boost_ as `makedepends`::
|
|
`/rpc/?v=5&type=search&by=makedepends&arg=boost`
|
|
`search` with callback::
|
|
`/rpc/?v=5&type=search&arg=foobar&callback=jsonp1192244621103`
|
|
`search` with API Version 6 for packages containing `cookie` AND `milk`::
|
|
`/rpc/?v=6&type=search&arg=cookie%20milk`
|
|
`search` with API Version 6 for packages containing `cookie milk`::
|
|
`/rpc/?v=6&type=search&arg="cookie milk"`
|
|
`info`::
|
|
`/rpc/?v=5&type=info&arg[]=foobar`
|
|
`info` with multiple packages::
|
|
`/rpc/?v=5&type=info&arg[]=foo&arg[]=bar`
|