Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.3
4.2.3
19 changes: 12 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
#
# Generated by: https://openapi-generator.tech
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
# Ref: https://docs.travis-ci.com/user/languages/java/
#
language: java
jdk:
- oraclejdk8
- oraclejdk7
- openjdk12
- openjdk11
- openjdk10
- openjdk9
- openjdk8
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
script:
# test using maven
- mvn test
# uncomment below to test using gradle
# - gradle test
# uncomment below to test using sbt
#- mvn test
# test using gradle
- gradle test
# test using sbt
# - sbt test
74 changes: 45 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# locationiq-java-client

LocationIQ
- API version: 1.0.0
- API version: 2.0.0
- Build date: 2020-02-14T16:06:31.759327+05:30[Asia/Kolkata]

LocationIQ provides flexible enterprise-grade location based solutions. We work with developers, startups and enterprises worldwide serving billions of requests everyday. This page provides an overview of the technical aspects of our API and will help you get started.

Expand Down Expand Up @@ -39,7 +40,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.locationiq</groupId>
<artifactId>locationiq-java-client</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -49,7 +50,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "com.locationiq:locationiq-java-client:1.0.0"
compile "com.locationiq:locationiq-java-client:2.0.0"
```

### Others
Expand All @@ -62,7 +63,7 @@ mvn clean package

Then manually install the following JARs:

* `target/locationiq-java-client-1.0.0.jar`
* `target/locationiq-java-client-2.0.0.jar`
* `target/lib/*.jar`

## Getting Started
Expand All @@ -71,34 +72,37 @@ Please follow the [installation](#installation) instruction and execute the foll

```java

import LocationIq.*;
import LocationIq.auth.*;
import com.locationiq.client.model.*;
// Import classes:
import com.locationiq.client.ApiClient;
import com.locationiq.client.ApiException;
import com.locationiq.client.Configuration;
import com.locationiq.client.auth.*;
import com.locationiq.client.models.*;
import com.locationiq.client.api.BalanceApi;

import java.io.File;
import java.util.*;

public class BalanceApiExample {

public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: key
ApiKeyAuth key = (ApiKeyAuth) defaultClient.getAuthentication("key");
key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//key.setApiKeyPrefix("Token");

BalanceApi apiInstance = new BalanceApi();
try {
Balance result = apiInstance.balance();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BalanceApi#balance");
e.printStackTrace();
}
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://eu1.locationiq.com/v1");

// Configure API key authorization: key
ApiKeyAuth key = (ApiKeyAuth) defaultClient.getAuthentication("key");
key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//key.setApiKeyPrefix("Token");

BalanceApi apiInstance = new BalanceApi(defaultClient);
try {
Balance result = apiInstance.balance();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BalanceApi#balance");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

```
Expand All @@ -110,6 +114,10 @@ All URIs are relative to *https://eu1.locationiq.com/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BalanceApi* | [**balance**](docs/BalanceApi.md#balance) | **GET** /balance.php |
*DirectionsApi* | [**directions**](docs/DirectionsApi.md#directions) | **GET** /directions/driving/{coordinates} | Directions Service
*MatchingApi* | [**matching**](docs/MatchingApi.md#matching) | **GET** /matching/driving/{coordinates} | Matching Service
*MatrixApi* | [**matrix**](docs/MatrixApi.md#matrix) | **GET** /matrix/driving/{coordinates} | Matrix Service
*NearestApi* | [**nearest**](docs/NearestApi.md#nearest) | **GET** /nearest/driving/{coordinates} | Nearest Service
*ReverseApi* | [**reverse**](docs/ReverseApi.md#reverse) | **GET** /reverse.php | Reverse Geocoding
*SearchApi* | [**search**](docs/SearchApi.md#search) | **GET** /search.php | Forward Geocoding

Expand All @@ -119,8 +127,16 @@ Class | Method | HTTP request | Description
- [Address](docs/Address.md)
- [Balance](docs/Balance.md)
- [Daybalance](docs/Daybalance.md)
- [DirectionsDirections](docs/DirectionsDirections.md)
- [DirectionsDirectionsRoutes](docs/DirectionsDirectionsRoutes.md)
- [DirectionsMatching](docs/DirectionsMatching.md)
- [DirectionsMatrix](docs/DirectionsMatrix.md)
- [DirectionsMatrixSources](docs/DirectionsMatrixSources.md)
- [DirectionsNearest](docs/DirectionsNearest.md)
- [DirectionsNearestWaypoints](docs/DirectionsNearestWaypoints.md)
- [Error](docs/Error.md)
- [Location](docs/Location.md)
- [Matchquality](docs/Matchquality.md)
- [Namedetails](docs/Namedetails.md)


Expand Down
28 changes: 19 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'

group = 'com.locationiq'
version = '1.0.0'
version = '2.0.0'

buildscript {
repositories {
maven { url "https://repo1.maven.org/maven2" }
jcenter()
}
dependencies {
Expand All @@ -17,7 +19,9 @@ buildscript {
repositories {
jcenter()
}

sourceSets {
main.java.srcDirs = ['src/main/java']
}

if(hasProperty('target') && target == 'android') {

Expand Down Expand Up @@ -94,11 +98,17 @@ if(hasProperty('target') && target == 'android') {
}

dependencies {
compile 'io.swagger:swagger-annotations:1.5.17'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
compile 'com.google.code.gson:gson:2.8.1'
compile 'io.gsonfire:gson-fire:1.8.0'
compile 'org.threeten:threetenbp:1.3.5'
testCompile 'junit:junit:4.12'
compile 'io.swagger:swagger-annotations:1.5.22'
compile "com.google.code.findbugs:jsr305:3.0.2"
compile 'com.squareup.okhttp3:okhttp:3.14.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.14.2'
compile 'com.google.code.gson:gson:2.8.5'
compile 'io.gsonfire:gson-fire:1.8.3'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
compile 'org.threeten:threetenbp:1.4.0'
testCompile 'junit:junit:4.13'
}

javadoc {
options.tags = [ "http.response.details:a:Http Response Details" ]
}
18 changes: 10 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ lazy val root = (project in file(".")).
settings(
organization := "com.locationiq",
name := "locationiq-java-client",
version := "1.0.0",
version := "2.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
publishArtifact in (Compile, packageDoc) := false,
resolvers += Resolver.mavenLocal,
libraryDependencies ++= Seq(
"io.swagger" % "swagger-annotations" % "1.5.17",
"com.squareup.okhttp" % "okhttp" % "2.7.5",
"com.squareup.okhttp" % "logging-interceptor" % "2.7.5",
"com.google.code.gson" % "gson" % "2.8.1",
"org.threeten" % "threetenbp" % "1.3.5" % "compile",
"io.gsonfire" % "gson-fire" % "1.8.0" % "compile",
"junit" % "junit" % "4.12" % "test",
"io.swagger" % "swagger-annotations" % "1.5.22",
"com.squareup.okhttp3" % "okhttp" % "3.14.2",
"com.squareup.okhttp3" % "logging-interceptor" % "3.14.2",
"com.google.code.gson" % "gson" % "2.8.5",
"org.apache.commons" % "commons-lang3" % "3.9",
"org.threeten" % "threetenbp" % "1.4.0" % "compile",
"io.gsonfire" % "gson-fire" % "1.8.3" % "compile",
"javax.annotation" % "jsr250-api" % "1.0" % "compile",
"junit" % "junit" % "4.13" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
)
2 changes: 2 additions & 0 deletions docs/Address.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@


# Address

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**houseNumber** | **String** | | [optional]
Expand Down
2 changes: 2 additions & 0 deletions docs/Balance.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@


# Balance

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | **String** | | [optional]
Expand Down
62 changes: 41 additions & 21 deletions docs/BalanceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,36 @@ The Balance API provides a count of request credits left in the user&#39;s accou
### Example
```java
// Import classes:
//import LocationIq.ApiClient;
//import LocationIq.ApiException;
//import LocationIq.Configuration;
//import LocationIq.auth.*;
//import com.locationiq.client.api.BalanceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: key
ApiKeyAuth key = (ApiKeyAuth) defaultClient.getAuthentication("key");
key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//key.setApiKeyPrefix("Token");

BalanceApi apiInstance = new BalanceApi();
try {
Balance result = apiInstance.balance();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BalanceApi#balance");
e.printStackTrace();
import com.locationiq.client.ApiClient;
import com.locationiq.client.ApiException;
import com.locationiq.client.Configuration;
import com.locationiq.client.auth.*;
import com.locationiq.client.models.*;
import com.locationiq.client.api.BalanceApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://eu1.locationiq.com/v1");

// Configure API key authorization: key
ApiKeyAuth key = (ApiKeyAuth) defaultClient.getAuthentication("key");
key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//key.setApiKeyPrefix("Token");

BalanceApi apiInstance = new BalanceApi(defaultClient);
try {
Balance result = apiInstance.balance();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BalanceApi#balance");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

Expand All @@ -58,3 +67,14 @@ This endpoint does not need any parameter.
- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | The request has been made from an unauthorized domain. | - |
**404** | No location or places were found for the given input | - |
**429** | Request exceeded the rate-limits set on your account | - |
**500** | Internal Server Error | - |

2 changes: 2 additions & 0 deletions docs/Daybalance.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@


# Daybalance

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**day** | **Integer** | | [optional]
Expand Down
Loading