2 stable releases

1.1.0 Nov 15, 2019
1.0.0 Nov 13, 2019

#16 in #reqwest-client

GPL-3.0 license

17KB
228 lines

v1.0.0

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

discord


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

~20MB
~433K SLoC