{"id":13825539,"url":"https://github.com/feross/reddit","last_synced_at":"2025-10-12T10:13:18.934Z","repository":{"id":44711387,"uuid":"230783568","full_name":"feross/reddit","owner":"feross","description":"Simple Reddit API client","archived":false,"fork":false,"pushed_at":"2022-11-15T23:26:49.000Z","size":29,"stargazers_count":97,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-21T09:51:37.131Z","etag":null,"topics":["api","javascript","nodejs","reddit","reddit-api","reddit-bot","reddit-client"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-29T17:44:03.000Z","updated_at":"2025-09-19T09:17:53.000Z","dependencies_parsed_at":"2023-01-23T00:30:34.282Z","dependency_job_id":null,"html_url":"https://github.com/feross/reddit","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/feross/reddit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Freddit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Freddit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Freddit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Freddit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feross","download_url":"https://codeload.github.com/feross/reddit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feross%2Freddit/sbom","scorecard":{"id":397634,"data":{"date":"2025-08-11","repo":{"name":"github.com/feross/reddit","commit":"1127da12c75865d4e344678412f770db2f6bbb5b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T19:24:00.143Z","repository_id":44711387,"created_at":"2025-08-18T19:24:00.143Z","updated_at":"2025-08-18T19:24:00.143Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011053,"owners_count":26084863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","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":["api","javascript","nodejs","reddit","reddit-api","reddit-bot","reddit-client"],"created_at":"2024-08-04T09:01:22.983Z","updated_at":"2025-10-12T10:13:18.911Z","avatar_url":"https://github.com/feross.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# reddit [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]\n\n[travis-image]: https://img.shields.io/travis/feross/reddit/master.svg\n[travis-url]: https://travis-ci.org/feross/reddit\n[npm-image]: https://img.shields.io/npm/v/reddit.svg\n[npm-url]: https://npmjs.org/package/reddit\n[downloads-image]: https://img.shields.io/npm/dm/reddit.svg\n[downloads-url]: https://npmjs.org/package/reddit\n\n### Simple Reddit API client\n\n## Install\n\n```\nnpm install reddit\n```\n\nThis package is used by [BitMidi](https://bitmidi.com) to post MIDI files to the [/r/BitMidi](https://www.reddit.com/r/BitMidi/) subreddit.\n\n## Features\n\n- Lightweight – no unecessary dependencies, easy-to-audit source code\n- Modern API – uses async/await and promises\n- Powered by the [official Reddit API](https://www.reddit.com/dev/api/)\n\n## Usage\n\nFirst, [create a Reddit App](https://www.reddit.com/prefs/apps).\n\n- Click \"Create app\"\n- For simple scripts, you can select a type of \"script\".\n- You can enter anything in the \"about URL\" and \"redirect URL\" fields.\n- Note your app ID (appears below the app name) and your app secret.\n\nNow, let's take an action on Reddit:\n\n```js\nconst Reddit = require('reddit')\n\nconst reddit = new Reddit({\n  username: 'TODO',\n  password: 'TODO',\n  appId: 'TODO',\n  appSecret: 'TODO',\n  userAgent: 'MyApp/1.0.0 (http://example.com)'\n})\n\n// Submit a link to the /r/BitMidi subreddit\nconst res = await reddit.post('/api/submit', {\n  sr: 'WeAreTheMusicMakers',\n  kind: 'link',\n  resubmit: true,\n  title: 'BitMidi – 100K+ Free MIDI files',\n  url: 'https://bitmidi.com'\n})\n\nconsole.log(res)\n// Prints:\n// {\n//   json: {\n//     errors: [],\n//     data: {\n//       url: 'https://www.reddit.com/r/WeAreTheMusicMakers/comments/96ak55/',\n//       drafts_count: 0,\n//       id: '96ak55',\n//       name: 't3_96ak55'\n//     }\n//   }\n// }\n```\n\n## API\n\n### `reddit = new Reddit(opts)`\n\nCreate a new Reddit API client.\n\nYou must provide `opts`, an object with the following required properties:\n\n- `username` - Username of the reddit user\n- `password` - Password of the reddit user\n- `appId` - Reddit App ID\n- `appSecret` - Reddit App Secret\n\nThe following `opts` properties are optional:\n\n- `opts.userAgent` - String to use as the `User-Agent` header in http requests\n\n### `reddit.get(url, [data])`\n\nInvoke the Reddit API using the `GET` HTTP method.\n\nThe `url` parameter is used to specify which API to invoke. For example, `/api/submit` or `/api/vote`. A complete listing of possible APIs is available in the [Reddit API documentation](https://www.reddit.com/dev/api/).\n\nThe optional `data` parameter is used to specify relevant data for the selected API. The necessary data varies depending on which API is being used. Again, see the [Reddit API documentation](https://www.reddit.com/dev/api/).\n\n### `reddit.post(url, [data])`\n\nInvoke the Reddit API using the `POST` HTTP method.\n\n### `reddit.patch(url, [data])`\n\nInvoke the Reddit API using the `PATCH` HTTP method.\n\n### `reddit.put(url, [data])`\n\nInvoke the Reddit API using the `PUT` HTTP method.\n\n### `reddit.delete(url, [data])`\n\nInvoke the Reddit API using the `DELETE` HTTP method.\n\n## License\n\nThe Prosperity Public License. Copyright (c) [Feross Aboukhadijeh](http://feross.org).\n\nTo obtain a commercial license, visit [feross.org/commercial](https://feross.org/commercial).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Freddit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeross%2Freddit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeross%2Freddit/lists"}