public class Breinify
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
activity(BreinActivity activity)
Method to send an activity asynchronous.
|
static void |
activity(BreinActivity activity,
java.util.function.Consumer<BreinResult> callback)
Method to send an activity asynchronous.
|
static void |
activity(BreinUser user,
java.lang.String activityType)
Method to send an activity asynchronous.
|
static void |
activity(BreinUser user,
java.lang.String activityType,
java.lang.String category,
java.lang.String description)
Method to send an activity asynchronous.
|
static void |
activity(BreinUser user,
java.lang.String activityType,
java.lang.String category,
java.lang.String description,
java.util.function.Consumer<BreinResult> callback)
Method to send an activity asynchronous.
|
static void |
activity(MapBuilder<java.lang.String> identifiers,
java.lang.String activityType)
Method to send an activity asynchronous.
|
static void |
activity(MapBuilder<java.lang.String> identifiers,
java.lang.String activityType,
java.util.function.Consumer<BreinResult> callback)
Method to send an activity asynchronous.
|
static void |
activity(MapBuilder<java.lang.String> identifiers,
java.lang.String activityType,
java.lang.String description)
Method to send an activity asynchronous.
|
static void |
activity(MapBuilder<java.lang.String> identifiers,
java.lang.String activityType,
java.lang.String description,
java.util.function.Consumer<BreinResult> callback)
Method to send an activity asynchronous.
|
static void |
activity(MapBuilder<java.lang.String> identifiers,
java.lang.String activityType,
java.lang.String category,
java.lang.String description,
java.util.function.Consumer<BreinResult> callback)
Method to send an activity asynchronous.
|
protected static Brein |
getBrein() |
static BreinResult |
lookUp(BreinLookup data) |
static BreinRecommendationResult |
recommendation(BreinRecommendation data) |
static BreinRecommendationResults |
recommendation(BreinRecommendations data) |
static Brein |
setConfig(BreinConfig config)
Specifies the overall configuration used by the library.
|
static Brein |
setConfig(java.lang.String apiKey)
Specifies the overall configuration used by the library.
|
static Brein |
setConfig(java.lang.String apiKey,
java.lang.String secret)
Specifies the overall configuration used by the library.
|
static void |
shutdown() |
static BreinTemporalDataResult |
temporalData()
Method to retrieve temporal information based on temporal data.
|
static BreinTemporalDataResult |
temporalData(BreinTemporalData data)
Method to retrieve temporal information based on temporal data.
|
static BreinTemporalDataResult |
temporalData(double latitude,
double longitude,
java.lang.String... shapeTypes)
Method to retrieve temporal information based on temporal data.
|
static BreinTemporalDataResult |
temporalData(java.lang.String ipAddress)
Method to retrieve temporal information based on temporal data.
|
public static Brein setConfig(BreinConfig config)
config - the configuration to useBrein instance, usable if multiple different configurations are usedBrein,
BreinConfigpublic static Brein setConfig(java.lang.String apiKey)
apiKey - the API key to be usedBrein instance, usable if multiple different configurations are usedBreinpublic static Brein setConfig(java.lang.String apiKey, java.lang.String secret)
apiKey - the API key to be usedsecret - the secret to be used to sign the messages (Verification Signature must be enabled for the API
key)Brein instance, usable if multiple different configurations are usedBreinpublic static void activity(MapBuilder<java.lang.String> identifiers, java.lang.String activityType)
identifiers - the identifiers of the user as chainable map (i.e., MapBuilder), e.g., email,
sessionId,
userIdactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticleMapBuilderpublic static void activity(MapBuilder<java.lang.String> identifiers, java.lang.String activityType, java.util.function.Consumer<BreinResult> callback)
identifiers - the identifiers of the user as chainable map (i.e., MapBuilder), e.g., email,
sessionId,
userIdactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticlecallback - callback to get informed whenever the activity was sent, the callback retrieves the BreinResultBreinResult,
MapBuilderpublic static void activity(MapBuilder<java.lang.String> identifiers, java.lang.String activityType, java.lang.String description)
identifiers - the identifiers of the user as chainable map (i.e., MapBuilder), e.g., email,
sessionId,
userIdactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticledescription - a textual description of the activityMapBuilderpublic static void activity(MapBuilder<java.lang.String> identifiers, java.lang.String activityType, java.lang.String description, java.util.function.Consumer<BreinResult> callback)
identifiers - the identifiers of the user as chainable map (i.e., MapBuilder), e.g., email,
sessionId,
userIdactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticledescription - a textual description of the activitycallback - callback to get informed whenever the activity was sent, the callback retrieves the BreinResult, can be nullBreinResult,
MapBuilderpublic static void activity(MapBuilder<java.lang.String> identifiers, java.lang.String activityType, java.lang.String category, java.lang.String description, java.util.function.Consumer<BreinResult> callback)
identifiers - the identifiers of the user as chainable map (i.e., MapBuilder), e.g., email,
sessionId,
userIdactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticlecategory - a category of the activity, e.g., apparel, food, or other, if null the configured
default category will be useddescription - a textual description of the activitycallback - callback to get informed whenever the activity was sent, the callback retrieves the BreinResultBreinResult,
BreinConfig.setDefaultCategory(String),
MapBuilderpublic static void activity(BreinUser user, java.lang.String activityType)
user - the BreinUser instance specifying information about the user performing the activityactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticleBreinUserpublic static void activity(BreinUser user, java.lang.String activityType, java.lang.String category, java.lang.String description)
user - the BreinUser instance specifying information about the user performing the activityactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticlecategory - a category of the activity, e.g., apparel, food, or other, if null the configured
default category will be useddescription - a textual description of the activityBreinUser,
BreinConfig.setDefaultCategory(String)public static void activity(BreinUser user, java.lang.String activityType, java.lang.String category, java.lang.String description, java.util.function.Consumer<BreinResult> callback)
user - the BreinUser instance specifying information about the user performing the activityactivityType - the type of the activity, e.g., login, pageView, addToCart, readArticlecategory - a category of the activity, e.g., apparel, food, or other, if null the configured
default category will be useddescription - a textual description of the activitycallback - callback to get informed whenever the activity was sent, the callback retrieves the BreinResultBreinUser,
BreinConfig.setDefaultCategory(String),
BreinResultpublic static void activity(BreinActivity activity)
activity - the BreinActivity to be sentBreinActivitypublic static void activity(BreinActivity activity, java.util.function.Consumer<BreinResult> callback)
activity - the BreinActivity to be sentcallback - callback to get informed whenever the activity was sent, the callback retrieves the BreinResultBreinActivity,
BreinResultpublic static BreinTemporalDataResult temporalData()
BreinTemporalDataResultBreinTemporalDataResultpublic static BreinTemporalDataResult temporalData(java.lang.String ipAddress)
ipAddress to
determine further information, i.e., weather, location, events, time, timezone, and holidays.ipAddress - the address to resolve the information forBreinTemporalDataResultBreinTemporalDataResultpublic static BreinTemporalDataResult temporalData(double latitude, double longitude, java.lang.String... shapeTypes)
latitude and longitude to determine further information, i.e., weather, location, events, time, timezone, and holidays.latitude - the latitude of the geo-coordinates to resolvelongitude - the longitude of the geo-coordinates to resolveshapeTypes - the shape-types to retrieve (if empty, no shape-types will be returned), e.g., CITY,
NEIGHBORHOOD, ZIP-CODESBreinTemporalDataResultBreinTemporalDataResultpublic static BreinTemporalDataResult temporalData(BreinTemporalData data)
BreinTemporalData.data - the data specifying the temporal data to retrieve the temporal information forBreinTemporalDataResultBreinTemporalData,
BreinTemporalDataResultpublic static void shutdown()
protected static Brein getBrein()
public static BreinRecommendationResult recommendation(BreinRecommendation data)
public static BreinRecommendationResults recommendation(BreinRecommendations data)
public static BreinResult lookUp(BreinLookup data)
Copyright © Breinify - All Rights Reserved.