forked from mirror/Riven
parent
120e703f45
commit
a604b5f39e
|
@ -2,7 +2,7 @@ language: rust
|
|||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- rust: beta
|
||||
- rust: stable
|
||||
- rust: nightly
|
||||
env: FEATURES="--features nightly"
|
||||
env:
|
||||
|
|
|
@ -16,6 +16,9 @@ travis-ci = { repository = "MingweiSamuel/Riven" }
|
|||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = [ "nightly" ]
|
||||
|
||||
[features]
|
||||
nightly = [ "parking_lot/nightly" ]
|
||||
|
||||
|
|
|
@ -28,10 +28,9 @@ use riven::consts::Region;
|
|||
// Riven Enter tokio async runtime.
|
||||
let rt = tokio::runtime::Runtime::new().unwrap();
|
||||
rt.block_on(async {
|
||||
// Create RiotApi instance from key.
|
||||
// Create RiotApi instance from key string.
|
||||
let api_key = "RGAPI-01234567-89ab-cdef-0123-456789abcdef";
|
||||
let api_key = std::env::var("RGAPI_KEY").ok()
|
||||
.or_else(|| std::fs::read_to_string("apikey.txt").ok()).unwrap();
|
||||
# /* (doc testing) */ let api_key = std::env!("RGAPI_KEY");
|
||||
let riot_api = RiotApi::with_key(api_key);
|
||||
|
||||
// Get summoner data.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#![forbid(unsafe_code)]
|
||||
|
||||
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
|
||||
#![cfg_attr(not(feature = "nightly"), doc("See [README.md](https://github.com/MingweiSamuel/Riven#----riven--------------------)."))]
|
||||
#![cfg_attr(not(feature = "nightly"), doc = "See [README.md](https://github.com/MingweiSamuel/Riven#readme).")]
|
||||
|
||||
mod config;
|
||||
pub use config::RiotApiConfig;
|
||||
|
|
Loading…
Reference in New Issue