api

package
v0.0.0-...-2af310e Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package api is a helper for calling external third party apis

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, rsp interface{}) error

Get a url and unmarshal a json body into the given value

func Post

func Post(url string, ureq, rsp interface{}) error

Post a url and unmarshal a json body into the given value

func SetCache

func SetCache(v bool, ttl time.Duration)

Set the cache

func SetKey

func SetKey(k, v string)

Set a key within the header

Types

This section is empty.

Jump to

Keyboard shortcuts

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