Bitly has an OpenAPI specification for its API - it'd probably be better (easier, more maintainable) to automatically generate the API client via a generator.
Some generators (in Rust) that come to mind:
One drawback is that the generated modes will (probably) all be fully heap allocated (or at least the generic openapi-generator does so). Although at least for the shorten command this is not strictly necessary, it probably won't be a big deal as the app is mostly I/O bound anyways.
Bitly has an OpenAPI specification for its API - it'd probably be better (easier, more maintainable) to automatically generate the API client via a generator.
Some generators (in Rust) that come to mind:
One drawback is that the generated modes will (probably) all be fully heap allocated (or at least the generic
openapi-generatordoes so). Although at least for theshortencommand this is not strictly necessary, it probably won't be a big deal as the app is mostly I/O bound anyways.