Coder Social home page Coder Social logo

meme_api's Introduction

Meme API

CodeFactor Codacy Badge

JSON API for a random meme scraped from reddit.

API Link : https://meme-api.herokuapp.com/gimme

Example Response:

{
  "postLink": "https://redd.it/9vqgv2",
  "subreddit": "memes",
  "title": "Good mor-ning Reddit!...",
  "url": "https://i.redd.it/yykt3r9zsex11.png",
  "nsfw": false,
  "spoiler": false
}

Custom Endpoints

Specify count (MAX 50)

In order to get multiple memes in a single request specify the count with the following endpoint.

Endpoint: /gimme/{count}

Example: https://meme-api.herokuapp.com/gimme/2

Response:

{
  "count": 2,
  "memes": [
    {
      "postLink": "https://redd.it/d5bn24",
      "subreddit": "me_irl",
      "title": "me_irl",
      "url": "https://i.redd.it/6wjb8gibu2n31.jpg",
      "nsfw": false,
      "spoiler": false
    },
    {
      "postLink": "https://redd.it/d4zipy",
      "subreddit": "me_irl",
      "title": "Me🚐_irl",
      "url": "https://i.redd.it/hyl6fgweswm31.jpg",
      "nsfw": false,
      "spoiler": false
    }
  ]
}

Specify Subreddit

By default the API grabs a random meme from 'memes', 'dankmemes', 'me_irl' subreddits. To provide your own custom subreddit use the following endpoint.

Endpoint: /gimme/{subreddit}

Example: https://meme-api.herokuapp.com/gimme/dankmemes

Specify Subreddit Count (MAX 50)

In order to get a custom number of memes from a specific subreddit provide the name of the subreddit and the count in the following endpoint.

Endpoint: /gimme/{subreddit}/{count}

Example: https://meme-api.herokuapp.com/gimme/dankmemes/2

Response:

{
  "count": 2,
  "memes": [
    {
      "postLink": "https://redd.it/d5e119",
      "title": "Mph and km/h so everyone can understand",
      "url": "https://i.redd.it/imb4r0se74n31.jpg",
      "nsfw": false,
      "spoiler": false
    },
    {
      "postLink": "https://redd.it/d5e5ns",
      "title": "Funnier as a team.",
      "url": "https://i.redd.it/ixb7absfa4n31.jpg",
      "nsfw": false,
      "spoiler": false
    }
  ],
  "subreddit": "dankmemes"
}

meme_api's People

Contributors

d3vd avatar dependabot-preview[bot] avatar deepsourcebot avatar codacy-badger avatar dependabot[bot] avatar frankie1992 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.