client

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MPL-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

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

HTTP contains all client details

func NewHTTP

func NewHTTP(baseURL string) *HTTP

NewHTTP creates a new HTTP client

func (*HTTP) GetCoffee

func (h *HTTP) GetCoffee(coffeeID int) (*model.Coffee, error)

GetCoffee retrieves a single coffee

func (*HTTP) GetCoffees

func (h *HTTP) GetCoffees() ([]model.Coffee, error)

GetCoffees retrieves a list of coffees

func (*HTTP) GetIngredientsForCoffee

func (h *HTTP) GetIngredientsForCoffee(coffeeID int) ([]model.Ingredient, error)

GetIngredientsForCoffee retrieves a list of ingredients that go into a particular coffee

Jump to

Keyboard shortcuts

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