Meme Maker API

BASE URL: alpha-meme-maker.herokuapp.com/


GET all memes

GEThttp://alpha-meme-maker.herokuapp.com/:page
Gets top 24 results, page wise. Returns the next URL as a token.

Sample input

curl -X GET http://alpha-meme-maker.herokuapp.com/
curl -X GET http://alpha-meme-maker.herokuapp.com/1

Sample output

{
  "code": 200, 
  "data": [
    {
      "ID": 1, 
      "bottomText": "Good!", 
      "image": "http://imgflip.com/s/meme/Grumpy-Cat.jpg", 
      "name": "Grumpy Cat", 
      "tags": "Tardar Sauce, Tabatha Bundesen, Felis domesticus", 
      "topText": ""
    }, 
    ...
    {
      "ID": 24, 
      "bottomText": "", 
      "image": "https://imgflip.com/s/meme/Good-Guy-Greg.jpg", 
      "name": "Good Guy Greg", 
      "tags": "ggg", 
      "topText": "      "
    }
  ], 
  "message": "GET successful", 
  "next": "http://alpha-meme-maker.herokuapp.com/2"
}

POST a new meme

POSThttp://alpha-meme-maker.herokuapp.com/add/
Adds a new meme to the database. Requires header authentication.
Headers (HTTP Headers)Required
postSecretYep
adminPasswordYep
Parameters (HTTP Body)ValueRequired
nameName (must be unique)Yep
tagsAdditional tags for searchingYep
imageURL of the imageYep
topTextDefault top textNope
bottomTextDefault bottom textNope
detailInformation/historyNope
thumbOptional thumbnail imageNope
rankRanking based on popularityNope

Sample input

curl -X POST http://alpha-meme-maker.herokuapp.com/add/ -H "postSecret=???" -H "adminPassword=???" -F "name=???" -F "tags=???" -F "image=???" -F "topText=???" -F "bottomText=???"

Sample output

{
  "code": 200, 
  "data": [], 
  "message": "POST successful"
}

GET particular meme

GEThttp://alpha-meme-maker.herokuapp.com/memes/:id
Gets details of one particular meme, based on the meme ID.

Sample input

curl -X GET http://alpha-meme-maker.herokuapp.com/memes/13

Sample output

{
  "code": 200, 
  "data": {
    "ID": 13, 
    "bottomText": "But when I do ___", 
    "detail": "The Most Interesting Man In The World is an image macro series based...", 
    "image": "https://imgflip.com/s/meme/The-Most-Interesting-Man-In-The-World.jpg", 
    "name": "The Most Interesting Man in the World", 
    "submissions": [
      {
        "bottomText": "But when I do, I just log them", 
        "dateCreated": "2016-04-02 23:24:05", 
        "topText": "I don't always handle exceptions"
      }
    ], 
    "tags": "Jonathan Goldsmith", 
    "thumb": "", 
    "topText": "I don't always ___"
  }, 
  "message": "GET Success"
}

UPDATE an existing meme

PUThttp://alpha-meme-maker.herokuapp.com/memes/:id
Updates an existing meme in the database. Requires header authentication.
Headers (HTTP Headers)Required
putSecretYep
adminPasswordYep
Parameters (HTTP Body)Value
tagsAdditional tags for searching
imageURL of the image
topTextDefault top text
bottomTextDefault bottom text
detailInformation/history
thumbOptional thumbnail image
rankRanking based on popularity

Sample input

curl -X PUT http://alpha-meme-maker.herokuapp.com/memes/5 -H "putSecret=???" -H "adminPassword=???" -F "topText=???" -F "bottomText=???"

Sample output

{
  "code": 200, 
  "data": [], 
  "message": "PUT successful"
}

GET submissions

GEThttp://alpha-meme-maker.herokuapp.com/submissions
Gets the latest 24 submissions, page wise. Returns the next URL as a token.
GEThttp://alpha-meme-maker.herokuapp.com/memes/:memeID/submissions
Gets all the submissions for the given meme ID.

Sample input

curl -X GET http://alpha-meme-maker.herokuapp.com/submissions

Sample output

{
  "code": 200, 
  "data": [
    {
      "bottomText": "You must know everything", 
      "dateCreated": "2016-04-03 00:18:43", 
      "memeID": 14, 
      "topText": "Oh you just graduated"
    },
    ...
    {
      "bottomText": "Season 6 is coming", 
      "dateCreated": "2016-04-02 12:16:43", 
      "memeID": 7, 
      "topText": "Brace Yourselves"
    }
  ], 
  "message": "GET successful", 
  "next": "http://alpha-meme-maker.herokuapp.com/submissions/2"
}

Sample input

curl -X GET http://alpha-meme-maker.herokuapp.com/memes/13/submissions

Sample output

{
  "code": 200, 
  "data": [
    {
      "bottomText": "But when I do, I just log them", 
      "dateCreated": "2016-04-02 23:24:05", 
      "topText": "I don't always handle exceptions"
    }
  ], 
  "message": "GET Submissions Success"
}

POST a new submission

POSThttp://alpha-meme-maker.herokuapp.com/submissions
Adds a new submission (requires meme ID to be passed as a HTTP body paramater)
POSThttp://alpha-meme-maker.herokuapp.com/memes/:memeID/submissions
Adds a new submission for the particular meme ID.
Parameters (HTTP Body)Required
memeIDYep (When using the first URL)
topTextMaybe
bottomTextMaybe
Note: One of topText or bottomText is required.

Sample input

curl -X POST http://alpha-meme-maker.herokuapp.com/submissions -F "topText=???" -F "bottomText=???"
curl -X POST http://alpha-meme-maker.herokuapp.com/memes/6/submissions  -F "topText=???" -F "bottomText=???"

Sample output

{
  "code": 200, 
  "data": [], 
  "message": "POST Submission Success"
}