Now Particularly Misnamed

    @r/private

    1.1.2 • Public • Published

    @r/private

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

    Snoode Enhancements

    Login, Register, and Token Refresh

    Usage

    import APIOptions from '@r/api-client';
    import { PrivateAPI } from '@r/private';
    
    const myAppOptions = {
      ...APIOptions,
      clientSecret: 'my-client-secret'
      clientId: 'my-super-secret-app-id',
      withEmailScope: false, // only supported for non-embedded apps
    };
    
    const token = await PrivateAPI.login(myAppOptions, username, password);
    const newToken = await PrivateAPI.refreshToken(myAppOptions, token.refresh_token);
    
    const token = await PrivateAPI.convertCookiesToAuthToken(myAppOptions, cookies.split(';'));

    Keywords

    none

    Install

    npm i @r/private

    DownloadsWeekly Downloads

    3

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    34 kB

    Total Files

    9

    Last publish

    Collaborators

    • redditnpm2
    • schwers
    • madlee
    • wick