public class EventRequest extends Object
| Constructor and Description |
|---|
EventRequest(String pixelId,
APIContext context)
Constructor.
|
EventRequest(String pixelId,
APIContext context,
List<Event> data,
String testEventCode,
String partnerAgent,
String namespaceId,
String uploadId,
String uploadTag,
String uploadSource,
HttpServiceInterface httpServiceClient)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
EventRequest |
addDataItem(Event dataItem)
Add a Server Event object
|
EventRequest |
cloneWithoutData() |
EventRequest |
data(List<Event> data)
Set a list of Server Event objects
|
boolean |
equals(Object o) |
EventResponse |
execute()
Synchronously send Event to Facebook GraphAPI.
|
com.google.common.util.concurrent.ListenableFuture<EventResponse> |
executeAsync()
Asynchronously send Event to Facebook GraphAPI.
|
List<Event> |
getData()
A list of Server Event objects
|
HttpServiceInterface |
getHttpServiceClient()
Get the httpServiceClient.
|
String |
getNamespaceId()
The namespace id is a scope used to resolve extern_id or Third-party ID.
|
String |
getPartnerAgent()
A value that represents the platform that is sending the event.
|
String |
getSerializedPayload() |
String |
getTestEventCode()
Code used to verify that your server events are received correctly by Facebook.
|
String |
getUploadId()
The upload id is a unique id used to denote the current set being uploaded.
|
String |
getUploadSource()
The upload source is the origin/source of data for the dataset to be uploaded.
|
String |
getUploadTag()
The upload tag is a tag string added to track your Offline event uploads.
|
int |
hashCode() |
EventRequest |
namespaceId(String namespaceId)
Set namespace id
|
EventRequest |
partnerAgent(String partnerAgent)
Sets a value that represents the platform that is sending the event.
|
void |
setData(List<Event> data)
Set a list of Server Event objects
|
void |
setHttpServiceClient(HttpServiceInterface httpServiceClient)
Set a custom http client that will be used to send the event request.
|
void |
setNamespaceId(String namespaceId)
Set namespace id
|
void |
setPartnerAgent(String partnerAgent)
Set a value that represents the platform that is sending the event.
|
void |
setTestEventCode(String testEventCode)
Set code used to verify that your server events are received correctly by Facebook.
|
void |
setUploadId(String uploadId)
Set upload id
|
void |
setUploadSource(String uploadSource)
Set upload source
|
void |
setUploadTag(String uploadTag)
Set upload tag
|
EventRequest |
testEventCode(String testEventCode)
Set code used to verify that your server events are received correctly by Facebook.
|
String |
toString() |
EventRequest |
uploadId(String uploadId)
Set upload id
|
EventRequest |
uploadSource(String uploadSource)
Set upload source
|
EventRequest |
uploadTag(String uploadTag)
Set upload tag
|
public EventRequest(String pixelId, APIContext context)
pixelId - Ad pixel idcontext - Api contextpublic EventRequest(String pixelId, APIContext context, List<Event> data, String testEventCode, String partnerAgent, String namespaceId, String uploadId, String uploadTag, String uploadSource, HttpServiceInterface httpServiceClient)
pixelId - Ad pixel idcontext - Api contextdata - list of eventtestEventCode - code used to verify that your server events are received correctly bypartnerAgent - A value that represents the platform that is sending the eventnamespaceId - Scope used to resolve extern_id or Third-party ID. Can be another data set or data partner ID.uploadId - Unique id used to denote the current set being uploaded.uploadTag - Tag string added to track your Offline event uploads.uploadSource - The origin/source of data for the dataset to be uploaded.httpServiceClient - The HttpServiceInterface client to use for executing the request.
Facebookpublic EventRequest data(List<Event> data)
data - list of Server Eventpublic EventRequest addDataItem(Event dataItem)
dataItem - Server Eventpublic void setData(List<Event> data)
data - list of Server Eventpublic String getNamespaceId()
public void setNamespaceId(String namespaceId)
namespaceId - Scope used to resolve extern_id or Third-party ID. Can be another data set or data partner ID.public EventRequest namespaceId(String namespaceId)
namespaceId - Scope used to resolve extern_id or Third-party ID. Can be another data set or data partner ID.public String getUploadId()
public void setUploadId(String uploadId)
uploadId - Unique id used to denote the current set being uploaded.public EventRequest uploadId(String uploadId)
uploadId - Unique id used to denote the current set being uploaded.public String getUploadTag()
public void setUploadTag(String uploadTag)
uploadTag - Tag string added to track your Offline event uploads.public EventRequest uploadTag(String uploadTag)
uploadTag - Tag string added to track your Offline event uploads.public String getUploadSource()
public void setUploadSource(String uploadSource)
uploadSource - The origin/source of data for the dataset to be uploaded.public EventRequest uploadSource(String uploadSource)
uploadSource - The origin/source of data for the dataset to be uploaded.public EventRequest testEventCode(String testEventCode)
testEventCode - ode used to verify that your server eventspublic String getTestEventCode()
public void setTestEventCode(String testEventCode)
testEventCode - ode used to verify that your server eventspublic EventRequest partnerAgent(String partnerAgent)
partnerAgent - a value that represents the platform that is sending the eventpublic String getPartnerAgent()
public void setPartnerAgent(String partnerAgent)
partnerAgent - a value that represents the platform that is sending the eventpublic HttpServiceInterface getHttpServiceClient()
public void setHttpServiceClient(HttpServiceInterface httpServiceClient)
httpServiceClient - the object implementing HttpServiceInterfacepublic EventResponse execute() throws APIException
APIException - Api Exceptionpublic com.google.common.util.concurrent.ListenableFuture<EventResponse> executeAsync() throws APIException
APIException - Api Exceptionpublic String getSerializedPayload()
public EventRequest cloneWithoutData()
Copyright © 2020. All rights reserved.