bold

package
v0.0.0-...-4d41cbb Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

The bold package provides a set of functions for building a URL to interating with the BOLD API (http://www.boldsystems.org/index.php/resources/api?type=webservices), querying BOLD using the constructed URL and sending the output of the query to a file or to standard output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoldURL

func BoldURL(data_type string, params map[string][]string) string

Takes the data type and a map of all the url component paramaters. Returns a URL string that can be used to query BOLD. Sorts the paramaters alphabetically then validates that all map paramaters are allowed for the data type. If valid then any spacesin the paramaters are filled, multiple values for a paramater are combined into a single string and finally the component of the URL is constructed.

func QueryToFile

func QueryToFile(url string, output string) error

Takes a valid BOLD URL (i.e. built by the BoldURL function) and filename The URL is used to make an http request. The response data from the request is written to the specified output file.

func QueryToIO

func QueryToIO(url string)

Takes a valid BOLD URL (i.e. built by the BoldURL function) and makes an http request. The response data is sent to standard output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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