New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@caldera-labs/api-client

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@caldera-labs/api-client

API client for Caldera Forms and Caldera Forms Pro

latest
Source
npmnpm
Version
0.6.1
Version published
Maintainers
1
Created
Source

caldera-api-client

JavaScript API client for Caldera Forms REST API and Caldera Forms Pro REST API.

🌋 👀 Documentation

Build Status Documentation Status Maintainability

Install

npm i @caldera-labs/api-client

Usage

Create a form client and use it to get page one of form configs via API

import {wpClientFactory} from '@caldera-labs/api-client';

const formsAdminApiClient = wpClientFactory(
	'https://hiroy.club/wp-json/cf-api/v2', //root of Caldera Forms REST API namespace
	'12345', //the nonce for REST API cookie authentication
    	'forms' //type of client to get
);
let forms = [];
formsAdminApiClient(page).then(r => {
	forms = r;
}).catch(error => {
	console.log(error);
	throw error;
});

See: http://calderalabs.org/caldera-api-client/manual/overview.html#usage

Development Requirements

  • npm
  • Yarn
  • Git
  • Flow

Testing

We use Facebook Jest for unit tests. Test go in the directory __tests__.

  • Run test watcher
yarn test

Make sure to review the docs on testing requests

Scripts

Build for release

  • yarn build
    • Runs tests, and flow type checks and Babel compiles with minification and source map.

This script calls a pre, compile, and post subcommands. For consistency, please call other scripts at those three events.

Tests

*yarn test - Run test watcher

  • npm test:once
    • Run tests once

Type-checking With Flow

  • yarn flow

Lint Code

  • yarn lint
    • Run linter and fixer watch
  • yarn lint:fix
    • Lint and fix code once
  • yarn lint:once
    • Lint code once

Generate Documentation

  • npm run documentation
    • Generates documentation from inline docs
    • Generates documentation from markdown files in /manual

Release To npm

Must be logged in as project maintainer via npm cli

  • yarn release

Keywords

es6

FAQs

Package last updated on 03 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts