sypexgeo4j

Java API for Sypex Geo Web Service

License

License

Categories

Categories

Geo Business Logic Libraries Geospatial
GroupId

GroupId

com.github.sypexgeo
ArtifactId

ArtifactId

sypexgeo
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

sypexgeo4j
Java API for Sypex Geo Web Service
Project URL

Project URL

https://github.com/sypexgeo/sypexgeo4j
Source Code Management

Source Code Management

http://github.com/sypexgeo/sypexgeo4j

Download sypexgeo

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.sypexgeo/sypexgeo/ -->
<dependency>
    <groupId>com.github.sypexgeo</groupId>
    <artifactId>sypexgeo</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.sypexgeo/sypexgeo/
implementation 'com.github.sypexgeo:sypexgeo:1.0.1'
// https://jarcasting.com/artifacts/com.github.sypexgeo/sypexgeo/
implementation ("com.github.sypexgeo:sypexgeo:1.0.1")
'com.github.sypexgeo:sypexgeo:jar:1.0.1'
<dependency org="com.github.sypexgeo" name="sypexgeo" rev="1.0.1">
  <artifact name="sypexgeo" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.sypexgeo', module='sypexgeo', version='1.0.1')
)
libraryDependencies += "com.github.sypexgeo" % "sypexgeo" % "1.0.1"
[com.github.sypexgeo/sypexgeo "1.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.jetbrains : annotations jar 13.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

sypexgeo4j - is a Java REST client for Sypex geo service. Sypex REST API allows to run up to 10000 requests per month for free.

[Build Status] (https://travis-ci.org/sypexgeo/sypexgeo4j)

Maven

<dependency>
    <groupId>com.github.sypexgeo</groupId>
    <artifactId>sypexgeo</artifactId>
    <version>1.0.1</version>
</dependency

Usage

// Initialize client. The 'auth key' may be null
SxGeoResult result = SxRestClient.create("auth key").get("93.92.217.228");
result.setCache(myCacheImpl); // set cache implementation (optional) 

// Most important fields have dedicated fields
result.city.name.en() ➟ "Seattle"
result.city.name.ru() ➟ "Сиэтл"
result.city.timeZone ➟ "America/Los_Angeles"
result.region.name.de() ➟ "Washington (Bundesstaat)"
result.country.name.fr() ➟ "États-Unis"

// All values from response are available as attributes
res.country.getStringAttribute(SxValue.AREA)  ➟ "9629091"
res.country.getIntAttribute(SxValue.AREA)  ➟ 9629091

Requirements

Java 1.8+

License

This project available under Apache License Version 2.0

Versions

Version
1.0.1