http

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPokemon

func GetPokemon()

func HttpDeleteRequest

func HttpDeleteRequest(url string, timeout time.Duration, jsonReq []byte) (int, []byte, error)

func HttpGetRequest

func HttpGetRequest(url string, timeout time.Duration) (int, []byte, error)

func HttpPostRequest

func HttpPostRequest(url string, timeout time.Duration, jsonReq []byte) (int, []byte, error)

func HttpPutRequest

func HttpPutRequest(url string, timeout time.Duration, jsonReq []byte) (int, []byte, error)

Types

type Pokemon

type Pokemon struct {
	EntryNo int            `json:"entry_number"`
	Species PokemonSpecies `json:"pokemon_species"`
}

A Pokemon Struct to map every pokemon to.

type PokemonSpecies

type PokemonSpecies struct {
	Name string `json:"name"`
}

A struct to map our Pokemon's Species which includes it's name

type Response

type Response struct {
	Name    string    `json:"name"`
	Pokemon []Pokemon `json:"pokemon_entries"`
}

A Response struct to map the Entire Response

Jump to

Keyboard shortcuts

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