flashblaze / reddit-fact

A simple implementation of Reddit API

Home Page:https://reddit-fact.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reddit-fact

@FlashBlaze/reddit-fact is released under the MIT license. PRs welcome! Netlify Status

A simple React app which displays a random fact from Reddit using their API.

🎉 Site is live here 🎉

How to use

  1. Create and register your script app here

  2. Clone the repo and go into it. Run npm install to install the dependencies.

  3. Create a config folder in src directory and create a data.js file in it.

    The directory structure is something like this:

    project
    |
    |
    |-src
     |
     |
     |-config
         |data.js
    
  4. Create a requester like so and export it:

    const snoowrap = require('snoowrap');
    
    const r = new snoowrap({
      userAgent: 'put your user-agent string here',
      clientId: 'put your client id here',
      clientSecret: 'put your client secret here',
      username: 'put your username here',
      password: 'put your password here'
    });
    
    export default r;

    For more info, you can refer this

About

A simple implementation of Reddit API

https://reddit-fact.netlify.com/

License:MIT License


Languages

Language:CSS 99.5%Language:JavaScript 0.4%Language:HTML 0.1%