| Crates.io | aoc-session |
| lib.rs | aoc-session |
| version | 0.2.1 |
| created_at | 2023-11-30 08:26:56.006464+00 |
| updated_at | 2023-11-30 12:14:08.019599+00 |
| description | Get the session cookie value for Advent of Code easily |
| homepage | |
| repository | https://github.com/JohnScience/aoc-session |
| max_upload_size | |
| id | 1053982 |
| size | 56,637 |
use aoc_session::aoc_session;
fn main() {
let session_id: String = match aoc_session() {
// Ok(session) => <aoc_session::AocSession as ToString>::to_string(&session),
Ok(session) => session.to_string(),
Err(e) => panic!("Error: {e}"),
};
assert!(session_id.len() > 0);
println!("My session ID: {}", session_id);
}
cargo install aoc-session
aoc-session
This crate was born while preparing the presentation for Calgary Rust community. It better explains what this crate provides and how it works.