Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

gmccue/go-ilab-childlabor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-ilab-childlabor - A Go wrapper library for the ILAB Child Labor API.

Build Status GoDoc

go-ilab-childlabor provides programmatic acces to the ILAB Child Labor API.

Installation

go get github.com/gmccue/go-ilab-childlabor

Usage

In order to use this library, you must have a valid API token for the DOL Public API. You can register for an API key at the US DOL website.

Sample usage:

import laborstats "github.com/gmccue/go-ilab-childlabor"

func test() {
	api := lstats.NewLaborStatsAPI("{your API token}")
	api.Debug = true

	countryData, err := api.QueryCountryData()
	if err != nil {
		log.Println(err)
	}

	log.Printf("%v", countryData)
}

Configurable fields

Field Type Description Example
Debug Bool Output detailed information related to an API request. Uses pkg log. api.Debug(true)
SecretKey String Your API token. api.SecretKey("123abc")

Detailed struct field information can be found in the wiki.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages