Skip to content

Commit

Permalink
Deprecated YOB/Age/Gender
Browse files Browse the repository at this point in the history
  • Loading branch information
jsligh authored and mdanylov-sigma committed Jan 29, 2025
1 parent 1888bc1 commit 29110d5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ private TargetingParams() {


/* -------------------- User data -------------------- */

/**
* @deprecated by ORTB
*/
@Deprecated
public static void setUserAge(@Nullable Integer age) {
if (age == null) {
yearOfBirth = 0;
Expand All @@ -95,6 +98,10 @@ public static void setUserAge(@Nullable Integer age) {
TargetingParams.yearOfBirth = yearOfBirth;
}

/**
* @deprecated by ORTB
*/
@Deprecated
@Nullable
public static Integer getUserAge() {
return userAge;
Expand All @@ -104,7 +111,10 @@ public static Integer getUserAge() {
* Get the year of birth for targeting
*
* @return yob
*
* @deprecated by ORTB
*/
@Deprecated
public static int getYearOfBirth() {
return yearOfBirth;
}
Expand All @@ -113,7 +123,10 @@ public static int getYearOfBirth() {
* Set the year of birth and user age for targeting
*
* @param yob yob of the user
*
* @deprecated by ORTB
*/
@Deprecated
public static void setYearOfBirth(int yob) throws Exception {
if (yob == 0) {
TargetingParams.yearOfBirth = 0;
Expand All @@ -132,7 +145,10 @@ public static void setYearOfBirth(int yob) throws Exception {

/**
* Gender.
*
* @deprecated by ORTB
*/
@Deprecated
public enum GENDER {
FEMALE,
MALE,
Expand Down Expand Up @@ -165,7 +181,10 @@ public static GENDER genderByKey(String key) {
* Get the current user's gender, if it's available. The default value is UNKNOWN.
*
* @return The user's gender.
*
* @deprecated by ORTB
*/
@Deprecated
@NonNull
public static GENDER getGender() {
return gender;
Expand All @@ -177,7 +196,10 @@ public static GENDER getGender() {
* value is UNKNOWN.
*
* @param gender The user's gender.
*
* @deprecated by ORTB
*/
@Deprecated
public static void setGender(@Nullable GENDER gender) {
if (gender != null) {
TargetingParams.gender = gender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ private UserParameters() {

/**
* User gender.
*
* @deprecated by ORTB
*/
@Deprecated
public enum Gender {
/**
* User is male.
Expand Down

0 comments on commit 29110d5

Please # to comment.