Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zenginehq/frontend-bulk

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zenginehq/frontend-bulk

Module for working with large frontend Zengine API requests and avoiding API rate limits.

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

Frontend Bulk

Module for working with frontend bulk Zengine API requests and avoiding API rate limits.

About

The methods included in this module are wrappers around the znData service, which provides a convenient means of communication with the Zengine API.

For clarification on the znData service please refer to https://zenginehq.github.io/developers/plugins/api/services/

Installation

npm install @zenginehq/frontend-bulk --save

Usage

plugin.controller('Controller', ['$scope', 'wgnBulk', function ($scope, wgnBulk) {    
  $scope.deleteRecords = function deleteRecords(records) {
    var delay = 1500,
        params = {};
    
    params.formId = 12345;
    
    wgnBulk.deleteAll('FormRecords', params, records, delay)
      .then(function(response) {
        //do something with the response
      })
      .catch(function(err) {
        //handle the error
      })
  };

  $scope.getAllRecords = function getAllRecords() {
    var delay = 5000,
        params = {
          // Note that filters should be stringified
          filter: JSON.stringify({ and: [{ prefix: '', attribute: 'isComplete', value: 1 }] })
        };

    params.formId = 12345;
    
    wgnBulk.getAll('FormRecords', params, delay)
      .then(function(response) {
        //do something with the response
      })
      .catch(function(err) {
        //handle the error
      })
  };

  $scope.updateRecords = function updateRecords(updates) {
    var delay = 10000,
        params = {};

    params.formId = 12345;

    wgnBulk.saveAll('FormRecords', params, updates, delay)
      .then(function(response) {
        //do something with the response
      })
      .catch(function(err) {
        //handle the error
      });
  };
}]);

Keywords

FAQs

Package last updated on 19 Mar 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc