api

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v0.21.0

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

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

func SetCache added in v0.26.0

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