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

appetizer

v0.0.2

Published

API client for appetize.io

Downloads

9

Readme

Appetizer

A Node.js REST based API client for Appetize.io.

Installation

The API client is released to the public npm registry and can be installed.

npm install --save appetizer

Part of the Appetizer suite

This module is part of a larger suite of components that work excellent with each other. If you liked this module we highly suggest checking out:

  • appetizer A Node.js component for interacting with the Appetize.io API.
  • appetizer-bundle Prepares and packs your React-Native application for uploading to Appetize.io.
  • appetizer-component A React Component to embed your uploaded application.

API

const Appetizer = require('appetizer');
const app = new Appetizer({ opts });

The following opts are supported:

  • key required The API key, which is required to use the library.
  • version Version number of the API we're communicating with, defaults to v1
  • endpoint Location of the API we're hitting.

Once you've created your own appetizer API instance you can use the following methods:

create

Create a new application, you can either point to a pre-uploaded application so the API can download it, or specify a file property in the data as ReadableStream or Buffer and upload that with the API call.

app.create({
  url: 'https://url.com/path/to/app.zip'
}, function (err, data) {
  if (err) {
    // Handle errors
  }

});

See official API docs for accepted fields

update

Update an existing application with new details. First argument should be the public_id of the application you want to update, second argument the data that needs to be changed.

app.update(public_id, { 
  url: 'https://url.com/path/to/app.zip',
  note: 'Hello'
}, function (err, data) {
  if (err) {
    // Handle errors
  }

});

See official API docs for accepted fields

remove

Remove a uploaded application. First argument is the public_id of the application you wish to remove.

app.remove(public_id, function (err) {
  if (err) {
    // Handle errors
  }

});

list

List all uploaded applications.

app.usage(function (err, data) {
  if (err) {
    // Handle errors
  }

});

See more to list more applications. See official API docs for accepted fields

more

There can be more applications created than the list API can return. In that case the data will have a hasMore property set to true and a nextKey property. If you want to retrieve more applications, pass the nextKey in to the more API to retrieve the next batch of applications.

app.more('adf8a09sdf8a098af', function (err) {
  if (err) {
    // Handle errors
  }

});

usage

Get usage statistics of applications.

app.usage(function (err, data) {
  if (err) {
    // Handle errors
  }

});

Testing

There are 2 sets of tests in this project. Normal unit tests that are ran using:

npm test

And a set of integration tests which requires you to have an API key to the appetize.io service so we can verify that we've integrated the API's correctly. These are run using:

API=your-api-key-here npm run integration

License

MIT