{"id":49182705,"url":"https://github.com/simple-works/0reddit","last_synced_at":"2026-04-23T02:04:01.510Z","repository":{"id":57092778,"uuid":"466947624","full_name":"simple-works/0reddit","owner":"simple-works","description":"Some simple reddit API functions on top of snoowrap.","archived":false,"fork":false,"pushed_at":"2022-03-08T03:33:51.000Z","size":1991,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T04:34:05.594Z","etag":null,"topics":["javascript","nodejs","reddit","reddit-api","reddit-bot","snoowrap"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simple-works.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-07T04:55:10.000Z","updated_at":"2022-03-08T04:33:40.000Z","dependencies_parsed_at":"2022-08-22T21:40:36.442Z","dependency_job_id":null,"html_url":"https://github.com/simple-works/0reddit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simple-works/0reddit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-works%2F0reddit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-works%2F0reddit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-works%2F0reddit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-works%2F0reddit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simple-works","download_url":"https://codeload.github.com/simple-works/0reddit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-works%2F0reddit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32162614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"online","status_checked_at":"2026-04-23T02:00:06.710Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","nodejs","reddit","reddit-api","reddit-bot","snoowrap"],"created_at":"2026-04-23T02:03:56.669Z","updated_at":"2026-04-23T02:04:01.494Z","avatar_url":"https://github.com/simple-works.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 0reddit\n\n[![NPM version](https://badge.fury.io/js/0reddit.svg)](https://npmjs.org/package/0reddit)\n\nA small extension of [snoowrap](https://github.com/not-an-aardvark/snoowrap) with some simplified reddit API functions.\n\n![Screenshot](./screenshot.gif?raw=true)\n\n# 📥 Install\n\n```\nnpm i 0reddit\n```\n\n# 🏁 Use\n\n```js\nconst snoowrap = require(\"snoowrap\");\nconst $reddit = require(\"0reddit\");\n\nconst requester = new snoowrap({\n  /* OAuth credentials here */\n});\nconst $subreddit = $reddit(requester, \"SomeSubreddit\");\n\n// Submit a link\nconst submission = await $subreddit.submitLink({\n  title: \"Wracurd\",\n  url: \"https://example.com/wracurd.jpg\",\n  oc: true,\n  flairs: [\"artwork\", \"comic\", \"color\"],\n});\n\n// Get own newest submission\nconst myLatestSubmission = await $subreddit.getNewByMe({ one: true });\n```\n\n# 📕 API\n\n- `reddit(requester, subredditName)` : Create an object containing the functions.\n\n  - `requester: snoowrap` : Snoowrap [requester](https://not-an-aardvark.github.io/snoowrap/snoowrap.html) object.\n  - `subredditName: String` : Subreddit name (without r/ prefix).\n\n- `await submitLink(post)` : Submit a link post.\n\n  - `post: Object` : Object describing a link post.\n    - `title: String` : post title.\n    - `url: String` : post link.\n    - `oc?: Boolean` : If true, mark post as OC.\n    - `flairs?: String[]` : Texts of flairs to assign to post.\n\n- `await getNewByMe(options)` : Get own new submissions.\n\n  - `options?: Object`: Options object.\n    - `one?: Boolean` : If true, return the first submission object (Instead of Array).\n    - `limit?: Number` : Maximum number of submissions to retrieve.\n\n- `await markAsOC(submission)` : Mark a submission as OC.\n\n  - `submission: Submission` : Snowrap [submission](https://not-an-aardvark.github.io/snoowrap/Submission.html).\n\n- `await applyFlairs(submission, flairsTexts)` : assign flairs to a submissions.\n\n  - `submission: Submission` : Snowrap [submission](https://not-an-aardvark.github.io/snoowrap/Submission.html).\n  - `flairsTexts: String[]` : Array of flairs texts.\n\n# 📃 License\n\n[MIT](./LICENSE) © [Ambratolm](https://github.com/Ambratolm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-works%2F0reddit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimple-works%2F0reddit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-works%2F0reddit/lists"}