d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Node Js Task - Post To Reddit > 500 Fg
Add Reply New Topic New Poll
Member
Posts: 14,925
Joined: Jan 3 2008
Gold: 135,879.75
Jan 7 2020 05:37pm
Write a simple node.js app that can be used in the terminal.

1. No external libraries.
2. Goal: Write a post to reddit.

Usage:

Code
postToReddit({

username: 'JohnDoe',
password: 'cakelover',
postTitle: 'Cakes are Delicious. Do you agree?',
subreddit: 'askreddit',
body: 'This is a test post about cakes.'

})


Terminal: node postToReddit.js

This post was edited by kdog3682 on Jan 7 2020 05:37pm
Member
Posts: 2,619
Joined: May 21 2004
Gold: 21,934.00
Jan 26 2020 10:43pm
Quote (kdog3682 @ 7 Jan 2020 18:37)
Write a simple node.js app that can be used in the terminal.

1. No external libraries.
2. Goal: Write a post to reddit.

Usage:

Code
postToReddit({

username: 'JohnDoe',
password: 'cakelover',
postTitle: 'Cakes are Delicious. Do you agree?',
subreddit: 'askreddit',
body: 'This is a test post about cakes.'

})


Terminal: node postToReddit.js



Let me clarify this: You want this done WITHOUT the reddit api npm package, and WITHOUT something like headless chrome?

I'm sorry but if this is the case then there's no way I'm touching this. I know how to do this, and I know how much trial and error there's going to be without either headless chrome or the reddit api npm module.
Member
Posts: 1
Joined: Feb 12 2020
Gold: 0.00
Feb 12 2020 10:20pm
Quote (kdog3682 @ Jan 7 2020 04:37pm)
Write a simple node.js app that can be used in the terminal.

1. No external libraries.
2. Goal: Write a post to reddit.

Usage:

Code
postToReddit({

username: 'JohnDoe',
password: 'cakelover',
postTitle: 'Cakes are Delicious. Do you agree?',
subreddit: 'askreddit',
body: 'This is a test post about cakes.'

})


Terminal: node postToReddit.js


You can probably just throw http requests at their api... here is the documentation https://www.reddit.com/dev/api/#POST_api_comment
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll