1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! # azurlane
//!
//! An azur lane api wrapper for the unofficial azur lane json api
//!
//! ### Installation
//!
//! Add the following to your `Cargo.toml` file:
//!
//! ```toml
//! [dependencies]
//! azurlane = "1.1"
//! ```
//!
//! ### Example
//!
//! ```rust,no_run
//! 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](https://github.com/azurlane-api/azurlane-rs/blob/master/LICENSE)
extern crate reqwest;
extern crate serde;
extern crate serde_derive;
extern crate serde_json;
pub use ;
pub use ;
/// Base API Url
pub const API_URL: &'static str = "https://azurlane-api.herokuapp.com/v2";