Commit a93a9dc0 authored by Deepak's avatar Deepak

Updated method names and documentation

parent a3d2484b
......@@ -5,8 +5,8 @@
# PostCodes-io-java
UK Postcode Java API serving up Open Data http://postcodes.io
<b>1. [Lookup a Post Code] (https://github.com/spdeepak/postcodes-io-java#lookup-a-postcode)</b><br/>
<b>2. [Bulk lookup Post Codes](https://github.com/spdeepak/postcodes-io-java#bulk-lookup-postcodes)</b><br/>
<b>1. [Lookup a Post Code] (https://github.com/spdeepak/postcodes-io-java#1-lookup-a-postcode)</b><br/>
<b>2. [Bulk lookup Post Codes](https://github.com/spdeepak/postcodes-io-java#2-bulk-lookup-postcodes)</b><br/>
<b>3.[Get nearest postcodes for a given longitude & latitude] (https://github.com/spdeepak/postcodes-io-java#3get-nearest-postcodes-for-a-given-longitude--latitude)</b><br/>
###1. Lookup a postcode
......
......@@ -69,7 +69,7 @@ public class PostcodeLookup {
* @param latitude
* @return
*/
public static ReverseGeocoding reverseGeocoding(Double longitude, Double latitude) {
public static ReverseGeocoding nearestPostcode(Double longitude, Double latitude) {
return new ReverseGeocoding(longitude, latitude);
}
......
......@@ -87,7 +87,7 @@ public class PostcodeLookupTest {
Unirest.get("https://api.postcodes.io/postcodes").queryString("lon", 0.629834723775309)
.queryString("lat", 51.7923246977375).queryString("limit", 100).queryString("radius", 2000)
.queryString("widesearch", true).asJson().getBody().getObject(),
PostcodeLookup.reverseGeocoding(0.629834723775309, 51.7923246977375).limit(100).radius(2000)
PostcodeLookup.nearestPostcode(0.629834723775309, 51.7923246977375).limit(100).radius(2000)
.wideSearch(true).asJson(),
JSONCompareMode.STRICT);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment