Skip to content

Commit 5d8b111

Browse files
committed
new documented pre-release
1 parent 2bf9d3f commit 5d8b111

File tree

7 files changed

+32
-20
lines changed

7 files changed

+32
-20
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "breinify-api",
3-
"version": "1.0.13",
3+
"version": "1.0.15",
44
"description": "This is a JavaScript library simplifying the usage of the Breinify API",
55
"authors": [
66
"Philipp Meisen <philipp@breinify.com>",

dist/breinify-api.js

+26-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* breinify-api
3-
* v1.0.12
3+
* v1.0.15
44
**/
55
/*
66
* We inject a dependencyScope variable, which will be used
@@ -12549,6 +12549,19 @@ dependencyScope.jQuery = $;;
1254912549
return CryptoJS.MD5(value).toString();
1255012550
},
1255112551

12552+
/**
12553+
* Generates a uuid, thanks to
12554+
* http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
12555+
*
12556+
* @returns {string} a generated UUID
12557+
*/
12558+
uuid: function () {
12559+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
12560+
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
12561+
return v.toString(16);
12562+
});
12563+
},
12564+
1255212565
/**
1255312566
* Checks if the passed value is empty, i.e., is an empty string (trimmed), an empty object, undefined or null.
1255412567
* @param val {*} the value to be checked
@@ -12751,7 +12764,7 @@ dependencyScope.jQuery = $;;
1275112764
});
1275212765

1275312766
var BreinifyConfig = function (config) {
12754-
this.version = '1.0.12';
12767+
this.version = '1.0.15';
1275512768

1275612769
/*
1275712770
* Validate the passed config-parameters.
@@ -12917,7 +12930,7 @@ dependencyScope.jQuery = $;;
1291712930

1291812931
var BreinifyUser = function (user, onReady) {
1291912932
var instance = this;
12920-
instance.version = '1.0.12';
12933+
instance.version = '1.0.15';
1292112934

1292212935
// set the values provided
1292312936
instance.setAll(user);
@@ -13208,15 +13221,15 @@ dependencyScope.jQuery = $;;
1320813221
} else if (func === null) {
1320913222
func = pointer[key];
1321013223
} else {
13211-
throw new SyntaxError('Multiple signatures for (' + types.toString() + ') found in: ' + pointer.toString());
13224+
throw new SyntaxError('Multiple signatures for (' + types.toString() + ') found in: ' + JSON.stringify(pointer));
1321213225
}
1321313226
}
1321413227
});
1321513228
} else {
1321613229
func = pointer[types.toString()];
1321713230
}
1321813231
if (typeof func !== 'function') {
13219-
throw new SyntaxError('Invalid signature (' + types.toString() + ') found, use one of: ' + pointer.toString());
13232+
throw new SyntaxError('Invalid signature (' + types.toString() + ') found, use one of: ' + JSON.stringify(pointer));
1322013233
}
1322113234

1322213235
return func.apply(context, args);
@@ -13295,7 +13308,7 @@ dependencyScope.jQuery = $;;
1329513308
* The one and only instance of the library.
1329613309
*/
1329713310
var Breinify = {
13298-
version: '1.0.12',
13311+
version: '1.0.15',
1329913312
jQueryVersion: $.fn.jquery
1330013313
};
1330113314

@@ -13577,6 +13590,11 @@ dependencyScope.jQuery = $;;
1357713590
_privates.ajax(url, data, callback, callback);
1357813591
});
1357913592
},
13593+
'Object,Function': function (user, callback) {
13594+
Breinify.temporalDataUser(user, false, function (data) {
13595+
_privates.ajax(url, data, callback, callback);
13596+
});
13597+
},
1358013598
'Object,Boolean,Function': function (user, sign, callback) {
1358113599
Breinify.temporalDataUser(user, sign, function (data) {
1358213600
_privates.ajax(url, data, callback, callback);
@@ -13623,8 +13641,6 @@ dependencyScope.jQuery = $;;
1362313641
var timezone = user.read('timezone');
1362413642

1362513643
var message = _privates.generateTemporalDataMessage(unixTimestamp, localDateTime, timezone);
13626-
console.log(message);
13627-
console.log(_config.get(ATTR_CONFIG.SECRET));
1362813644
signature = _privates.determineSignature(message, _config.get(ATTR_CONFIG.SECRET))
1362913645
} else {
1363013646
_onReady(null);
@@ -13823,7 +13839,8 @@ dependencyScope.jQuery = $;;
1382313839
isEmpty: function() { return false; },
1382413840
isSimpleObject: function() { return false; },
1382513841
timezone: function() { return null; },
13826-
localDateTime: function() { return new Date().toString(); }
13842+
localDateTime: function() { return new Date().toString(); },
13843+
uuid: function() { return null; }
1382713844
};
1382813845

1382913846
window['Breinify'] = Breinify;

dist/breinify-api.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

documentation/snippets/language-purchase-activity.md

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<blockquote class="lang-specific javascript--browser">
2-
<p>The JavaScript library offers several overloaded version
3-
of the <code class="prettyprint">temporalData</code> method.</p>
4-
</blockquote>
5-
61
>
72
```javascript--browser
83
var sId = Breinify.UTL.cookie.get('JSESSIONID');

documentation/snippets/language-request-temporal-data.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<blockquote class="lang-specific javascript--browser">
2-
<p>The JavaScript library offers several overloaded version
2+
<p>The JavaScript library offers several overloaded versions
33
of the <code class="prettyprint">temporalData</code> method.</p>
44
</blockquote>
55

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "breinify-api",
3-
"version": "1.0.13",
3+
"version": "1.0.15",
44
"description": "This is a JavaScript library simplifying the usage of the Breinify API",
55
"authors": [
66
"Philipp Meisen <philipp@breinify.com>",

src/snippets/suffix-global.js.snippet

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
isEmpty: function() { return false; },
9898
isSimpleObject: function() { return false; },
9999
timezone: function() { return null; },
100-
localDateTime: function() { return new Date().toString(); }
100+
localDateTime: function() { return new Date().toString(); },
101101
uuid: function() { return null; }
102102
};
103103

0 commit comments

Comments
 (0)