Skip to content

Instantly share code, notes, and snippets.

@alicemaz
Created November 29, 2015 09:34
Show Gist options
  • Save alicemaz/9aa8300e009c7075e3dc to your computer and use it in GitHub Desktop.
Save alicemaz/9aa8300e009c7075e3dc to your computer and use it in GitHub Desktop.
let mut key = String::new();
let mut sec = String::new();
let mut tok = String::new();
let mut tok_sec = String::new();
for (var, val) in env::vars() {
match var.as_ref() {
"TWITTER_KEY" => key = val,
"TWITTER_SECRET" => sec = val,
"TWITTER_TOKEN" => tok = val,
"TWITTER_TOKEN_SECRET" => tok_sec = val,
_ => ()
}
}
let twitter = Twitter::new(&key, &sec, &tok, &tok_sec);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment