@skyra/reddit-helpers
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@skyra/reddit-helpers

Very basic Reddit helper functions for several ArchId bots to ensure we do not duplicate code.

Note that this package only does Application Only Oauth and requires an application of the "Installed" type!

Features

  • Powered by the @skyra/safe-fetch package

Usage

First of all, you should make sure to define the following environment variables for your process:

  • REDDIT_CLIENT_ID: The Client ID of your Reddit application (generated at Reddit Apps Dashboard)
  • REDDIT_DEVICE_ID: A unique, per-device ID generated by your client.

After this, you can use the functions exported from this package to interact with the Reddit API.

What value should I use for device_id?

You should generate and save unique ID on your client. The ID should be unique per-client. A randomized or pseudo-randomized value is acceptable for generating the ID; however, you should retain and re-use the same device_id when renewing your access token.

Package Sidebar

Install

npm i @skyra/reddit-helpers

Weekly Downloads

313

Version

1.2.0

License

Apache-2.0

Unpacked Size

39.7 kB

Total Files

6

Last publish

Collaborators

  • favna
  • kyranet