2019-08-16 10:59:42 +00:00
|
|
|
# libcvrapi
|
|
|
|
|
2019-08-17 17:53:11 +00:00
|
|
|
-----------------------------------
|
|
|
|
|
2021-11-03 14:48:13 +00:00
|
|
|
A Java library to query <https://www.cvrapi.dk> (a Danish VAT API service).
|
2019-08-17 17:53:11 +00:00
|
|
|
|
2023-01-03 13:04:09 +00:00
|
|
|
[![Build Status](https://drone.data.coop/api/badges/nellemann/libcvrapi/status.svg)](https://drone.data.coop/nellemann/libcvrapi)
|
2019-08-17 17:53:11 +00:00
|
|
|
## Usage
|
|
|
|
|
2023-01-03 13:35:44 +00:00
|
|
|
Lookup company by CVR number:
|
2023-01-03 13:04:09 +00:00
|
|
|
|
|
|
|
```java
|
|
|
|
CvrApi api = new CvrApi("My user agent", "mySecretToken");
|
|
|
|
Company company = api.getCompanyByVatNumber("57020415");
|
|
|
|
System.out.println(company.life.name);
|
|
|
|
```
|
2019-08-17 17:53:11 +00:00
|
|
|
|
|
|
|
The *Company* represents most of the same properties as seen in the example JSON in the [api documentation](http://docs.rest.cvrapi.dk/).
|
|
|
|
|
2023-01-03 13:58:07 +00:00
|
|
|
|
|
|
|
### Gradle
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven { url 'https://git.data.coop/api/packages/nellemann/maven' }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile 'biz.nellemann.libs:libcvrapi:1.+'
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-08-17 17:53:11 +00:00
|
|
|
## Development
|
|
|
|
|
|
|
|
To build and test the code:
|
|
|
|
|
|
|
|
./gradle build
|
|
|
|
./gradle test
|