npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rqcli

v2.9.1

Published

CLI for Udacity Reviews API

Downloads

19

Readme

CLI tool for Udacity Reviews API

rqcli is a CLI tool for configuring and running API calls against the Udacity Reviews API v1. You can find the API documentation here: https://review.udacity.com/api-doc/index.html.

:arrow_double_down: Installation

Requirements

  • Node.js v6.0.0 or higher
  • NPM (v3.0.0+ recommended) (this comes with Node.js)

Installation

rqcli is a Node module. So as long as you have Node.js and NPM installed, installing rqcli is as simple as running the following command in a terminal:

$ npm install rqcli --global

Notifications

The CLI uses node-notifier for destop notifications.

Desktop Notifications on a Mac:

Desktop Notifications

Sample CLI prompt

CLI Prompt

:clipboard: Setup

LEGEND
  • Arguments inside < > are required.
  • Arguments inside [ ] are optional.
  • Arguments that start with -- are options.
  • Arguments that start with - are shortcuts for an option.
Step-By-Step Guide
  1. Navigate to the folder you want to use for your work with reviews.
  2. Get the token from the API.
  3. Run rqcli setup "<token>". Because tokens often contain dashes (-), remember to put your token inside of quotation marks ("). Otherwise the cli will think that everything after the first dash is an attempt to set an option.
    • The command creates a new folder in your current working directory, called api, where your token and certifications are stored.
    • The command lets you know if any submissions are currently assigned to you, and also if there are any unread feedbacks from the last 30 days.
    • You can add the option --notify to get desktop notifications of any unread feedbacks and active reviews.
  4. The most common task when using this CLI, will be to start requesting assignments from the Udacity Reviews API. Do this by using the assign command.

:nut_and_bolt: CLI commands

setup

  • Command: rqcli setup "<token>"
  • Description: Creates a new folder, api, in the current working directory, with all the information needed to start authenticating against the Udacity Reviews API. This command combines the four commands, token, certs, assigned and feedbacks into one.
  • Arguments: "<token>", because tokens often contain dashes (-), remember to put your token inside of quotation marks ("). Otherwise the cli will think that everything after the first dash is an attempt to set an option.
  • Options: -n, --notify, uses desktop notifications.

assign

  • Command: rqcli assign <projectId> [moreIds] --feedbacks --notify
  • Description: Starts requesting the Udacity Reviews API queue for assignments of the type specified in the commands arguments.
    • The default interval for requesting assignments is 1 second.
    • The default interval for checking assignments is 60 seconds.
    • The default interval for checking unread feedbacks is 5 minutes.
  • Arguments: <projectId> [moreIds...], space separated list of project ids to request for.
  • Options:
    • -f, --feedbacks, periodically checks for new feedbacks.
    • -n, --notify, uses desktop notifications.
  • Example Usage: rqcli assign 144 134 -fn. This will request an assignment for project 144 and then 134. It will keep doing that in a loop. It will also use desktop notifications to notify the user of new assignments and any unread feedbacks.
  • Tips:
    • Run rqcli certs to get a list of projects you are certified for, including their ids.

money

  • Command: rqcli money [months] --from <date> --to <date>
  • Description: Gets all completed reviews and returns an earnings reports for the periods specified by the user.
  • Arguments: [months], space separated list of months to report on.
  • Options:
    • -f, --from <date>, date in the format, YYYY-MM-DDT00:00:00 , from which to calculate earnings (where YYYY-MM is required and DD-T00:00:00 is optional). If the --to option is not defined, the period reported on will be from the <date> to now.
    • -t, --to <date>, date in the format, YYYY-MM-DDT00:00:00, to which to calculate earnings (where YYYY-MM is required and DD-T00:00:00 is optional). If the --from option is not defined, the period reported on will be from sometime in the 70's to the <date>.
  • Example Usage: rqcli money 3 4 --from 2016-01 --to 2016-07-26. This request will return three earnings reports:
    • An earnings report for the full month of March 2016.
    • An earnings report for the full month of April 2016.
    • An earnings report for the year 2016 up to (but not including) July 26th.
  • Tips:
    • If you simply use rqcli money you will get a total of all you have earned up to now as well as an earnings report for the current month.
    • To add a month from the previous year, simply use the format YYYY-MM: rqcli money 2015-11.
    • If you add a month that is in the future, the command will return information from the month of the previous year instead.

review

review is a somewhat experimental command. It's meant to log your review activity so that you can eventually check things like how long you spend on a review type and so on. It's also meant to be able to run scripts for automation. Such a script might be a download and unzip-script or something similar and it can run both pre- and post-scripts. It does require some setup, so unless you need it, you may want to just use this command for logging reviews.

  • Command: rqcli review
  • Description: Logs a review. Potentially also runs scritps for certain project types.
  • Example Usage: rqcli review.
    • This will allow you to select an assigned submission to start reviewing.
    • During the review you can pause, unpause and end the review. Each action will be logged.
    • pre and post scripts will be run if they are defined.
  • Tips:
    • You can place an index.js in the folder of the project type you are reviewing with scripts to be run on that project type. It supports running the following scripts:
      • pre: Will be run before the review is logged and started.
      • post: Will be run right after you log the end of the review.
    • You can exit a review, thereby avoiding running any post-scripts. You might do this if your post-script is deleting the submission and you want to keep it.

token

  • Command: rqcli token "<token>"
  • Description: Stores an API Auth token and the day-of-year to be able to calculate the tokens age.
  • Arguments: "<token>", because tokens often contain dashes (-), remember to put your token inside of quotation marks ("). Otherwise the cli will think that everything after the first dash is an attempt to set an option.

certs

  • Command: rqcli certs --update
  • Description: Displays all of the project names with ids for which the authenticated user is certified.
  • Options: -u, --update, updates the stored certification information with the current information from the API.

assigned

  • Command: rqcli assigned
  • Description: Gets all submissions that are currently assigned to the user.
  • Options: -n, --notify, uses desktop notifications.

feedbacks

  • Command: rqcli feedbacks
  • Description: Checks for unread feedbacks from the last 30 days
  • Options: -n, --notify, uses desktop notifications.

:black_nib: Project Styleguide

js-standard-style

:+1: Contribution Guidelines

Steps
  1. Fork this repository
  2. git clone your fork down to your local machine
  3. Submit a PR for any contributions.

License

ISC © Mikkel Trolle Larsen.