Socket
Socket
Sign inDemoInstall

reddit-by-date

Package Overview
Dependencies
47
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    reddit-by-date

Node.js API to get top Reddit posts by date


Version published
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

reddit-by-date

Node.js API to get top Reddit posts by date

https://nodei.co/npm/reddit-by-date.png?downloads=true&downloadRank=true&stars=true

contributions welcome

install

npm install reddit-by-date

example

var redditByDate = require('../reddit-by-date.js');

// month, day, year, subreddit

// month [ 0 -> 11 ] = [ January -> December ]

redditByDate.getPosts(3, 4, 2016, "news", function(err, posts){

	console.log(posts);

});

api

getPosts(month, day, year, subreddit, callback)

Type: function

month number (integer from 0 to 11)

day number (integer from 0 to 31)

year number (integer)

subreddit string (name of subreddit)

callback function

Returns array of top posts in subreddit for requested date.

posts

Type: array

Post objects.

postObject.subreddit

Type: string

Name of subreddit.

postObject.id

Type: string

ID of subreddit.

postObject.author

Type: string

Author of post.

postObject.name

Type: string

Unique name identifier of subreddit (e.g. t3_4d7lw5).

postObject.score

Type: number

Score of post.

postObject.subreddit_id

Type: string

Unique subreddit identifier of subreddit (e.g. t5_2qh3l).

postObject.downs

Type: number

Number of downvotes on post.

postObject.ups

Type: number

Number of upvotes on post.

Type: string

Permalink of post.

postObject.created

Type: number

Time of creation in milliseconds from January 1, 1970.

postObject.url

Type: string

URL referenced by post.

postObject.title

Type: string

Title of post.

postObject.num_comments

Type: number

Number of comments on post.

postObject.subreddt_type

Type: string

Type of subreddit.

license

MIT © Rishi Masand

Keywords

FAQs

Last updated on 08 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc