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

@wojtekmaj/jotform

v1.0.1

Published

Jotform API Node.js Client

Downloads

176

Readme

npm downloads CI

@wojtekmaj/jotform

Unofficial Jotform API Node.js Client with TypeScript support.

tl;dr

  • Install by executing npm install @wojtekmaj/jotform or yarn add @wojtekmaj/jotform.
  • Import by adding import jotform from '@wojtekmaj/jotform'.
  • Authenticate:
    jotform.options({
      apiKey: 'YOUR_API_KEY',
    });
  • Do stuff with it!
    const user = await jotform.getUser();

Getting started

Compatibility

Your project needs to use Node.js 18.0.0 or later.

You may be able to use it with Node.js 17.5.0, provided that you use --experimental-global-fetch flag.

Installation

Add @wojtekmaj/jotform to your project by executing npm install @wojtekmaj/jotform or yarn add @wojtekmaj/jotform.

Obtaining API key

To obtain Jotform API key, go to API section on My Account page.

Usage

Here's an example of basic usage:

import jotform from '@wojtekmaj/jotform';

jotform.options({
  apiKey: 'YOUR_API_KEY',
});

const user = await jotform.getUser();

Usage with EU Safe mode

If you're using Jotform EU Safe mode, you need to specify url option:

jotform.options({
  url: 'https://eu-api.jotform.com',
});

Usage with HIPAA Compliance mode

If you're using Jotform HIPAA Compliance mode, you need to specify url option:

jotform.options({
  url: 'https://hipaa-api.jotform.com',
});

Usage with Jotform Enterprise

If you're using Jotform Enterprise, you will need to specify url option:

jotform.options({
  url: 'https://your-domain.com/API',
});

or:

jotform.options({
  url: 'https://your-subdomain.jotform.com/API',
});

Usage with Jotform Teams

To access resources located in a Jotform Team, a custom jf-team-id header needs to be added to each request. It can be done by passing customHeaders object to desired method:

const teamForm = await jotform.getForm('FORM_ID', { 'jf-team-id': 'YOUR_TEAM_ID' });

API Documentation

Jotform API documentation is available at https://api.jotform.com/docs/.

jotform vs @wojtekmaj/jotform

@wojtekmaj/jotform is a fork of jotform package. It was created to add TypeScript support, ship some long-awaited features, add new features and fix bugs. It was rebuilt from the ground up to benefit from the latest JavaScript features and to be more maintainable.

@wojtekmaj/jotform is meant to be a drop-in replacement for jotform package, so you can use it without any changes to your code.

Here's how the two packages compare:

| Feature | jotform | @wojtekmaj/jotform | | ---------------------- | ------------------ | -------------------- | | TypeScript support | ❌ | ✅ | | Jotform Teams support | ❌ | ✅ | | Tests | ❌ | ✅ | | Methods available | 36 | 50 | | Number of dependencies | 2 | 1 | | Bundle size | 38.3 kB (min+gzip) | 3.5 kB (min+gzip) | | Install size | 2.35 MB | 236 kB |

License

GNU General Public License v2.0.

Author