connections

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const APIURL = "https://pokeapi.co/api/v2/"

Variables

This section is empty.

Functions

func AbilityApiCall added in v0.12.0

func AbilityApiCall(endpoint, abilityName, baseURL string) (structs.AbilityJSONStruct, string, error)

func ApiCallSetup

func ApiCallSetup(rawURL string, target interface{}, skipHTTPSCheck bool) error

ApiCallSetup Helper function to handle API calls and JSON unmarshalling

func CallTCGData added in v1.8.8

func CallTCGData(url string) ([]byte, error)

func FetchEndpoint added in v1.8.1

func FetchEndpoint[T EndpointResource](endpoint, resourceName, baseURL, resourceType string) (T, string, error)

func ItemApiCall added in v1.4.0

func ItemApiCall(endpoint string, itemName string, baseURL string) (structs.ItemJSONStruct, string, error)

func MoveApiCall added in v1.2.0

func MoveApiCall(endpoint string, moveName string, baseURL string) (structs.MoveJSONStruct, string, error)

func PokemonApiCall

func PokemonApiCall(endpoint string, pokemonName string, baseURL string) (structs.PokemonJSONStruct, string, error)

func PokemonSpeciesApiCall added in v1.6.1

func PokemonSpeciesApiCall(endpoint string, pokemonSpeciesName string, baseURL string) (structs.PokemonSpeciesJSONStruct, string, error)

func QueryBerryData added in v1.7.0

func QueryBerryData(query string, args ...interface{}) ([]string, error)

func TypesApiCall

func TypesApiCall(endpoint string, typesName string, baseURL string) (structs.TypesJSONStruct, string, error)

Types

type EndpointResource added in v1.8.1

type EndpointResource interface {
	GetResourceName() string
}

Jump to

Keyboard shortcuts

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