Skip to content

Batch uploads, Image buffering, and more Enums

Latest
Compare
Choose a tag to compare
@MrPickles MrPickles released this 09 May 21:28

This release introduces new batch functions that can upload multiple data points/images with one method call. Usage of these functions are optional, although it is slightly more efficient to do all tasks in batch. The API for using these functions are the same as their non-batch counterparts, except you now pass in an array of the data points you'd like to upload.

public void writeDataBatch(TestType[] testTypes, String[] userIds, float[] values);
public void writeTrialsBatch(TestType[] testTypes, String[] userIds, float[][] trialsBatch);
public void uploadToDriveBatch(String[] folderIds, String[] fileNames, Bitmap[] images);

The second change is a bug fix with the buffering of image uploads. Before, if two calls to uploadToDrive were chained together, the first call would be invalidated. (Thus the only way to get past this was to put the second method call inside a callback.) This release fixes that issue, making it safe to call uploadToDrive multiple times back to back.

sheets.uploadToDrive("0B3RViSRC0aoYVDN6MWZUb1RDSVU", "first image", bitmap1);
sheets.uploadToDrive("0B3RViSRC0aoYVDN6MWZUb1RDSVU", "second image", bitmap2);

The last change is the addition of new foot curling enums.

Sheets.TestType.LF_CURL
Sheets.TestType.RF_CURL