Package me.memerator.api.object
Class Meme
java.lang.Object
me.memerator.api.object.Meme
public class Meme extends Object
-
Constructor Summary
Constructors Constructor Description Meme(org.json.JSONObject items) -
Method Summary
Modifier and Type Method Description voiddisable()Disables this meme.voidenable()Enable this meme.AgegetAgeRating()Returns the Age as an Age enumUsergetAuthor()FloatgetAverageRating()@Nullable StringgetCaption()List<Comment>getComments()StringgetImageUrl()StringgetMemeId()StringgetMemeUrl()List<Rating>getRatings()Gets the ratings on this meme.StringgetTimeAgoFormatted()InstantgetTimestamp()intgetTotalRatings()booleanisDisabled()Usually, the only people who can see disabled memes are Staff and the owners of the meme.voidsetCaption(String newcaption)Set the caption
-
Constructor Details
-
Meme
public Meme(org.json.JSONObject items)
-
-
Method Details
-
getMemeId
- Returns:
- the meme's ID.
-
getCaption
- Returns:
- the caption, if there is one.
-
getImageUrl
- Returns:
- the URL of the image.
-
getTotalRatings
public int getTotalRatings()- Returns:
- the total amount of ratings.
-
getAverageRating
- Returns:
- the average rating.
-
getTimestamp
- Returns:
- The timestamp as an instant
-
getTimeAgoFormatted
- Returns:
- the time string that appears on the website
-
getAuthor
- Returns:
- the author of this meme
-
getMemeUrl
- Returns:
- the URL to the meme
-
isDisabled
public boolean isDisabled()Usually, the only people who can see disabled memes are Staff and the owners of the meme. This will most likely always be false.- Returns:
- the meme disabled status.
-
getComments
- Returns:
- the comments for this meme
-
getAgeRating
Returns the Age as an Age enum- Returns:
- the Age
-
getRatings
Gets the ratings on this meme. Requirements for a response: 1) Be Pro 2) Be the owner of the meme- Returns:
- a list of ratings
-
disable
public void disable()Disables this meme. Meme owner only. -
enable
public void enable()Enable this meme. Meme owner only. -
setCaption
Set the caption- Parameters:
newcaption- the caption to set
-