api

package
v0.0.0-...-b57e018 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(httpClient adapters.Http, logger *slog.Logger) *client

NewClient creates a new instance of the client. It takes an httpClient of type adapters.Http and a logger of type *slog.Logger as parameters. It returns a pointer to the created client.

Types

type API

type API interface {
	// worlds
	GetWorld(ctx context.Context, world string) (*models.V4GetWorldResponse, error)
	GetWorlds(ctx context.Context) (*models.V4GetWorldsResponse, error)

	// characters
	GetCharacter(ctx context.Context, character string) (*models.V4GetCharacterResponse, error)

	// guilds
	GetGuild(ctx context.Context, guildName string) (*models.V4GetGuildResponse, error)
	GetGuilds(ctx context.Context, world string) (*models.V4GetGuildsResponse, error)

	// bosses
	GetBoostableBosses(ctx context.Context) (*models.V4GetBoostableBossesResponse, error)

	// creatures
	GetCreatures(ctx context.Context) (*models.V4GetCreaturesResponse, error)
	GetCreatureByName(ctx context.Context, name string) (*models.V4GetCreatureByNameResponse, error)

	// fansites
	GetFansites(ctx context.Context) (*models.V4GetFansitesResponse, error)

	// highscores
	GetHighScores(ctx context.Context, world, category, vocation string, page int) (*models.V4GetHighScores, error)

	// houses
	GetHousesByWorldTown(ctx context.Context, world, town string) (*models.V4GetHousesByWorldAndTownResponse, error)
	GetHouseByWorldAndID(ctx context.Context, world, houseID string) (*models.V4GetHouseByTownIDResponse, error)

	// kill statistics
	GetKillStatistics(ctx context.Context, world string) (*models.V4GetKillStatisticsResponse, error)

	// spells
	GetSpells(ctx context.Context) (*models.V4GetSpellsResponse, error)
	GetSpell(ctx context.Context, spellID string) (*models.V4GetSpellResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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