Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.
/ ninegag Public archive

A serverless 9gag API hosted on Amazon using AWS Lambda and API Gateway

Notifications You must be signed in to change notification settings

LuxXx/ninegag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

LuxXx' 9gag API

I implemented a restful serverless 9GAG API with AWS Lambda. It fetches a post and all corresponding information by its id. It's currently hosted in Frankfurt. If you need a mirror somewhere else, message me ([email protected]).

API

The API contains the following functions

  • [GET /:id]

Resource URL

https://ninegag.tdbr.de/:id

Sample Response

This is a sample response:

{
  "statusCode": 200,
  "success": true,
  "body": {
    "imageLink": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_700b.jpg",
    "webmLink": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_460svwm.webm",
    "mp4Link": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_460sv.mp4",
    "gifLink": "http://img-9gag-fun.9cache.com/photo/aWmZAPZ_460sa.gif",
    "id": "aWmZAPZ",
    "title": "Where she's travelling?",
    "animated": true,
    "nextId": "azXzKjp",
    "nsfw": 0,
    "upVoteCount": 7762,
    "commentsCount": 788
  }
}

17.05.2017: 9gag switched to HTTPS some time ago, therefore I had to tweak this project a little bit

14.03.2018: 9gag changed the data structure, added nsfw, upVoteCount, and commentsCount

24.07.2018: Changed the type of the body of the response