advent-of-code-api: Advent of Code REST API bindings

[ bsd3, library, web ] [ Propose Tags ]

Haskell bindings for Advent of Code REST API. Please use responsibly! See or Advent module for an introduction and tutorial.

Requires libcurl.

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,,,,,,,,,,,,,,,,,,,,,,,,, (info)
Change log
Dependencies base (>=4.9 && <5), containers, curl, deepseq, directory, filepath, finite-typelits, mtl, taggy, text, time, uri-encode [details]
License BSD-3-Clause
Copyright (c) Justin Le 2018
Author Justin Le
Category Web
Home page
Bug tracker
Source repo head: git clone
Uploaded by jle at 2018-12-07T09:50:25Z
Distributions NixOS:, Stackage:
Downloads 8983 total (64 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-12-07 [all 1 reports]

Readme for advent-of-code-api-

[back to package description]


advent-of-code-api on Hackage Build Status

Haskell bindings for Advent of Code REST API. Caches and throttles requests automatically.

Specify your requests with AoC and AoCOpts, and run them with runAoC.


-- Fetch prompts for day 5
runAoC myOpts $ AoCPrompt (mkDay_ 5)

-- Fetch input for day 8
runAoC myOpts $ AoCInput (mkDay_ 8)

-- Submit answer "hello" for Day 10, Part 1
runAoC myOpts $ AoCSubmit (mkDay_ 10) Part1 "hello"

Please use responsibly. All actions are rate-limited to a default of one request every three seconds, with ability to adjust up to as fast as a hard-coded limit of one request per second.

Note that leaderboard API is not yet supported.

Requires libcurl, with future plans to move to a "pure Haskell" networking backend.

Session Keys

Session keys are required for all commands, but if you enter a bogus key you should be able to get at least Part 1 from AoCPrompt.

The session key can be found by logging in on a web client and checking the cookies. You can usually check these with in-browser developer tools.