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

node-axosoft

v2.3.0

Published

A node.js client for accessing the Axosoft API

Downloads

19

Readme

node-axosoft

A node.js client for the Axosoft API

This library is built to support v6 of the Axosoft REST API and has been tested with both axosoft.com hosted accounts and Axosoft installed on premise. Any questions can be sent to [email protected].

Here's a link to our full documentation for the Axosoft REST API.

Installation

Install with the node package manager npm:

$ npm install --save node-axosoft

Examples

Create the Axosoft Connection

var nodeAxosoft = require('node-axosoft');

var credentials = {};
var axosoftUrl = 'https://example.axosoft.com;

//Populate Credentials (See Below)

var axo = nodeAxosoft(axosoftUrl, credentials);

Populate Credentials

####Via User Name and Password

credentials.client_id = 'your client id';
credentials.client_secret = 'your client secret';
credentials.grant_type = 'password';
credentials.username = 'your username';
credentials.password = 'secret';

Via Authorization Code (required for public apps or if using Windows authentication)

credentials.client_id = 'your client id';
credentials.client_secret = 'your client secret';
credentials.grant_type = 'authorization_code';
credentials.redirect_uri = 'https://exampleredirect.com';

var axo = nodeAxosoft(axosoftUrl, credentials);

axo.Api.getLoginUrl(function(url) {
  // open browser using authorizationUrl and get code parameter from redirected Url after login
  var code = 'code received from redirect';
  axo.Api.exchangeCodeForToken(code);
});

Via Non-Expiring Token

//Create Non Expiring Token by logging into Axosoft account, Clicking on Tools/System Options/Axosoft API Settings/Manage Tokens, and make non-expiring token.
credentials.access_token = 'your non-expiring token';

var axo = nodeAxosoft(axosoftUrl, credentials);

Get Work Item (feature)

//optional parameters
var params = {columns: 'name'};

axo.Features.get(params, function(error, response){
    console.log(response.data);
});

Add Work Item (feature)

params = {};
item = {};
item.project = {id: 1}; //required
item.name = 'Test Item Name';
params.item = item;

//create new feature
axo.Features.add(params, function(error, response){
    console.log(response);
});

API Promises

node-axosoft also offers promise versions of its API functions. To use them, just require node-axosoft/promise instead of node-axosoft.

var nodeAxosoft = require('node-axosoft/promise');
var axo = nodeAxosoft(axosoftUrl, credentials);

// get items
axo.Features.get()
  .then(function(response) {
    console.log(response);
  });

RunKit

Test features on our RunKit. Just Clone the notebook and update the Axosoft Url and Access Token to test calls with your account.