Giter VIP home page Giter VIP logo

jotform's Introduction

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

Wojciech Maj Wojciech Maj

jotform's People

Contributors

appaky avatar denisozgovde avatar dependabot[bot] avatar diki avatar eeertekin avatar elifceren avatar fatiiates avatar hasansoydabas avatar kennethpdev avatar samjetski avatar umutbugrahan avatar utkubekci avatar wojtekmaj avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

yashvesikar

jotform's Issues

Multiple instances support

Hi, thanks for all the improvements that make this fork such an attractive option.

Given that currentOptions is a global, there is no way to have multiple jotform instances in the same nodejs process.

This means that integrations (which handle one api key per user) can't use this fork of the client.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.