Golang interface for the OpenCorporates service.
$ go get -u github.com/rvflash/opencorporates
Package still in development, all the methods are not implemented yet.
The import of the package and errors check are voluntary ignored for the demo.
See the test files for more example.
api := opencorporates.API()
it := api.Companies("nautic motors evasion", "fr")
for {
company, err := it.Next()
if err != nil {
if err != opencorporates.EOF {
fmt.Println(err)
}
break
}
fmt.Printf("%s (%s)\n", company.Name, company.Number)
}
// Output: SARL NAUTIC MOTOR'S EVASION (529591737)
// NAUTIC MOTOR'S EVASION 35 (810622795)
api := opencorporates.API()
company, _ := api.CompanyByID("529591737", "fr")
println(company.Name+" #"+ company.Number)
// Output: SARL NAUTIC MOTOR'S EVASION (529591737)