utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// APIVersion ...
	APIVersion = "1.0.0"
	// APIName ...
	APIName = "Droll GraphQL API"
	// ComicsSupported ...
	ComicsSupported = []string{XKCDComicName}
	// Limit ...
	Limit = 10

	// XKCDComicName ...
	XKCDComicName = "xkcd"
	// XKCDBaseAPIURL ...
	XKCDBaseAPIURL = "https://xkcd.com/"
	// XKCDBaseAPIPath ...
	XKCDBaseAPIPath = "/info.0.json"
	// XKCDStartIndex ...
	XKCDStartIndex = 1
)

Functions

func BuildAPIURL

func BuildAPIURL(comic string, num int) string

BuildAPIURL : Creates the API URL based on Comic and URL parameters

func FetchResponse

func FetchResponse(apiURL string) ([]byte, error)

FetchResponse : Gets response for HTTP GET request made on API URL

Types

This section is empty.

Jump to

Keyboard shortcuts

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