Download data from API endpoints to individual files to use later. I use this for testing my api liberary integrations against actual data from the api in my test mocks.
Written with tokio and hyper for blazing fast concurrency.
- Configure with a toml file or via cli options.
- Cli options will override configuration in the toml.
- Convert toml enpoints entries into json for easy consumption with javaScript mocks
- Concurrency provided by
hyper
andtokio
- Receive feedback when an enpoint is unreachable/unusable
- Clone the repo
cargo build --release
- Make sure the binary is in your path
- Create your config (must be done manually)
- Run and enjoy!
# ./api.toml
base_uri = "https://your.base.uri"
file_path_prefix = "./path/to/save/data/"
[[endpoints]]
uri = "/endpoint/1"
file = "endpoint_1.json"
[[endpoints]]
uri = "/endpoint/2/specific/entry"
file = "endpoint_2_entry.json"
Default config location: './api.toml' Default json converstion of config enpoints: './api.json'
here-boy 0.1.0
USAGE:
here-boy [FLAGS] [OPTIONS]
FLAGS:
--convert-config
-h, --help Prints help information
-V, --version Prints version information
-v
OPTIONS:
--base-url <base-uri>
-c, --config <config> [default: api.toml]
--converted-config-path <converted-config-path> [default: api.json]
--dir <file-path-prefix>
Paths are dumb. The program makes no attempt to merge your base-uri
or file-path-prefix
intelligently. If you leave off or add a /
, that's on you. (for now)
This program is under development, expect changes.
No tests yet, so probably more than a few rough edges.