wiki/docs/data.md

9 lines
398 B
Markdown
Raw Normal View History

2020-11-04 22:35:10 +01:00
# Data
## Aria2
### Get list of all connected peers
:::shell
curl -s -X POST -d '{"jsonrpc": "2.0", "id": "", "method": "aria2.tellActive"}' http://localhost:6800/jsonrpc | jq -r '.result[].gid' | while read gid;do echo $gid; curl -s -X POST -d '{"jsonrpc": "2.0", "id": "", "method": "aria2.getPeers", "params": ["'"$gid"'"]}' http://localhost:6800/jsonrpc | jq -r '.result[].ip'; done