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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sqwiggle-node

v0.0.2

Published

Node.js library for the Sqwiggle API

Downloads

12

Readme

Build Status

sqwiggle-node

Node.js library for the Sqwiggle API

Installation

npm install sqwiggle-node

Configuration

Create an API Client at https://www.sqwiggle.com/company/clients

Then you can instantiate the API client:

var Sqwiggle = require("sqwiggle-node");
var token = '...'; // Your API token here
var client = new Sqwiggle(token);

Usage

Services

The module exports an API wrapper that you can use to query any of the existing API endpoints. There are 4 patterns for API calls:

// Index actions
client.service.index({data: "for filtering or updating"}, function(error, response) {
  if(error) {
    // Something went wrong. You will find details in the error hash
    console.log(error)
  } else {
    // Response contains the information retrieved from the server
    console.log(response)
  }
})

// Find actions
client.service.find(objectId, function(error, response) { })

// Create actions
client.service.create({object: "data", goes: "here"}, function(error, response) { })

// Update actions
client.service.update(objectId, {object: "data", goes: "here"}, function(error, response) { })

// Delete actions
client.service.delete(objectId, function(error, response) { })

Available Services

There are 7 services that follow this pattern:

  • messages
  • invites
  • conversations
  • attachments
  • organizations
  • rooms
  • users

As well as one that does not:

  • info

which has 3 endpoints:

client.info.configuration(callback)
client.info.versions(callback)
client.info.all(callback)

For more information on the endpoints and parameters, check out the Sqwiggle API documentation

Sample Calls

var Sqwiggle = require("sqwiggle-node");
var token = '...'; // Your API token here.
var client = new Sqwiggle(token);

// Get a list of all the rooms
client.rooms.index(null, function(err, resp) {
  if(err) {
    console.log(err);
  } else {
    console.log(resp);
  }
}

// Get the last 5 messages
client.messages.index({page: 1, limit: 5}, function(err, resp) {
  if(err) {
    console.log(err);
  } else {
    console.log(resp);
  }
}

// Create a message in a room
client.messages.create({text: 'Hello from Node!', room_id: 12345}, function(err, resp) {
  if(err) {
    // there was an issue creating the message
  } else {
    console.log(resp)
  }
}

// Change an attachment to a message
client.attachment.update(12345, {title: 'Fun Image!'}, function(err, resp) {
  if(err) {
    // there was an issue updating the attachment
  } else {
    console.log(resp)
  }
})

// Delete an invitation
client.invites.delete(4321, function(err, resp) {
  if(err) {
    // didn't work
  } else {
    // Response will always be 'OK' for successful deletes.
    console.log(resp)
  }
}

// Get all of the info on client versions and current configuration:
client.info.all(function(err, resp) {
  if(err) {
    // something went wrong
  } else {
    console.log(resp)
  }
})

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Write a test for your use-case
  4. Implement the use-case
  5. Commit your changes (git commit -am "Adding some feature")
  6. Push to the branch(git push origin my-new-feature)
  7. Open a new Pull Request