README.md in loqate-0.8.0 vs README.md in loqate-0.9.0
- old
+ new
@@ -19,10 +19,12 @@
- [Address API](#address-api)
- [Finding addresses](#finding-addresses)
- [Retrieving the details of an address](#retrieving-the-details-of-an-address)
- [Geocoding API](#geocoding-api)
- [Finding directions](#finding-directions)
+ - [Geocoding a location](#geocoding-a-location)
+ - [Finding a country based on coordinates](#finding-a-country-based-on-coordinates)
- [Phone API](#phone-api)
- [Validating a phone number](#validating-a-phone-number)
- [Email API](#phone-api)
- [Validating an email address](#validating-an-email-address)
- [Validating multiple email addresses](#validating-multiple-email-addresses)
@@ -138,9 +140,21 @@
directions = gateway.geocoding.directions!(
start: [51.5079532, -0.1266053],
finish: [51.5078677, -0.1266825]
)
directions.first.description # => 'Leave from Strand/A4'
+```
+
+#### Geocoding a location
+```ruby
+location = gateway.geocoding.geocode!(country: 'US', location: '90210')
+location.name # => 'Beverly Hills, CA 90210'
+```
+
+#### Finding a country based on coordinates
+```ruby
+country = gateway.geocoding.position_to_country!(latitude: 52.1321, longitude: -2.1001)
+country.country_name # => 'United Kingdom'
```
### Phone API
The Phone API consists of a single API request: