Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.
/ memestate Public archive

a simple (and really fast!) rest api that returns memes from reddit

License

Notifications You must be signed in to change notification settings

GlyphLabs/memestate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memestate

a simple (and really fast!) rest api that returns memes from reddit

endpoints

get a meme

GET /[subreddit] gets a meme from the specified subreddit. if none is specified, it gets one from a random subreddit. you can also specify the amount of memes you want to retrieve by adding the amount query param.

parameters

subreddit (optional) - the subreddit from which to retrieve the meme.

amount (optional) - the number of memes to retrieve. default is 1.

example

get one meme from the dankmemes subreddit:

GET /dankmemes

get three memes from the dankmemes subreddit:

GET /dankmemes?amount=3

HTTP 200 OK

[
  {
    "title": "Cultural Appropriation",
    "author": "GalfridusMagnus",
    "subreddit": "dankmemes",
    "postLink": "https://reddit.com/r/dankmemes/comments/10ot7g5/cultural_appropriation/",
    "ups": 559,
    "imageUrl": "https://i.redd.it/j2pb4gop34fa1.png"
  },
  {
    ...
  },
]

error handling

if the specified subreddit does not exist, the API will return a 500 error.

todo

  • add better error handling

About

a simple (and really fast!) rest api that returns memes from reddit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published