Skip to main content

Module live

Module live 

Source
Expand description

The real Advent of Code client.

This is the only module that mentions aoc_api or tokio. The upstream API is asynchronous while this tool performs a handful of strictly sequential requests, so a current-thread runtime is driven to completion here and the rest of the crate stays synchronous.

Every endpoint upstream is a free function over an aoc_api::http::Transport, which is where the throttle sits: requests are paced by the transport LiveClient holds rather than by the two calls below, so a request this module does not make itself - the puzzle page submit reads when a part turns out to be solved already - is paced like any other.

Structs§

LiveClient
A client backed by adventofcode.com.

Constants§

IDENTIFICATION
How this tool identifies itself in the User-Agent of every request.