2 stable releases
1.1.0 | Nov 15, 2019 |
---|---|
1.0.0 | Nov 13, 2019 |
#12 in #reqwest-client
17KB
228 lines
azurlane-rs
Wrapper for the unofficial azur lane json api in Rust
Installation
[dependencies]
azurlane = "1.0"
Example
use azurlane::{AzurLaneRequester, Order};
use reqwest::Client;
fn main() {
let client = Client::new();
let _ = match client.get_ships(Order::RARITY, "Super Rare") {
Ok(response) => {
for i in 0..response.ships.len() {
println!("[{}]: ({})", response.ships[i].id, response.ships[i].name)
}
}
Err(why) => {
panic!("{}", why)
}
};
}
Support
lib.rs
:
azurlane
An azur lane api wrapper for the unofficial azur lane json api
Installation
Add the following to your Cargo.toml
file:
[dependencies]
azurlane = "1.1"
Example
use azurlane::{AzurLaneRequester, Category};
use reqwest::Client;
fn main() {
let client = Client::new();
let _ = match client.get_ships(Category::RARITY, "Super Rare") {
Ok(response) => {
for i in 0..response.ships.len() {
println!("[{}]: ({})", response.ships[i].id, response.ships[i].name)
}
}
Err(why) => {
panic!("{}", why)
}
};
}
License
GPL-3.0, View the full license here
Dependencies
~22MB
~453K SLoC