Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update POM and README for Counter
  • Loading branch information
alaksmana committed Sep 3, 2018
commit 4863e7db404096c33937a273bbecb780f41cf686
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,38 @@ UsergridResponse response = Usergrid.GET(query);
List<UsergridEntity> entities = response.getEntities();
```

- To get list of counter IDs:

```java
List<String> counteridslist = Usergrid.GETcounters();

Example:

"data": [
"application.collection.roles",
"application.collection.tblmformmanagements",
"application.collection.tblmforms",
"application.collection.tblmmodules",
"application.collection.tblmscreens",
"application.collection.users",
"application.collection.xmenus",
"application.entities",
"application.requests.delete",
"application.requests.get",
"application.requests.post",
"application.requests.put"
]

```

- To get value of a specific counter by ID:

```java
long countervalue = Usergrid.GETcounterbyid("counterid");

Example: 12345
```

### POST and PUT

POST and PUT requests both require a JSON body payload. You can pass either a Java object or a `UsergridEntity` instance. While the former works in principle, best practise is to use a `UsergridEntity` wherever practical. When an entity has a uuid or name property and already exists on the server, use a PUT request to update it. If it does not, use POST to create it.
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid-java-client</artifactId>
<version>2.2.2-SNAPSHOT</version>
<version>2.2.2</version>
<packaging>jar</packaging>
<description>A Java client for Usergrid</description>
<url>http://usergrid.apache.org</url>
Expand All @@ -23,6 +23,11 @@
<name>71e4bfd61496-releases</name>
<url>http://192.168.0.50:8081/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>71e4bfd61496-snapshots</name>
<url>http://192.168.0.50:8081/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>

<licenses>
Expand Down