summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/main.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs
index 8a4c870..08f5abb 100644
--- a/src/bin/main.rs
+++ b/src/bin/main.rs
@@ -1,14 +1,23 @@
extern crate twitch_api;
extern crate tokio;
extern crate dotenv;
+extern crate futures;
+extern crate serde;
use twitch_api::TwitchApi;
use std::env;
+use futures::future::Future;
fn main() {
dotenv::dotenv().unwrap();
let mut twitch_api = TwitchApi::new(env::var("TWITCH_API").unwrap());
- let users = twitch_api.users(vec![], vec!["shroud"]);
+ let mut users = twitch_api.users(vec![], vec!["shroud"])
+ .and_then(|json| {
+ println!("{:?}", json);
+ Ok(json)
+ })
+ .map(|_| ())
+ .map_err(|_| ());
tokio::run(users);
}