/bls-go

Go interface for BLS.gov

Primary LanguageGoApache License 2.0Apache-2.0

bls-go

Build Status Build status GitHub license GoDoc

bls-go is a Go interface for the public API provided by the United States Bureau of Labor Statistics.

Requirements

  • Go
  • BLS.gov API key (not strictly required, but highly recommended; you can request one here)

Installation

After cloning the repository, build and install the library with go install github.com/clpo13/bls-go. See the Usage section for how to interact with the library.

Alternatively, you can call go get -u github.com/clpo13/bls-go to fetch and install the latest version of the library directly to your GOPATH.

Usage

In your import statement, add "github.com/clpo13/bls-go". Now, you have access to blsgo.GetData, blsgo.Payload, and blsgo.ResultData, as well as a few other helper structs and functions. Run go doc github.com/clpo13/bls-go to get some basic information on the available objects. The generated API docs can also be found at https://godoc.org/github.com/clpo13/bls-go.

More detailed usage notes coming soon.

An example program using this library can be found at https://github.com/clpo13/bls-go-example.

Contributing

Issues and pull requests are always welcome. Please file any bug reports or feature requests using the GitHub issues page.

To do list

  • Better error handling, especially when an invalid series is requested
  • Online API docs
  • Usage notes and example code

License

This program is available under the terms of the Apache 2.0 license, the text of which can be found in LICENSE or at https://www.apache.org/licenses/LICENSE-2.0.