a simple Advent of Code API written in Rust - also checkout the C# version
Documentation
Add Crate
use Session;
Session initialization
let client = new; // Initializes a new Session instance
let client = new; // Initializes a new Session instance
Features
Get input
let input_text: = client.get_input_text.await; // Retrieves the input text of the AoC puzzle
let input_lines: = client.get_input_lines.await; // Retrieves the input lines of the AoC puzzle
Get sample input
let sample_input_text: = client.get_sample_input_text.await; // Retrieves the nth sample input text of the AoC puzzle
let sample_input_lines: = client.get_sample_input_lines.await; // Retrieves the nth sample input lines of the AoC puzzle
Get achieved stars
let achieved_stars: = client.get_all_stars.await; // Retrieves each year's number of stars earned (key: year, value: stars)
Submit answer
let response: = client.submit_answer.await; // Submits an answer to part 1 or 2 of the AoC puzzle. Returns a response type with a success status and a cooldown period
credits to:
Max - markdown info icons Monday Morning Haskell - documentation on how to obtaining session cookie Developer.Mozilla - documentation on how to name Regex groups