You are not logged in.

#1 2017-02-08 20:43:51

mis
Member
Registered: 2016-03-16
Posts: 234

[Solved] [aurweb RPC] get info for multiple packages with curl

I try to get info for multiple packages from the aurweb RPC Interface using curl. The documentation says

info
/rpc/?v=5&type=info&arg[]=foobar

info with multiple packages
/rpc/?v=5&type=info&arg[]=foo&arg[]=bar

But that does not work.

$ curl "https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=cower"
curl: (3) [globbing] bad range specification in column 50

$ curl "https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=cower&arg[]=cower-git"
curl: (3) [globbing] bad range specification in column 50

What works is ( arg=cower instead of arg[]=cower )

$ curl "https://aur.archlinux.org/rpc/?v=5&type=info&arg=cower"

So I tried following, but that gives only the result for the last argument, cower-git in this case.

$ curl "https://aur.archlinux.org/rpc/?v=5&type=info&arg=cower&arg=cower-git"

Is there something wrong with my curl commands?
Is it possible to get the info for multiple packages from the RPC with a single call to curl?

EDIT:
Ok, using curl's -g / --globoff option solved it.

Last edited by mis (2017-02-08 21:50:08)

Offline

Board footer

Powered by FluxBB