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

ingresse-sdk

v1.20.1

Published

Ingresse JS SDK for NodeJs and Browsers

Downloads

2

Readme

Ingresse JavaScript SDK

SDK CI Coverage Status

This is the Ingresse JavaScript SDK for node and Browser.

Supported API's:

| API | Authentication | | ------------ | -------------- | | Ingresse | Ingresse Auth | | Tickets | JWT | | Events | JWT | | EventsSearch | Public |

Install

To use in node:

$ npm install --save ingresse-sdk

To use in the browser:

<script src="https://cdn.ingresse.com/sdk/ingresse-sdk.js"></script>

How to use

In the Browser

Browser Support

Chrome | Firefox | Safari | Opera | Edge | IE | --- | --- | --- | --- | --- | --- | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 8+ ✔ |

To use in browser include the script dist/browser/ingresse-sdk.js in your .html and create a new instance of the Sdk.

<head>
    <!-- Include Ingresse SDK -->
    <script src="https://cdn.ingresse.com/sdk/ingresse-sdk.js"></script>

    <script>
        // Require Ingresse JS SDK
        var Sdk = require('ingresse-sdk');

        // Create a new SDK instance
        var ingresse = new Sdk();

        // Set the auth token for the ticket api
        ingresse.ticket.auth.setToken('1f2e3ggef4e5.gedgwevrwg.23f2f');

        // Get ticket item with ID: 570
        ingresse.ticket.getItem('570')
            .then(function (response) {
                console.log(response)

            }).catch(function (error) {
                console.log(error)
            });
    </script>
</head>

<body></body>

You can also customize some of the Sdk configuration like the url of the API you want to use.

<head>
    <!-- Include Ingresse SDK -->
    <script src="https://cdn.ingresse.com/sdk/ingresse-sdk.js"></script>

    <script>
        // Require Ingresse JS SDK
        var Sdk = require('ingresse-sdk');

        // Create a new SDK instance passing configuration
        // params for the Ticket API
        var ingresse = new Sdk({
            ticket: {
                env: 'hmla'
            }
        });
    </script>
</head>

<body></body>

In Node

To use in node first install with npm:

$ npm install --save ingresse-sdk

Then you can require the module to use:

var Sdk = require('ingresse-sdk');

var ingresse = new Sdk({
    ticket: {
        env: 'hmla'
    }
});

ingresse.ticket.auth.setToken('123455');

// Get ticket item with ID: 570
ingresse.ticket.getItem('570')
    .then(function (response) {
        console.log(response);
    })
    .catch(function (error) {
        console.log(error);
    });

Development

To build the node|browser module run the command:

$ npm run build

To generete the docs run the command:

$ npm run docs

Documentation

Will run build and docs commands and after will publish the documentation at the GitHub Page.

$ npm run deploy