Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.symphonyoss.symphony.agent.api;
import org.symphonyoss.symphony.agent.invoker.ApiException;
import org.symphonyoss.symphony.agent.invoker.ApiClient;
import org.symphonyoss.symphony.agent.invoker.Configuration;
import org.symphonyoss.symphony.agent.invoker.Pair;
import javax.ws.rs.core.GenericType;
import org.symphonyoss.symphony.agent.model.Datafeed;
import org.symphonyoss.symphony.agent.model.Error;
import org.symphonyoss.symphony.agent.model.MessageList;
import org.symphonyoss.symphony.agent.model.V2MessageList;
import org.symphonyoss.symphony.agent.model.V4EventList;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-14T03:33:40.723-04:00")
public class DatafeedApi {
private ApiClient apiClient;
public DatafeedApi() {
this(Configuration.getDefaultApiClient());
}
public DatafeedApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create a new real time message event stream.
* A datafeed provides the messages in all conversations that a user is in. System messages like new users joining a chatroom are not part of the datafeed. A datafeed will expire after if it isn't read before its capacity is reached.
* @param sessionToken Session authentication token. (required)
* @param keyManagerToken Key Manager authentication token. (required)
* @return Datafeed
* @throws ApiException if fails to make API call
*/
public Datafeed v1DatafeedCreatePost(String sessionToken, String keyManagerToken) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'sessionToken' is set
if (sessionToken == null) {
throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v1DatafeedCreatePost");
}
// verify the required parameter 'keyManagerToken' is set
if (keyManagerToken == null) {
throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v1DatafeedCreatePost");
}
// create path and map variables
String localVarPath = "/v1/datafeed/create".replaceAll("\\{format\\}","json");
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sessionToken != null)
localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Read a given datafeed.
* Read messages from the given datafeed. If no more messages are available then this method will block. It is intended that the client should re-call this method as soon as it has processed the messages received in the previous call. If the client is able to consume messages more quickly than they become available then each call will initially block, there is no need to delay before re-calling this method. A datafeed will expire if its unread capacity is reached. A datafeed can only be consumed by one client thread at a time. E.g. polling the datafeed by two threads may lead to messages being delivered out of order.
* @param id Datafeed ID (required)
* @param sessionToken Session authentication token. (required)
* @param keyManagerToken Key Manager authentication token. (required)
* @param maxMessages Max No. of messages to return. (optional)
* @return MessageList
* @throws ApiException if fails to make API call
*/
public MessageList v1DatafeedIdReadGet(String id, String sessionToken, String keyManagerToken, Integer maxMessages) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling v1DatafeedIdReadGet");
}
// verify the required parameter 'sessionToken' is set
if (sessionToken == null) {
throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v1DatafeedIdReadGet");
}
// verify the required parameter 'keyManagerToken' is set
if (keyManagerToken == null) {
throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v1DatafeedIdReadGet");
}
// create path and map variables
String localVarPath = "/v1/datafeed/{id}/read".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "maxMessages", maxMessages));
if (sessionToken != null)
localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Read a given datafeed.
* Read messages from the given datafeed. If no more messages are available then this method will block. It is intended that the client should re-call this method as soon as it has processed the messages received in the previous call. If the client is able to consume messages more quickly than they become available then each call will initially block, there is no need to delay before re-calling this method. A datafeed will expire if its unread capacity is reached. A datafeed can only be consumed by one client thread at a time. E.g. polling the datafeed by two threads may lead to messages being delivered out of order.
* @param id Datafeed ID (required)
* @param sessionToken Session authentication token. (required)
* @param keyManagerToken Key Manager authentication token. (required)
* @param maxMessages Max No. of messages to return. (optional)
* @return V2MessageList
* @throws ApiException if fails to make API call
*/
public V2MessageList v2DatafeedIdReadGet(String id, String sessionToken, String keyManagerToken, Integer maxMessages) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling v2DatafeedIdReadGet");
}
// verify the required parameter 'sessionToken' is set
if (sessionToken == null) {
throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v2DatafeedIdReadGet");
}
// verify the required parameter 'keyManagerToken' is set
if (keyManagerToken == null) {
throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v2DatafeedIdReadGet");
}
// create path and map variables
String localVarPath = "/v2/datafeed/{id}/read".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "maxMessages", maxMessages));
if (sessionToken != null)
localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create a new real time message event stream.
* A datafeed provides the messages in all conversations that a user is in. This also includes system messages like new users joining a chatroom. A datafeed will expire if it isn't read before its capacity is reached.
* @param sessionToken Session authentication token. (required)
* @param keyManagerToken Key Manager authentication token. (required)
* @return Datafeed
* @throws ApiException if fails to make API call
*/
public Datafeed v4DatafeedCreatePost(String sessionToken, String keyManagerToken) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'sessionToken' is set
if (sessionToken == null) {
throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v4DatafeedCreatePost");
}
// verify the required parameter 'keyManagerToken' is set
if (keyManagerToken == null) {
throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v4DatafeedCreatePost");
}
// create path and map variables
String localVarPath = "/v4/datafeed/create".replaceAll("\\{format\\}","json");
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sessionToken != null)
localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Read a given datafeed.
* Read messages from the given datafeed. If no more messages are available then this method will block. It is intended that the client should re-call this method as soon as it has processed the messages received in the previous call. If the client is able to consume messages more quickly than they become available then each call will initially block, there is no need to delay before re-calling this method. A datafeed will expire if its unread capacity is reached. A datafeed can only be consumed by one client thread at a time. E.g. polling the datafeed by two threads may lead to messages being delivered out of order.
* @param id Datafeed ID (required)
* @param sessionToken Session authentication token. (required)
* @param keyManagerToken Key Manager authentication token. (required)
* @param limit Max No. of messages to return. (optional)
* @return V4EventList
* @throws ApiException if fails to make API call
*/
public V4EventList v4DatafeedIdReadGet(String id, String sessionToken, String keyManagerToken, Integer limit) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling v4DatafeedIdReadGet");
}
// verify the required parameter 'sessionToken' is set
if (sessionToken == null) {
throw new ApiException(400, "Missing the required parameter 'sessionToken' when calling v4DatafeedIdReadGet");
}
// verify the required parameter 'keyManagerToken' is set
if (keyManagerToken == null) {
throw new ApiException(400, "Missing the required parameter 'keyManagerToken' when calling v4DatafeedIdReadGet");
}
// create path and map variables
String localVarPath = "/v4/datafeed/{id}/read".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
if (sessionToken != null)
localVarHeaderParams.put("sessionToken", apiClient.parameterToString(sessionToken));
if (keyManagerToken != null)
localVarHeaderParams.put("keyManagerToken", apiClient.parameterToString(keyManagerToken));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}