hltb

package
v0.0.0-...-e903929 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package hltb implements a HowLongToBeat client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	SearchGame(ctx context.Context, query string) (*Game, error)
}

API represents the supported API functions. It's defined for fake generation.

type Game

type Game struct {
	Title         string
	URL           string
	MainStory     string
	MainPlusExtra string
	Completionist string
}

Game is a found game on HLTB.

type HLTB

type HLTB struct {
	// contains filtered or unexported fields
}

HLTB is a HowLongToBeat client.

func New

func New(cli *http.Client) *HLTB

New creates a new HLTB client.

func (*HLTB) SearchGame

func (h *HLTB) SearchGame(ctx context.Context, query string) (*Game, error)

SearchGame performs a search on HLTB and returns the first result.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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