Newtonian Physics Mockumentary

    node-utopian-rocks

    0.1.6 • Public • Published

    node-utopian-rocks

    https://www.npmjs.com/package/node-utopian-rocksGitHub license install size Utopian

    An API wrapper for utopian.rocks.

    Installing

    npm install node-utopian-rocks

    Usage

    First add it to your project

    const utopian = require('node-utopian-rocks');

    For example retrieving posts by category and status Asynchronously:

    await utopian.getPosts('social', 'reviewed')

    or by using .then() method:

    utopian.getPosts('development', 'reviewed').then(posts => posts);

    Or Let's run some tests:

    npm test

    API

    Request method aliases

    utopian.getPosts(params)

    utopian.getModerators()

    utopian.isModerator(param)

    utopian.stats.getModerators(params)

    utopian.stats.getProjects(params)

    utopian.stats.getContributors(params)

    utopian.stats.getModeratorsByDate(param)

    utopian.stats.getProjectsByDate(param)

    utopian.stats.getStaffPicksByDate(param)

    utopian.stats.getCategoriesByDate(param)

    utopian.stats.getTasksRequestsByDate(param)

    Request parameters

    These are the available parameters for making requests.

    We will start with posts Array of Objects:

    utopian.getPosts(category, status, author, moderator, staff_picks)

    Any parameter can be ignored by empty string or just null

    utopian.getPosts(category, null, author, null, staff_picks)

    For moderators array it should be called without any parameters.

    utopian.getModerators();

    For Statistics

    /**
     * It will return total contributes by selected parameters
     * staff_picked should be true or false.
     * you can ignore any param by just null.
     */
    utopian.stats.getContributors(category, status, staff_picked);
    /**
     * You can use a specific date like 2018-05-24 or today, weekly.
     */
    utopian.stats.getProjectsByDate(specificDate);

    Supported Tags

    the following table is the correct values for category parameter

    Tag Task tag
    development task-development
    copywriting task-copywriting
    graphics task-graphics
    analysis task-analysis
    social task-social
    documentation task-documentation
    blog
    bug-hunting
    ideas
    video-tutorials
    tutorials

    Roadmap

    • Adding any upcoming API calls that will be available on utopian.rocks
    • More improvements and more advanced options, configs.

    Contributing

    Feel free to create any pull requests.

    Bugs

    If there is any bug please report it by opening a new issue.

    Install

    npm i node-utopian-rocks@0.1.6

    Version

    0.1.6

    License

    MIT

    Unpacked Size

    25.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • gigatoride