Code Monkey home page Code Monkey logo

jopencage's Introduction

JOpenCage

Maven Central Tests

This api provides a java client to the OpenCage geocoding service. https://opencagedata.com/api

End of life

This repository reached its end of life, please refer to https://github.com/OpenCageData/jopencage for up-to-date releases.

Usage

Maven

  <dependency>
    <groupId>com.byteowls</groupId>
    <artifactId>jopencage</artifactId>
    <version>replace.with.version</version>
  </dependency>

Gradle

    implementation "com.byteowls:jopencage:REPLACE.WITH.VERSION"

Example

Forward

// In real live application the JOpenCageGeocoder should be a Singleton
JOpenCageGeocoder jOpenCageGeocoder = new JOpenCageGeocoder(YOUR_API_KEY);

JOpenCageForwardRequest request = new JOpenCageForwardRequest("Graz");
request.setMinConfidence(1);
request.setNoAnnotations(false);
request.setNoDedupe(true);
JOpenCageResponse response = jOpenCageGeocoder.forward(request);

Reverse

// In real live application the JOpenCageGeocoder should be a Singleton
JOpenCageGeocoder jOpenCageGeocoder = new JOpenCageGeocoder(YOUR_API_KEY);

JOpenCageReverseRequest request = new JOpenCageReverseRequest(-22.6792, 14.5272);
request.setNoAnnotations(true);

JOpenCageResponse response = jOpenCageGeocoder.reverse(request);

Libraries

  • JDK 8+
  • Apache Http Client
  • FasterXml Jackson
  • Slf4j

Testing

For running the tests you have to use your OWN OpenCage API Key. Get a free trial key at https://opencagedata.com/dashboard#api-keys

./gradlew -DOPENCAGE_API_KEY=<your apikey> test

Gradle

./gradlew wrapper --gradle-version 6.8.3

Contribute

See Contribution Guidelines.

Changelog

See CHANGELOG.

License

Apache 2.0. Please see LICENSE.

Disclaimer

We have no business relation to OpenCage.

jopencage's People

Contributors

agxs avatar cohenlea avatar damade avatar dexilon avatar dexyon avatar faferreyra avatar freyfogle avatar lpellegr avatar moberwasserlechner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.