1.2.1 • Published 1 year ago

simplycsv v1.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

SimplyCSV client library

SimplyCSV is an open-source spreadsheet import and on-boarding tool that makes spreadsheet importing simple.

How it works! 1. Create an account on https://app.simplycsv.com. 2. Generate a free API key, go to https://app.simplycsv.com and create an account. Once logged in, select API Credentials and click Generate New Key. 3. Create an import template by adding fields that will be imported and adding any field validators. Optionally configure webhooks. 4. Import your spreadsheet.

Usage example:

import SimplyCSV from "simplycsv";

const template = new SimplyCSV("template-uuid", "api-key");

// Create a button
template.createButton()
    .then(button => ...);

// Show popup import manually
template.show()
    .then(file => ...);

First of all, you should to create a SimplyCSV object. You should pass to the constructor template's UUID and your API key.

Methods

createButton

Method creates a button that shows up the popup form for provided template. This method returns Promise with a button (html element) itself.

bashow

Method shows up the popup. This method returns Promise which will be resolved after import completed. As payload, you will receive next object:

{
    "file_uuid": "uuid-of-uploaded-file"
}

setServerUrl

Method sets server url and updates api url. You should call this method if you use your own server with your own SimplyCSV installation.