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

sirportly-api

v1.0.1-pre

Published

Sirportly API

Downloads

2

Readme

NodeJS Sirportly API

This library is designed to help you quickly and easily integrate your nodeJS application with a sirportly ticket server.

We have created this API to be as simple and easy to use ass possible

Example instance


// Required the library
var SirportlyAPI = require("sirportly-api");

// Instantiate the class and create an instance
var api = new SirportlyAPI({
    token:  "<api-token>",
    secret: "<api-secret>",
    server: "support.domain.tld" 
});

You can now use your api instance to communicate with the sirportly API Server

Requesting a ticket

api.ticket("<ticket-refernce>", function(err, ticket){
    console.log(ticket.reference);
});

Listing Tickets

api.tickets(1, function(err, tickets){
    for(var ticket in tickets) {
        console.log(ticket.reference);
    }
});

Submitting a new Ticket

api.create_ticket({
    subject:             "Sample Subject",
    status:              "<status-name>",
    priority:            "<priority-name>",
    team:                "<team-name>",
    sla:                 "<sla-name>",
    brand:               "<brand-name>",
    department:          "<department-name>",
    contact_method_type: "<contact-method-type>",
    contact_method_data: "<contact-method-date>",
    contact_name:        "<contact-name>"
}, callback);

All methods

ticket(reference, callback)

Fetch a specific ticket object

Parameters

reference: String, Ticket Reference ID

callback: function, Callback

tickets(page, callback)

Fetch a list of tickets

Parameters

page: Number | function, Page or callback, page wil default to 1 if not present

callback: function, Callback

create_ticket(params, callback)

Create a new Ticket

Parameters

params: Object, Ticket Parameters

callback: function, Callback

post_update(reference, updates, callback)

Post an update to a ticket

Parameters

reference: String, Ticket Reference

updates: Object, Updates

callback: function, Callback

update_ticket(reference, updates, callback)

Update a tickets properties

Parameters

reference: String, Ticekt Reference

updates: Object, Updates for the ticket

callback: function, Callback

run_macro(reference, macro, callback)

Execute a macro

Parameters

reference: String, Ticket Reference

macro: String | Number, Macro name or id

callback: function, Callback

add_follow_up(reference, params, callback)

Add afollow up to a ticket

Parameters

reference: String, Ticket Reference

params: Object, parameters for the request

callback: function, Callback

statuses(callback)

Request Statuses

Parameters

callback: function, Callback

priorities(callback)

Request Priorities

Parameters

callback: function, Callback

teams(callback)

Request Teams

Parameters

callback: function, Callback

brands(callback)

Request Brands

Parameters

callback: function, Callback

departments(callback)

Request Departments

Parameters

callback: function, Callback

escalation_paths(callback)

Request Escalation Paths

Parameters

callback: function, Callback

slas(callback)

Request SLA's

Parameters

callback: function, Callback

filters(callback)

Request Filters

Parameters

callback: function, Callback