-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (28 loc) · 1.14 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//==============================================================================
// ■ Reddit (reddit/index.js)
//------------------------------------------------------------------------------
// Reddit API access service. Based on snoowrap library.
//==============================================================================
const $markAsOC = require("./reddit/mark-as-oc");
const $applyFlairs = require("./reddit/apply-flairs");
const $getNewByMe = require("./reddit/get-new-by-me");
const $submitLink = require("./reddit/submit-link");
//------------------------------------------------------------------------------
// ► Exports
//------------------------------------------------------------------------------
module.exports = function reddit(requester, subredditName) {
return {
markAsOC(submission) {
$markAsOC(requester, subredditName, submission.name);
},
applyFlairs(submission, flairsTexts) {
$applyFlairs(submission, flairsTexts);
},
getNewByMe(options) {
$getNewByMe(requester, subredditName, options);
},
submitLink(post) {
$submitLink(requester, subredditName, post);
}
};
};