Version 0.1.0

This commit is contained in:
Mingwei Samuel 2019-11-04 23:29:46 -08:00
parent dc751ee207
commit 48d0903138
6 changed files with 38 additions and 8 deletions

4
.gitignore vendored
View file

@ -3,3 +3,7 @@
/doc /doc
Cargo.lock Cargo.lock
apikey.txt apikey.txt
/srcgen/node_modules/
/srcgen/.*.json

View file

@ -1,12 +1,16 @@
[package] [package]
name = "riven" name = "riven"
version = "0.0.5" version = "0.1.0"
authors = ["Mingwei Samuel <mingwei.samuel@gmail.com>"] authors = ["Mingwei Samuel <mingwei.samuel@gmail.com>"]
repository = "https://github.com/MingweiSamuel/Riven" repository = "https://github.com/MingweiSamuel/Riven"
description = "Riot API Library (WIP)" description = "Riot Games API Library"
license = "LGPL-3.0" readme = "README.md"
license = "MIT"
edition = "2018" edition = "2018"
include = [ "src/**" ] include = [ "src/**", "/README.md" ]
[badges]
travis-ci = { repository = "MingweiSamuel/Riven" }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -26,7 +30,7 @@ url = "2.1"
[dev-dependencies] [dev-dependencies]
colored = "1.8" colored = "1.8"
env_logger = "0.7" env_logger = "0.7"
fake_clock = { git = "https://github.com/MingweiSamuel/fake_clock", branch = "master" } fake_instant = "0.4"
lazy_static = "1.4" lazy_static = "1.4"
tokio = "0.2.0-alpha.6" tokio = "0.2.0-alpha.6"
futures-util-preview = "0.3.0-alpha.19" futures-util-preview = "0.3.0-alpha.19"

7
LICENSE Normal file
View file

@ -0,0 +1,7 @@
Copyright 2019 Mingwei Samuel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,6 +1,6 @@
#![cfg(test)] #![cfg(test)]
use fake_clock::FakeClock as Instant; use fake_instant::FakeClock as Instant;
/// This is a hack to test token bucket, substituting FakeClock for Instant. /// This is a hack to test token bucket, substituting FakeClock for Instant.
mod token_bucket { mod token_bucket {

2
srcgen/.gitignore vendored
View file

@ -1,2 +0,0 @@
node_modules/
.*.json

View file

@ -25,5 +25,22 @@ async_tests!{
rassert!(s.len() >= 142, "Expected masteries: {}.", s.len()); rassert!(s.len() >= 142, "Expected masteries: {}.", s.len());
Ok(()) Ok(())
}, },
// // TFT tests.
// tftleaguev1_getchallengerleague: async {
// let p = RIOT_API.tft_league_v1().get_challenger_league(Region::EUW);
// let l = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get TFT Challenger.".to_owned())?;
// rassert!(l.entries.len() > 10, "Expected a few challenger players, got: {}.", l.entries.len());
// Ok(())
// },
// tftmatchv1_getmatch: async {
// let p = RIOT_API.tft_match_v1().get_match(Region::AMERICAS, "PBE1_4328907912");
// let _m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get TFT match.".to_owned())?;
// Ok(())
// },
// tftsummonerv1_getbyname: async {
// let p = RIOT_API.tft_summoner_v1().get_by_summoner_name(Region::EUW, "相当猥琐");
// let _s = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get TFT summoner.".to_owned())?;
// Ok(())
// },
} }
} }