Include the following script where you want to run the batch process
NOTE: jQuery is dependency
Open up the console and initialize the utility with new
var foo = new batcher('API_KEY', 'LOGGING', 'CSV_URL')
|Your IdeaMelt API key|
Specify here if you'd like the utility to log progress. Regardless of what you set here, the utility will always log any rows that failed so that they can be diagnosed accordingly.
|The url of the CSV you'd like to use|
Once the csv has been loaded and converted to an array that can be used, the utility will log the following message in the console
After initialization, you need to specify the index for the three values needed. You can easily check the indexes with the function below. Any line number will do, the utility will simply print the index and values of all the data points in the specified row
Once you've confirmed the indexes for each of the values we need, you can specify it in the index object
foo.index.url = 0; foo.index.title = 1; foo.index.avatar = 2;
Now you can simply begin the batch process with
|Specify the row in your csv you'd like to start from|
|Specify the row in your csv you'd like to end at. You can also set this value to "end" which will iterate through the csv all the way to the end.|
You'll notice that the utility automatically spaces out requests to prevent your browser from freezing. This timeout is set by default at 100ms. You can change this value very easily. We don't recommend setting this to 0.
foo.timeout = 100
You can always check the current progress of the upload by accessing certain variables.
foo.total // total number of requests that have been sent foo.success // total number of requests that have succeeded foo.fail // total number of requests that have failed