summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2016-04-09 16:35:59 -0700
committerJesse Morgan <jesse@jesterpm.net>2016-04-09 16:35:59 -0700
commit128614ef380dc405b8fd87b8352623839c40dcba (patch)
tree364e1ba39fcfb5bdccb42a7f3f835d5cbd968399
parentee1ad67ab3d1f23701fb55f63d9952736bcdaae1 (diff)
Adding maven example to README.md
-rw-r--r--README.md16
1 files changed, 13 insertions, 3 deletions
diff --git a/README.md b/README.md
index dbfbf5a..4eda590 100644
--- a/README.md
+++ b/README.md
@@ -22,14 +22,24 @@ if the one you need is missing.
## Usage
-1. Create a single instance of CCBAPIClient for your application.
+1. If you're using Maven or Ivy, add a dependency on the [latest release](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.p4square%22%20AND%20a%3A%22ccbapi%22):
+
+ ```xml
+ <dependency>
+ <groupId>com.p4square</groupId>
+ <artifactId>ccbapi</artifactId>
+ <version>1.0</version>
+ </dependency>
+ ```
+
+2. Create a single instance of CCBAPIClient for your application.
CCBAPIClient is thread-safe and manages its own pool of HTTP connections.
```java
CCBAPI ccbClient = new CCBAPIClient("mychurch", "myuser", "mypassword");
```
-2. Call the necessary APIs. For example, to get an individual by id:
+3. Call the necessary APIs. For example, to get an individual by id:
```java
try {
@@ -45,7 +55,7 @@ CCBAPIClient is thread-safe and manages its own pool of HTTP connections.
}
```
-3. Do something useful with the responses from CCB.
+4. Do something useful with the responses from CCB.
```java
IndividualProfile profile = response.getIndividuals().get(0);