api

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BASE_URL = "https://adventofcode.com"
View Source
const DAY_URL = YEAR_URL + "/day/%v"
View Source
const REQS_PER_SEC = 10
View Source
const USER_AGENT = "dalton.dog/aocgo"
View Source
const YEAR_URL = BASE_URL + "/%v"

Variables

View Source
var MasterClient httpClient

Functions

func InitClient

func InitClient(userSessionToken string)

InitClient creates the API client with a given user session token

func NewGetReq

func NewGetReq(url string, sessionToken string) (*http.Response, error)

NewGetReq will make a request of a certain URL on behalf of a given user session token.

func PuzzleAnswerURL

func PuzzleAnswerURL(year int, day int) string

func PuzzleInputURL

func PuzzleInputURL(year int, day int) string

func PuzzlePageURL

func PuzzlePageURL(year int, day int) string

func SubmitAnswer

func SubmitAnswer(year int, day int, part int, userSession string, answer string) (*http.Response, error)

SubmitAnswer will submit an answer to a puzzle on behalf of a given user token.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL