Skip to content

Commit

Permalink
new documented pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeisen committed Apr 12, 2017
1 parent 2bf9d3f commit 5d8b111
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 20 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "breinify-api",
"version": "1.0.13",
"version": "1.0.15",
"description": "This is a JavaScript library simplifying the usage of the Breinify API",
"authors": [
"Philipp Meisen <[email protected]>",
Expand Down
35 changes: 26 additions & 9 deletions dist/breinify-api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* breinify-api
* v1.0.12
* v1.0.15
**/
/*
* We inject a dependencyScope variable, which will be used
Expand Down Expand Up @@ -12549,6 +12549,19 @@ dependencyScope.jQuery = $;;
return CryptoJS.MD5(value).toString();
},

/**
* Generates a uuid, thanks to
* http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
*
* @returns {string} a generated UUID
*/
uuid: function () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},

/**
* Checks if the passed value is empty, i.e., is an empty string (trimmed), an empty object, undefined or null.
* @param val {*} the value to be checked
Expand Down Expand Up @@ -12751,7 +12764,7 @@ dependencyScope.jQuery = $;;
});

var BreinifyConfig = function (config) {
this.version = '1.0.12';
this.version = '1.0.15';

/*
* Validate the passed config-parameters.
Expand Down Expand Up @@ -12917,7 +12930,7 @@ dependencyScope.jQuery = $;;

var BreinifyUser = function (user, onReady) {
var instance = this;
instance.version = '1.0.12';
instance.version = '1.0.15';

// set the values provided
instance.setAll(user);
Expand Down Expand Up @@ -13208,15 +13221,15 @@ dependencyScope.jQuery = $;;
} else if (func === null) {
func = pointer[key];
} else {
throw new SyntaxError('Multiple signatures for (' + types.toString() + ') found in: ' + pointer.toString());
throw new SyntaxError('Multiple signatures for (' + types.toString() + ') found in: ' + JSON.stringify(pointer));
}
}
});
} else {
func = pointer[types.toString()];
}
if (typeof func !== 'function') {
throw new SyntaxError('Invalid signature (' + types.toString() + ') found, use one of: ' + pointer.toString());
throw new SyntaxError('Invalid signature (' + types.toString() + ') found, use one of: ' + JSON.stringify(pointer));
}

return func.apply(context, args);
Expand Down Expand Up @@ -13295,7 +13308,7 @@ dependencyScope.jQuery = $;;
* The one and only instance of the library.
*/
var Breinify = {
version: '1.0.12',
version: '1.0.15',
jQueryVersion: $.fn.jquery
};

Expand Down Expand Up @@ -13577,6 +13590,11 @@ dependencyScope.jQuery = $;;
_privates.ajax(url, data, callback, callback);
});
},
'Object,Function': function (user, callback) {
Breinify.temporalDataUser(user, false, function (data) {
_privates.ajax(url, data, callback, callback);
});
},
'Object,Boolean,Function': function (user, sign, callback) {
Breinify.temporalDataUser(user, sign, function (data) {
_privates.ajax(url, data, callback, callback);
Expand Down Expand Up @@ -13623,8 +13641,6 @@ dependencyScope.jQuery = $;;
var timezone = user.read('timezone');

var message = _privates.generateTemporalDataMessage(unixTimestamp, localDateTime, timezone);
console.log(message);
console.log(_config.get(ATTR_CONFIG.SECRET));
signature = _privates.determineSignature(message, _config.get(ATTR_CONFIG.SECRET))
} else {
_onReady(null);
Expand Down Expand Up @@ -13823,7 +13839,8 @@ dependencyScope.jQuery = $;;
isEmpty: function() { return false; },
isSimpleObject: function() { return false; },
timezone: function() { return null; },
localDateTime: function() { return new Date().toString(); }
localDateTime: function() { return new Date().toString(); },
uuid: function() { return null; }
};

window['Breinify'] = Breinify;
Expand Down
4 changes: 2 additions & 2 deletions dist/breinify-api.min.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions documentation/snippets/language-purchase-activity.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<blockquote class="lang-specific javascript--browser">
<p>The JavaScript library offers several overloaded version
of the <code class="prettyprint">temporalData</code> method.</p>
</blockquote>

>
```javascript--browser
var sId = Breinify.UTL.cookie.get('JSESSIONID');
Expand Down
2 changes: 1 addition & 1 deletion documentation/snippets/language-request-temporal-data.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<blockquote class="lang-specific javascript--browser">
<p>The JavaScript library offers several overloaded version
<p>The JavaScript library offers several overloaded versions
of the <code class="prettyprint">temporalData</code> method.</p>
</blockquote>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "breinify-api",
"version": "1.0.13",
"version": "1.0.15",
"description": "This is a JavaScript library simplifying the usage of the Breinify API",
"authors": [
"Philipp Meisen <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/snippets/suffix-global.js.snippet
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
isEmpty: function() { return false; },
isSimpleObject: function() { return false; },
timezone: function() { return null; },
localDateTime: function() { return new Date().toString(); }
localDateTime: function() { return new Date().toString(); },
uuid: function() { return null; }
};

Expand Down

0 comments on commit 5d8b111

Please sign in to comment.