-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from boticord/webhooks
Webhooks
- Loading branch information
Showing
19 changed files
with
570 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/java/org/boticordjava/api/entity/webhooks/WebhookListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.boticordjava.api.entity.webhooks; | ||
|
||
public interface WebhookListener { | ||
|
||
String getType(); | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/org/boticordjava/api/entity/webhooks/bump/bot/Bonus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.boticordjava.api.entity.webhooks.bump.bot; | ||
|
||
import java.sql.Timestamp; | ||
|
||
public class Bonus { | ||
|
||
private String status; | ||
private Long expiresAt; | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public Timestamp getExpiresAt() { | ||
return new Timestamp(expiresAt); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/org/boticordjava/api/entity/webhooks/bump/bot/BotBump.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.boticordjava.api.entity.webhooks.bump.bot; | ||
|
||
import org.boticordjava.api.entity.webhooks.WebhookListener; | ||
|
||
public class BotBump implements WebhookListener { | ||
|
||
private String type; | ||
private Data data; | ||
private Bonus bonus; | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public Data getData() { | ||
return data; | ||
} | ||
|
||
public Bonus getBonus() { | ||
return bonus; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/org/boticordjava/api/entity/webhooks/bump/bot/Data.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.boticordjava.api.entity.webhooks.bump.bot; | ||
|
||
import java.sql.Timestamp; | ||
|
||
public class Data { | ||
|
||
private String user; | ||
private Long at; | ||
|
||
public String getUser() { | ||
return user; | ||
} | ||
|
||
public Timestamp getAt() { | ||
return new Timestamp(at); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/org/boticordjava/api/entity/webhooks/bump/server/ServerBump.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.boticordjava.api.entity.webhooks.bump.server; | ||
|
||
import org.boticordjava.api.entity.webhooks.WebhookListener; | ||
import org.boticordjava.api.entity.webhooks.bump.bot.Data; | ||
|
||
public class ServerBump implements WebhookListener { | ||
|
||
private String type; | ||
private Data data; | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public Data getData() { | ||
return data; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/org/boticordjava/api/entity/webhooks/comment/BotComment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.boticordjava.api.entity.webhooks.comment; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import org.boticordjava.api.entity.webhooks.WebhookListener; | ||
|
||
public class BotComment implements WebhookListener { | ||
|
||
private String type; | ||
@SerializedName("data") | ||
private CommentData commentData; | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public CommentData getData() { | ||
return commentData; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/org/boticordjava/api/entity/webhooks/comment/Comment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.boticordjava.api.entity.webhooks.comment; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class Comment { | ||
|
||
private Vote vote; | ||
|
||
@SerializedName("old") | ||
private String oldComment; | ||
|
||
@SerializedName("new") | ||
private String newComment; | ||
|
||
public Vote getVote() { | ||
return vote; | ||
} | ||
|
||
public String getOldComment() { | ||
return oldComment; | ||
} | ||
|
||
public String getNewComment() { | ||
return newComment; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/org/boticordjava/api/entity/webhooks/comment/CommentAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.boticordjava.api.entity.webhooks.comment; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import org.boticordjava.api.entity.webhooks.WebhookListener; | ||
import org.boticordjava.api.entity.webhooks.bump.bot.Bonus; | ||
|
||
public class CommentAction implements WebhookListener { | ||
|
||
private String type; | ||
@SerializedName("data") | ||
private CommentData commentData; | ||
private Bonus bonus; | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public CommentData getData() { | ||
return commentData; | ||
} | ||
|
||
public Bonus getBonus() { | ||
return bonus; | ||
} | ||
} |
Oops, something went wrong.