Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecated YOB/Age/Gender #800

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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