curlall

Crates.iocurlall
lib.rscurlall
version0.2.0
sourcesrc
created_at2020-06-08 10:40:12.503475
updated_at2020-07-01 02:15:32.738498
descriptionSimple curl-like CLI tool to automatically page through APIs.
homepage
repositoryhttps://github.com/robinst/curlall
max_upload_size
id251317
size265,931
Robin Stocker (robinst)

documentation

README

curlall

crates.io ci

Simple curl-like CLI tool to automatically page through APIs.

  • Works with APIs that return pages of JSON objects (e.g. GitHub or Bitbucket APIs)
  • Prints the results, one line for each JSON object; ideal for piping to jq

demo

Tested with GitHub and Bitbucket APIs. Other websites will have different ways to do paging, so let me know if it doesn't work for yours and we can add support.

Examples

Print all repository names on bitbucket.org/atlassian:

curlall https://api.bitbucket.org/2.0/repositories/atlassian | jq -r .full_name

Limit to first 100:

curlall --limit 100 https://api.bitbucket.org/2.0/repositories/atlassian | jq -r .full_name

Print all URLs for users who starred github.com/rust-lang/rust:

curlall --user 'username:token' https://api.github.com/repos/rust-lang/rust/stargazers | jq -r .login

Installation

  1. Install Rust: https://www.rust-lang.org/tools/install
  2. Install curlall: cargo install curlall

Contributing

Pull requests, issues and comments welcome!

License

curlall is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details. Opening a pull requests is assumed to signal agreement with these licensing terms.

Commit count: 33

cargo fmt