aoe

package module
v0.0.0-...-2a65b08 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 8 Imported by: 0

README

AOE4 Client

Release Build Status CodeQL Status Report codecov Go

Overview

This is a go client used to query AOE4 data from either the official leaderboards or the aoeiv.net api.

There are two packages within the client that can be used official and aoeivnet, each one calls the respective web service but they both contain a similar, fluent filter based API for ease of use.

Under each package is a README explaining useage and with an examples sub directory with code useage.

Installation

This requires a supported release of Go.

go get -u github.com/theflyingcodr/aoe4-client

Documentation

View the generated documentation

GoDoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(opts ...optfunc) *httpclient

NewHTTPClient will setup and return a new http client instance that can be used to send and validate http requests and responses. It's just a slightly simplifed wrapper over net.http.

func WithTimeout

func WithTimeout(d time.Duration) optfunc

WithTimeout will allow a custom timeout to be set within the http client allowing the default of 30 seconds to be overwritten.

Types

type HTTPClient

type HTTPClient interface {
	Do(ctx context.Context, method, url string, body interface{}, out interface{}) error
}

HTTPClient is an exportable interface that can be used to mock the client.

Directories

Path Synopsis
examples/paging command

Jump to

Keyboard shortcuts

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