Class Notification

java.lang.Object
me.memerator.api.object.Notification

public class Notification
extends Object
  • Constructor Details

    • Notification

      public Notification​(org.json.JSONObject items)
  • Method Details

    • getNotificationId

      public int getNotificationId()
      Returns:
      the ID of this notification
    • getAuthor

      public User getAuthor()
      Returns:
      the sender of this notification.
    • getTimestamp

      public Instant getTimestamp()
      Returns:
      The timestamp as an instant
    • getMessageContent

      public String getMessageContent()
      Returns:
      the notification, formatted.
    • getRawMessageContent

      public String 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

      @Nullable public @Nullable String 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