Skip to content

Commit 88bc74d

Browse files
feat: deprecate others
1 parent 43bfa85 commit 88bc74d

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

lib/countly.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,7 @@ Countly.Bulk = Bulk;
834834
* @param {string=} user.gender - M value for male and F value for female
835835
* @param {number=} user.byear - user's birth year used to calculate current age
836836
* @param {Object=} user.custom - object with custom key value properties you want to save with user
837+
* @deprecated use {@link Countly.userProfile.set_properties} instead then call {@link Countly.userProfile.save}
837838
* */
838839
Countly.user_details = function(user) {
839840
Countly.userProfile.set_properties(user);
@@ -1027,6 +1028,7 @@ Countly.Bulk = Bulk;
10271028
* Control user related custom properties. Don't forget to call save after finishing manipulation of custom data
10281029
* @namespace Countly.userData
10291030
* @name Countly.userData
1031+
* @deprecated use {@link Countly.userProfile} instead
10301032
* @example
10311033
* //set custom key value property
10321034
* Countly.userData.set("twitter", "ar2rsawseen");
@@ -1042,30 +1044,32 @@ Countly.Bulk = Bulk;
10421044
* Sets user's custom property value
10431045
* @param {string} key - name of the property to attach to user
10441046
* @param {string|number} value - value to store under provided property
1047+
* @deprecated use {@link Countly.userProfile.set_property} instead
10451048
* */
10461049
set(key, value) {
1047-
key = cc.truncateSingleValue(key, Countly.maxKeyLength, "set", Countly.debug);
1048-
value = cc.truncateSingleValue(value, Countly.maxValueSize, "set", Countly.debug);
1049-
customData[key] = value;
1050+
Countly.userProfile.set_property(key, value);
10501051
},
10511052
/**
10521053
* Sets user's custom property value only if it was not set before
10531054
* @param {string} key - name of the property to attach to user
10541055
* @param {string|number} value - value to store under provided property
1056+
* @deprecated use {@link Countly.userProfile.set_once} instead
10551057
* */
10561058
set_once(key, value) {
10571059
Countly.userProfile.set_once(key, value);
10581060
},
10591061
/**
10601062
* Unset's/delete's user's custom property
10611063
* @param {string} key - name of the property to delete
1064+
* @deprecated use {@link Countly.userProfile.unset} instead
10621065
* */
10631066
unset(key) {
10641067
Countly.userProfile.unset(key);
10651068
},
10661069
/**
10671070
* Increment value under the key of this user's custom properties by one
10681071
* @param {string} key - name of the property to attach to user
1072+
* @deprecated use {@link Countly.userProfile.increment} instead
10691073
* */
10701074
increment(key) {
10711075
Countly.userProfile.increment(key);
@@ -1074,6 +1078,7 @@ Countly.Bulk = Bulk;
10741078
* Increment value under the key of this user's custom properties by provided value
10751079
* @param {string} key - name of the property to attach to user
10761080
* @param {number} value - value by which to increment server value
1081+
* @deprecated use {@link Countly.userProfile.increment_by} instead
10771082
* */
10781083
increment_by(key, value) {
10791084
Countly.userProfile.increment_by(key, value);
@@ -1082,6 +1087,7 @@ Countly.Bulk = Bulk;
10821087
* Multiply value under the key of this user's custom properties by provided value
10831088
* @param {string} key - name of the property to attach to user
10841089
* @param {number} value - value by which to multiply server value
1090+
* @deprecated use {@link Countly.userProfile.multiply} instead
10851091
* */
10861092
multiply(key, value) {
10871093
Countly.userProfile.multiply(key, value);
@@ -1090,6 +1096,7 @@ Countly.Bulk = Bulk;
10901096
* Save maximal value under the key of this user's custom properties
10911097
* @param {string} key - name of the property to attach to user
10921098
* @param {number} value - value which to compare to server's value and store maximal value of both provided
1099+
* @deprecated use {@link Countly.userProfile.max} instead
10931100
* */
10941101
max(key, value) {
10951102
Countly.userProfile.max(key, value);
@@ -1098,6 +1105,7 @@ Countly.Bulk = Bulk;
10981105
* Save minimal value under the key of this user's custom properties
10991106
* @param {string} key - name of the property to attach to user
11001107
* @param {number} value - value which to compare to server's value and store minimal value of both provided
1108+
* @deprecated use {@link Countly.userProfile.min} instead
11011109
* */
11021110
min(key, value) {
11031111
Countly.userProfile.min(key, value);
@@ -1106,6 +1114,7 @@ Countly.Bulk = Bulk;
11061114
* Add value to array under the key of this user's custom properties. If property is not an array, it will be converted to array
11071115
* @param {string} key - name of the property to attach to user
11081116
* @param {string|number} value - value which to add to array
1117+
* @deprecated use {@link Countly.userProfile.push} instead
11091118
* */
11101119
push(key, value) {
11111120
Countly.userProfile.push(key, value);
@@ -1114,6 +1123,7 @@ Countly.Bulk = Bulk;
11141123
* Add value to array under the key of this user's custom properties, storing only unique values. If property is not an array, it will be converted to array
11151124
* @param {string} key - name of the property to attach to user
11161125
* @param {string|number} value - value which to add to array
1126+
* @deprecated use {@link Countly.userProfile.push_unique} instead
11171127
* */
11181128
push_unique(key, value) {
11191129
Countly.userProfile.push_unique(key, value);
@@ -1122,12 +1132,14 @@ Countly.Bulk = Bulk;
11221132
* Remove value from array under the key of this user's custom properties
11231133
* @param {string} key - name of the property
11241134
* @param {string|number} value - value which to remove from array
1135+
* @deprecated use {@link Countly.userProfile.pull} instead
11251136
* */
11261137
pull(key, value) {
11271138
Countly.userProfile.pull(key, value);
11281139
},
11291140
/**
11301141
* Save changes made to user's custom properties object and send them to server
1142+
* @deprecated use {@link Countly.userProfile.save} instead
11311143
* */
11321144
save() {
11331145
Countly.userProfile.save();

0 commit comments

Comments
 (0)