2.0.1 • Published 2 years ago

@vedantsharma/reddit v2.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

About

@vedantsharma/reddit is a nodejs library coded using javascript to make work for coders who are using the raw reddit api to make there lives easier. Thanks to Ric and Sam for helping me remove the irrelevant part and fixing bugs.

Errors

If you guys face errors while using this library then make an issue. I'm currently busy with exams and will fix them later.

Installation

npm install @vedantsharma/reddit

Overview

The parameters are optional. So... the default subreddits are "dankmemes" and "wholesomememes".

Below are the Given Methods.

getRandom();
getLast();
getFirst();

before using all this, you have to set up the instances, which is by doing the given:

import {Scraper} from "@vedant/reddit";
const a = new Scraper();

Usages/Examples

  • Typescript
import {Scraper} from "@vedantsharma/reddit";

const manager = new Scraper();

const post = await manager.getFirst('funny'); // Leaving this empty would use the default subreddits as given on 
console.log(post); // Print out the Reddit Post Object.
console.log(post.title); // Print out the title of the reddit post.
  • Javascript
const lib = require("@vedantsharma/reddit");

const manager = new lib.Scraper();
manager.getFirst('funny').then(post => {
    console.log(post);
});
2.0.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago