pr0gramm-api-2
Node.js pr0gramm API
Last updated 2 years ago by picknicker95 .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pr0gramm-api-2 
SYNC missed versions from official npm registry.

pr0gramm-api

A Node.js API for pr0gramm written in TypeScript.

npm install -S pr0gramm-api

Usage

import { Pr0grammAPI, ItemFlags } from "pr0gramm-api";

const api = Pr0grammAPI.createWithCookies();

async function main() {
    let mainItems = await api.items.getItems({
        promoted: true,
        flags: ItemFlags.All
    });
    console.dir(mainItems.items);

    let loginResponse = await api.user.login("cha0s", "stahl0fen80");
    if(!loginResponse.success) {
        console.log("Could not log in :(");
        if(loginResponse.ban !== null) {
            console.log("You are banned. Reason:");
            console.log(loginResponse.ban.reason);
            return;
        }
    }
}
main();

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

1 Versions

  • 2.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |