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

ma3route-cli

v0.7.0

Published

Terminal Client for Ma3Route REST API

Downloads

1

Readme

ma3route-cli

Terminal Client for the Ma3Route REST API v2

node npm Travis Gemnasium Coveralls

installation:

$ npm install --global ma3route-cli

usage:

options:

Options can be passed to any sub-command in different styles:

$ ma3route --limit=1 # preferred way
$ ma3route --limit 1

configurations:

To configure the client, you use the config sub-comand:

$ ma3route config --sdk.key=somekey --sdk.secret=somesecret
$ ma3route config --limit=1

Note: you need an API key and secret to be able to interact with the API

All the configurations are used to build requests to the API. Therefore, if you configure limit to 10, all requests to the API (where applicable) will use this parameter.

The CLI ships with some default configurations, you can view them with:

$ ma3route config --default

To view your own configurations, you can view them with:

$ ma3route config --user

To delete a configuration, you specify its key, use --delete:

$ ma3route config --delete=limit
$ ma3route config --delete=limit,sdk        # multiple configuration values

endpoints:

The terminal client uses the awesome Ma3Route SDK for Node.js to perform operations against the API.

b, banner-adverts      banner adverts
d, driving-reports     driving reports
e, external-stream     external stream
l, listed-adverts      listed adverts
m, misc                miscellaneous operations
n, news                news articles
p, places              places
t, traffic-updates     traffic updates
u, users               ma3route users

All these sub-commands refer to the SDK inner modules. For example, banner-adverts uses the bannerAdverts sub-module in the SDK.

If a module (which most do) supports retrieving the relevant entities, you can use the --get flag or omit it entirely:

$ ma3route traffic-updates --get
$ ma3route traffic-updates          # --get is implied

To create an entity, use the flag --create:

$ ma3route users --create [email protected] --password=secretpassword

To delete an entity, use the flag --delete:

$ ma3route traffic-updates --delete --id=101

Any other module function can be specified using a decamelized option. For example, to invoke the getTowns function in module places, use the flag --get-towns

$ ma3route places --get-towns

Note that not all commands support all these flags. For example, you can not delete a user with users --delete

parameters:

To pass parameters to the any module function, you use flags. For example, if we wanted to limit a response to 20 items, we could:

$ ma3route driving-reports --limit=20

help information:

To view help information:

$ ma3route help

To view version information:

$ ma3route version

To enable debug output, just ensure the environment variable ${DEBUG} is truthy:

$ DEBUG=1 ma3route config

You can also use the --debug flag to show debug output:

$ ma3route config --debug

license:

The MIT License (MIT)

Copyright (c) 2015-2016 GochoMugo (www.gmugo.in)