https://github.com/rvflash/opencorporates
Golang interface for the OpenCorporates service.
https://github.com/rvflash/opencorporates
golang opencorporates
Last synced: 12 months ago
JSON representation
Golang interface for the OpenCorporates service.
- Host: GitHub
- URL: https://github.com/rvflash/opencorporates
- Owner: rvflash
- License: mit
- Created: 2018-01-09T22:04:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-17T11:01:10.000Z (over 8 years ago)
- Last Synced: 2025-07-06T00:04:30.926Z (12 months ago)
- Topics: golang, opencorporates
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenCorporates
[](https://godoc.org/github.com/rvflash/opencorporates)
[](https://travis-ci.org/rvflash/opencorporates)
[](http://codecov.io/github/rvflash/opencorporates?branch=master)
[](https://goreportcard.com/report/github.com/rvflash/opencorporates)
Golang interface for the OpenCorporates service.
### Installation
```bash
$ go get -u github.com/rvflash/opencorporates
```
### Usage
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.
#### Search a company by its name or jurisdication .
```go
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)
```
#### Search a company by its number (identifier).
```go
api := opencorporates.API()
company, _ := api.CompanyByID("529591737", "fr")
println(company.Name+" #"+ company.Number)
// Output: SARL NAUTIC MOTOR'S EVASION (529591737)
```