public class Client
extends org.usergrid.java.client.Client
Modifier and Type | Field and Description |
---|---|
static boolean |
FORCE_PUBLIC_API |
static String |
LOCAL_API_URL |
static String |
LOCAL_STANDALONE_API_URL |
static String |
LOCAL_TOMCAT_API_URL |
static String |
PUBLIC_API_URL |
Constructor and Description |
---|
Client()
Default constructor for instantiating a client.
|
Client(String organizationId,
String applicationId)
Instantiate client for a specific app
|
Modifier and Type | Method and Description |
---|---|
void |
addUserToGroupAsync(String userId,
String groupId,
ApiResponseCallback callback)
Adds a user to the specified groups.
|
void |
authorizeAppClientAsync(String clientId,
String clientSecret,
ApiResponseCallback callback)
Log the app in with it's client id and client secret key.
|
void |
authorizeAppUserAsync(String email,
String password,
ApiResponseCallback callback)
Log the user in and get a valid access token.
|
void |
authorizeAppUserViaFacebookAsync(String fb_access_token,
ApiResponseCallback callback)
Log the user in with their numeric pin-code and get a valid access token.
|
void |
authorizeAppUserViaPinAsync(String email,
String pin,
ApiResponseCallback callback)
Log the user in with their numeric pin-code and get a valid access token.
|
void |
connectEntitiesAsync(String connectingEntityType,
String connectingEntityId,
String connectionType,
String connectedEntityId,
ApiResponseCallback callback)
Connect two entities together.
|
void |
createEntityAsync(org.usergrid.java.client.entities.Entity entity,
ApiResponseCallback callback)
Create a new entity on the server.
|
void |
createEntityAsync(Map<String,Object> properties,
ApiResponseCallback callback)
Create a new entity on the server from a set of properties.
|
void |
createGroupAsync(String groupPath,
ApiResponseCallback callback)
Creates a group with the specified group path.
|
void |
createGroupAsync(String groupPath,
String groupTitle,
ApiResponseCallback callback)
Creates a group with the specified group path and group title.
|
void |
createUserAsync(String username,
String name,
String email,
String password,
ApiResponseCallback callback)
Creates a user.
|
void |
disconnectEntitiesAsync(String connectingEntityType,
String connectingEntityId,
String connectionType,
String connectedEntityId,
ApiResponseCallback callback)
Disconnect two entities.
|
void |
getGroupsForUserAsync(String userId,
GroupsRetrievedCallback callback)
Get the groups for the user.
|
void |
postGroupActivityAsync(String groupId,
String verb,
String title,
String content,
String category,
org.usergrid.java.client.entities.User user,
org.usergrid.java.client.entities.Entity object,
String objectType,
String objectName,
String objectContent,
ApiResponseCallback callback)
Creates and posts an activity to a group.
|
void |
postUserActivityAsync(String verb,
String title,
String content,
String category,
org.usergrid.java.client.entities.User user,
org.usergrid.java.client.entities.Entity object,
String objectType,
String objectName,
String objectContent,
ApiResponseCallback callback)
Creates and posts an activity to a user.
|
void |
queryActivityFeedForGroupAsync(String groupId,
QueryResultsCallback callback)
Get a group's activity feed.
|
void |
queryActivityFeedForUserAsync(String userId,
QueryResultsCallback callback)
Get a user's activity feed.
|
void |
queryEntitiesRequestAsync(QueryResultsCallback callback,
org.springframework.http.HttpMethod method,
Map<String,Object> params,
Object data,
String... segments)
Perform a query request and return a query object.
|
void |
queryEntityConnectionsAsync(String connectingEntityType,
String connectingEntityId,
String connectionType,
String ql,
QueryResultsCallback callback)
Query the connected entities.
|
void |
queryEntityConnectionsWithinLocationAsync(String connectingEntityType,
String connectingEntityId,
String connectionType,
float distance,
android.location.Location location,
String ql,
QueryResultsCallback callback)
Query the connected entities within distance of a specific point.
|
void |
queryUsersAsync(QueryResultsCallback callback)
Perform a query of the users collection.
|
void |
queryUsersAsync(String ql,
QueryResultsCallback callback)
Perform a query of the users collection using the provided query command.
|
void |
queryUsersForGroupAsync(String groupId,
QueryResultsCallback callback)
Queries the users for the specified group.
|
void |
registerDeviceAsync(android.content.Context context,
Map<String,Object> properties,
DeviceRegistrationCallback callback)
Registers a device using the device's unique device ID.
|
void |
registerDeviceForPushAsync(android.content.Context context,
String notifier,
String token,
Map<String,Object> properties,
DeviceRegistrationCallback callback)
Registers a device using the device's unique device ID.
|
addSubscriber, addUserToGroup, apiRequest, assertValidApplicationId, authorizeAppClient, authorizeAppUser, authorizeAppUserViaFacebook, authorizeAppUserViaPin, changePassword, connectEntities, createEntity, createEntity, createGroup, createGroup, createGroup, createUser, disconnectEntities, getAccessToken, getApiUrl, getApplicationId, getClientId, getClientSecret, getCurrentOrganization, getGroupsForUser, getLoggedInUser, getMessages, getOrganizationId, httpRequest, init, makeLocationQL, postActivity, postActivity, postGroupActivity, postGroupActivity, postMessage, postMessage, postUserActivity, postUserActivity, queryActivity, queryActivityFeedForGroup, queryActivityFeedForUser, queryEntitiesRequest, queryEntityConnections, queryEntityConnectionsWithinLocation, queryGroups, queryQueuesRequest, queryUsers, queryUsers, queryUsersForGroup, queryUsersWithinLocation, registerDevice, registerDeviceForPush, removeSubscriber, setAccessToken, setApiUrl, setApplicationId, setClientId, setClientSecret, setCurrentOrganization, setLoggedInUser, setOrganizationId, withApiUrl, withApplicationId, withClientId, withClientSecret, withOrganizationId
public static boolean FORCE_PUBLIC_API
public static String PUBLIC_API_URL
public static String LOCAL_STANDALONE_API_URL
public static String LOCAL_TOMCAT_API_URL
public static String LOCAL_API_URL
public void authorizeAppUserAsync(String email, String password, ApiResponseCallback callback)
email
- password
- callback
- public void authorizeAppUserViaPinAsync(String email, String pin, ApiResponseCallback callback)
email
- pin
- callback
- public void authorizeAppUserViaFacebookAsync(String fb_access_token, ApiResponseCallback callback)
email
- pin
- callback
- public void authorizeAppClientAsync(String clientId, String clientSecret, ApiResponseCallback callback)
clientId
- clientSecret
- callback
- public void registerDeviceAsync(android.content.Context context, Map<String,Object> properties, DeviceRegistrationCallback callback)
context
- properties
- callback
- public void registerDeviceForPushAsync(android.content.Context context, String notifier, String token, Map<String,Object> properties, DeviceRegistrationCallback callback)
context
- properties
- callback
- public void createEntityAsync(org.usergrid.java.client.entities.Entity entity, ApiResponseCallback callback)
entity
- callback
- public void createEntityAsync(Map<String,Object> properties, ApiResponseCallback callback)
properties
- callback
- public void createUserAsync(String username, String name, String email, String password, ApiResponseCallback callback)
username
- name
- email
- password
- callback
- public void getGroupsForUserAsync(String userId, GroupsRetrievedCallback callback)
userId
- callback
- public void queryActivityFeedForUserAsync(String userId, QueryResultsCallback callback)
userId
- callback
- public void postUserActivityAsync(String verb, String title, String content, String category, org.usergrid.java.client.entities.User user, org.usergrid.java.client.entities.Entity object, String objectType, String objectName, String objectContent, ApiResponseCallback callback)
verb
- title
- content
- category
- user
- object
- objectType
- objectName
- objectContent
- callback
- public void postGroupActivityAsync(String groupId, String verb, String title, String content, String category, org.usergrid.java.client.entities.User user, org.usergrid.java.client.entities.Entity object, String objectType, String objectName, String objectContent, ApiResponseCallback callback)
groupId
- verb
- title
- content
- category
- user
- object
- objectType
- objectName
- objectContent
- callback
- public void queryActivityFeedForGroupAsync(String groupId, QueryResultsCallback callback)
userId
- callback
- public void queryEntitiesRequestAsync(QueryResultsCallback callback, org.springframework.http.HttpMethod method, Map<String,Object> params, Object data, String... segments)
callback
- method
- params
- data
- segments
- public void queryUsersAsync(QueryResultsCallback callback)
callback
- public void queryUsersAsync(String ql, QueryResultsCallback callback)
ql
- callback
- public void queryUsersForGroupAsync(String groupId, QueryResultsCallback callback)
groupId
- callback
- public void addUserToGroupAsync(String userId, String groupId, ApiResponseCallback callback)
userId
- groupId
- callback
- public void createGroupAsync(String groupPath, ApiResponseCallback callback)
groupPath
- callback
- public void createGroupAsync(String groupPath, String groupTitle, ApiResponseCallback callback)
groupPath
- groupTitle
- callback
- public void connectEntitiesAsync(String connectingEntityType, String connectingEntityId, String connectionType, String connectedEntityId, ApiResponseCallback callback)
connectingEntityType
- connectingEntityId
- connectionType
- connectedEntityId
- callback
- public void disconnectEntitiesAsync(String connectingEntityType, String connectingEntityId, String connectionType, String connectedEntityId, ApiResponseCallback callback)
connectingEntityType
- connectingEntityId
- connectionType
- connectedEntityId
- callback
- public void queryEntityConnectionsAsync(String connectingEntityType, String connectingEntityId, String connectionType, String ql, QueryResultsCallback callback)
connectingEntityType
- connectingEntityId
- connectionType
- ql
- callback
- public void queryEntityConnectionsWithinLocationAsync(String connectingEntityType, String connectingEntityId, String connectionType, float distance, android.location.Location location, String ql, QueryResultsCallback callback)
connectingEntityType
- connectingEntityId
- connectionType
- distance
- latitude
- longitude
- callback
- Copyright © 2013. All Rights Reserved.