Skip to content

Commit

Permalink
Merge pull request #16 from broady/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
markmcd committed Sep 9, 2014
2 parents dd39062 + e7348ae commit e466c95
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,36 @@ Business customers can use their [client ID and secret](https://developers.googl
### POJOs
Native objects for each of the API responses.

### Asynchronous or synchronous -- you choose

All requests support synchronous or asynchronous calling style.
```java
GeocodingApiRequest req = GeocodingApi.newRequest(context).address("Sydney");

// Synchronous
try {
req.await();
// Handle successful request.
} catch (Exception e) {
// Handle error
}

req.awaitIgnoreError(); // No checked exception.

// Async
req.setCallback(new PendingResult.Callback<GeocodingResult[]>() {
@Override
public void onResult(GeocodingResult[] result) {
// Handle successful request.
}

@Override
public void onFailure(Throwable e) {
// Handle error.
}
});
```

API Coverage
------------

Expand All @@ -74,3 +104,20 @@ The following APIs are supported:
* [Elevation API](https://developers.google.com/maps/documentation/elevation)
* [Geocoding API](https://developers.google.com/maps/documentation/geocoding)
* [Time Zone API](https://developers.google.com/maps/documentation/timezone)

Building the project
--------------------

```
# Compile and package the project
./gradlew jar
# Run the tests. Note: you will need an API key to run the tests.
API_KEY=AIza.... ./gradlew test
# Run the tests with enterprise credentials.
API_KEY=... CLIENT_ID=... CLIENT_SECRET=... ./gradlew test
# Generate documentation
./gradlew javadoc
```

0 comments on commit e466c95

Please sign in to comment.