diff --git a/README.md b/README.md index 338a6fc..a62296e 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ First of all, you need a valid API-key, which you can get for free at [https://w **772A-47D7-93A3-4EA9-9D73-85B9-479B-16C6** -There are currently two different end-points available through the API. The first one is used to send data - so called activities - to the engine, whereas the second one is used to retrieve data from it (lookup). +There are currently three different end-points available through the API. The first one is used to send data - so called activities - to the engine, whereas the second is used to retrieve temporal data from the engine for a visitor (e.g., the current city, weather, or the current timezone, or the current holidays), and the last one is used to look up detailed information about your visitor (e.g., first name). The following code-snippet shows how easy it is to utilize the different end-points: ```html - + + ``` > diff --git a/documentation/snippets/temporal.md b/documentation/snippets/temporal.md index d08ac53..8fb2a2f 100644 --- a/documentation/snippets/temporal.md +++ b/documentation/snippets/temporal.md @@ -1,8 +1,8 @@ > ```javascript > var withSecret = false; > -> // Example with just IP address set -> var response = Breinify.temporalData({ -> 'ipAddress': '74.115.209.58' -> }, withSecret); +> // Example to retrieve temporal information through available information +> Breinify.temporalData(function(data) { +> window.alert(JSON.stringify(data, null, 2)); +> }); > ``` diff --git a/documentation/snippets/temporalfull.md b/documentation/snippets/temporalfull.md index 7367e12..9c037cb 100644 --- a/documentation/snippets/temporalfull.md +++ b/documentation/snippets/temporalfull.md @@ -1,10 +1,8 @@ > ```javascript > var withSecret = false; -> -> // Example with full user data -> var response = Breinify.temporalData({ -> 'ipAddress': '74.115.209.58', -> 'localDateTime': 'Wed Oct 26 2016 13:02:06 GMT-0700 (EDT)', -> 'timezone': 'America/New_York' -> }, withSecret); +> +> // Example to retrieve temporal information through additional information +> Breinify.temporalData({ 'email':'example@breinify.com' }, function(data) { +> window.alert(JSON.stringify(data, null, 2)); +> }); > ``` diff --git a/documentation/step-by-step.md b/documentation/step-by-step.md index 2c25553..b36bbcf 100644 --- a/documentation/step-by-step.md +++ b/documentation/step-by-step.md @@ -29,13 +29,15 @@ bower install https://github.com/breinify/brein-api-library-javascript-browser/t ``` ##### Using *npm* to download the library -Please pick 1 of the following: +Please pick one of the following: ```bash npm install breinify/brein-api-library-javascript-browser npm install github:breinify/brein-api-library-javascript-browser npm install https://github.com/breinify/brein-api-library-javascript-browser/tarball/master ``` +**Note**: We provide a specific library to be used with node, see [here](https://www.npmjs.com/package/breinify-node). + ##### Download the library directly from GitHub or just download the version from [GitHub](https://raw.githubusercontent.com/Breinify/brein-api-library-javascript-browser/master/dist/breinify-api.min.js) directly. @@ -102,6 +104,22 @@ A full list of the available utility functions (*Breinify.UTL*) and there purpos ##### Placing look-up triggers +Temporal data can be used to personalize your content, e.g., to change the appearance of the site regarding holidays (even local holidays), weather, part of time (e.g., afternoon, evening), or events. + +```html + +``` + +##### Placing look-up triggers + Look-ups are used, e.g., to change the appearance of the site, increase the quality of service by enhancing recommendations or pre-filtering search results. In the following simple example, the site's message is adapted when the page is loaded. ```html