reddit/node-private

Name: node-private

Owner: Reddit

Description: login / register / etc endpoints, only useful if you have access your own reddit instance

Created: 2016-04-25 21:38:43.0

Updated: 2018-03-04 13:05:16.0

Pushed: 2017-08-02 21:57:42.0

Homepage: null

Size: 48

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

\@r/private

A module that provides utilities for when you own your own reddit install.

Snoode Enhancements

Login, Register, and Token Refresh

Usage
rt APIOptions from '@r/api-client';
rt { PrivateAPI } from '@r/private';

t myAppOptions = {
.APIOptions,
ientSecret: 'my-client-secret'
ientId: 'my-super-secret-app-id',
thEmailScope: false, // only supported for non-embedded apps


t token = await PrivateAPI.login(myAppOptions, username, password);
t newToken = await PrivateAPI.refreshToken(myAppOptions, token.refresh_token);

t token = await PrivateAPI.convertCookiesToAuthToken(myAppOptions, cookies.split(';'));

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.