Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: added isMalware and isSubscriptionFree booleans to Breach.java; #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This API provides an easy way of accessing the account and password verification

It brings in support for using an API key as per [this documentation](https://haveibeenpwned.com/API/v3)

**The current version is 3.0.1**
**The current version is 3.0.2**

It cleans up code around the User-Agent and corrects some documentation mistakes, while version 3.0
brought in support for using an API key as per [this documentation](https://haveibeenpwned.com/API/v3)
Expand Down Expand Up @@ -37,7 +37,7 @@ Maven users can use the artifact from Maven Central with this dependency:
<dependency>
<groupId>me.legrange</groupId>
<artifactId>haveibeenpwned</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>me.legrange</groupId>
<artifactId>haveibeenpwned</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
<packaging>jar</packaging>
<url>https://github.com/GideonLeGrange/haveibeenpwned</url>
<licenses>
Expand Down
24 changes: 23 additions & 1 deletion src/main/java/me/legrange/haveibeenpwned/Breach.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* A HaveIBeenPwned breach
*
*
* @author gideon
*/
public final class Breach {
Expand Down Expand Up @@ -39,6 +39,10 @@ public final class Breach {
private boolean isRetired;
@SerializedName("IsSpamList")
private boolean isSpamList;
@SerializedName("IsMalware")
private boolean isMalware;
@SerializedName("isSubscriptionFree")
private boolean isSubscriptionFree;
@SerializedName("LogoPath")
private String logoPath;

Expand Down Expand Up @@ -154,6 +158,22 @@ public void setSpamList(boolean spamList) {
isSpamList = spamList;
}

public boolean isMalware() {
return isMalware;
}

public void setIsMalware(boolean malware) {
isMalware = malware;
}

public boolean isSubscriptionFree() {
return isSubscriptionFree;
}

public void setIsSubscriptionFree(boolean subscriptionFree) {
isSubscriptionFree = subscriptionFree;
}

public String getLogoPath() {
return logoPath;
}
Expand All @@ -179,6 +199,8 @@ public String toString() {
", isSensitive=" + isSensitive +
", isRetired=" + isRetired +
", isSpamList=" + isSpamList +
", isMalware=" + isMalware +
", isSubscriptionFree=" + isSubscriptionFree +
", logoPath='" + logoPath + '\'' +
'}';
}
Expand Down