public class BreinRecommendation extends BreinBase<BreinRecommendation> implements IExecutable<BreinResult>
BreinBase.BaseFieldAPI_KEY_FIELD, GSON, SIGNATURE_FIELD, SIGNATURE_TYPE_FIELD, UNIX_TIMESTAMP_FIELD| Constructor and Description |
|---|
BreinRecommendation() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
createSignature(BreinConfig config,
java.util.Map<java.lang.String,java.lang.Object> requestData)
Generates the signature for the request
|
BreinResult |
execute()
Method to execute the request synchronous.
|
java.lang.String |
getCategory()
get the recommendation category
|
java.lang.String |
getEndPoint(BreinConfig config)
Gets the endpoint to be used to send the request to
|
int |
getNumberOfRecommendations()
get the number of recommendations
|
void |
prepareRequestData(BreinConfig config,
java.util.Map<java.lang.String,java.lang.Object> requestData)
This method adds the request specific information to the
requestData. |
BreinRecommendation |
setCategory(java.lang.String category)
set the recommendation category
|
BreinRecommendation |
setNumberOfRecommendations(int numberOfRecommendations)
set the number of recommendations
|
getBaseField, getGson, getThis, getUnixTimestamp, getUser, prepareRequestData, set, setAdditional, setClientIpAddress, setUnixTimestamp, setUser, setUser, toStringpublic int getNumberOfRecommendations()
public BreinRecommendation setNumberOfRecommendations(int numberOfRecommendations)
numberOfRecommendations - number of recommendationspublic java.lang.String getCategory()
public BreinRecommendation setCategory(java.lang.String category)
category - contains the categorypublic java.lang.String getEndPoint(BreinConfig config)
BreinBasegetEndPoint in class BreinBase<BreinRecommendation>config - the current configurationBreinConfigpublic void prepareRequestData(BreinConfig config, java.util.Map<java.lang.String,java.lang.Object> requestData)
BreinBaserequestData. It is called by BreinBase.prepareRequestData(BreinConfig) after the request data of the base information is added.prepareRequestData in class BreinBase<BreinRecommendation>requestData - the request data to be sent to the endpointpublic java.lang.String createSignature(BreinConfig config, java.util.Map<java.lang.String,java.lang.Object> requestData)
createSignature in interface ISecretStrategyconfig - the configurationrequestData - the data used for the request including all the data that will be sent, without the signaturepublic BreinResult execute()
IExecutableexecute in interface IExecutable<BreinResult>Copyright © Breinify - All Rights Reserved.