Package me.memerator.api.object
Class Notification
java.lang.Object
me.memerator.api.object.Notification
public class Notification extends Object
-
Constructor Summary
Constructors Constructor Description Notification(org.json.JSONObject items) -
Method Summary
Modifier and Type Method Description voiddelete()Deletes this notification@Nullable StringgetAssociatedMemeID()For meme ratings, the meme ID is returned, if you need it!intgetAssociatedMemeRating()For meme ratings, the meme rating is returned, if you need it! -1 if there is no meme associated.UsergetAuthor()StringgetMessageContent()intgetNotificationId()StringgetRawMessageContent()InstantgetTimestamp()intgetType()The type is mostly used internally but is useful for clients implementing notification sorting.
-
Constructor Details
-
Notification
public Notification(org.json.JSONObject items)
-
-
Method Details
-
getNotificationId
public int getNotificationId()- Returns:
- the ID of this notification
-
getAuthor
- Returns:
- the sender of this notification.
-
getTimestamp
- Returns:
- The timestamp as an instant
-
getMessageContent
- Returns:
- the notification, formatted.
-
getRawMessageContent
- Returns:
- the raw message as it appears on Memerator.me
-
getType
public int getType()The type is mostly used internally but is useful for clients implementing notification sorting. Type 0 is a meme rating notification Type 1 is a follow notification Type 2 is a notice. Type 3 is a report status update- Returns:
- the type of this message
-
getAssociatedMemeID
For meme ratings, the meme ID is returned, if you need it!- Returns:
- the meme ID, if type == 0
-
getAssociatedMemeRating
public int getAssociatedMemeRating()For meme ratings, the meme rating is returned, if you need it! -1 if there is no meme associated.- Returns:
- the meme rating, if type == 0
-
delete
public void delete()Deletes this notification
-