Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/libninjacom/bump-rs
Bump.sh client, generated from the OpenAPI spec
https://github.com/libninjacom/bump-rs
bump openapi rust
Last synced: 6 days ago
JSON representation
Bump.sh client, generated from the OpenAPI spec
- Host: GitHub
- URL: https://github.com/libninjacom/bump-rs
- Owner: libninjacom
- License: mit
- Created: 2022-09-29T21:50:35.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-06T21:56:19.000Z (about 2 years ago)
- Last Synced: 2024-03-15T02:46:01.442Z (8 months ago)
- Topics: bump, openapi, rust
- Language: Rust
- Homepage: https://docs.rs/bump-api/
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[Bump](https://bump.sh) client, generated from the OpenAPI spec.
# Usage
```rust
use bump_api::BumpClient;
use bump_api::model::*;
#[tokio::main]
async fn main() {
let client = BumpClient::from_env();
let response = client
.post_diffs()
.url("your url")
.previous_url("your previous url")
.previous_definition("your previous definition")
.previous_references(
vec![
Reference { location : Some("your location".to_owned()), content :
Some("your content".to_owned()) }
],
)
.definition("your definition")
.references(
vec![
Reference { location : Some("your location".to_owned()), content :
Some("your content".to_owned()) }
],
)
.expires_at("your expires at")
.send()
.await
.unwrap();
println!("{:#?}", response);
}```
This example loads configuration from environment variables, specifically:
* `BUMP_BASE_URL`
* `BUMP_AUTHORIZATION_TOKEN`
* `BUMP_BASIC_TOKEN`
# Installation
Add this to your Cargo.toml:
```toml
[dependencies]
bump-api = "0.1.0"
```# Documentation
* [Client Library Documentation](https://docs.rs/bump-api)
You can see working examples of every API call in the `examples/` directory.
# Contributing
Contributions are welcome!
*Library created with [Libninja](https://www.libninja.com).*