Loom_GoogleSheets class

Module taking in and translating JSON into data understood by the Google Sheets script API.

Base classes

class LoomPublishPlat
Abstract internet publishing module, implementing google sheets and mongodb functionality.

CONSTRUCTORS / DESTRUCTOR

Loom_GoogleSheets(LoomManager* manager, const char* module_name, const LoomModule::Type internet_type, const char* script_url, const char* sheet_id, const bool tab_matches_dev_id, const char* tab_id = "Data")
Loom Google Sheets Platform module constructor.
Loom_GoogleSheets(LoomManager* manager, JsonArrayConst p)
Constructor that takes Json Array, extracts args and delegates to regular constructor.
~Loom_GoogleSheets() defaulted
Destructor.

Function documentation

Loom_GoogleSheets::Loom_GoogleSheets(LoomManager* manager, const char* module_name, const LoomModule::Type internet_type, const char* script_url, const char* sheet_id, const bool tab_matches_dev_id, const char* tab_id = "Data")

Loom Google Sheets Platform module constructor.

Parameters
manager
module_name in String | <"Internet-Plat"> | null | Publish platform module name.
internet_type in Set(LoomModule::Type) | <7001> | {7001("Ethernet"), 7002("WiFi"), 7003("LTE")} | Code of the desired internet platform.
script_url in String | <""> | null | URL where the google sheets script is hosted, without domain (ex. /macros/s/AKfycby<more letters="" here>="">_k0n/exec).
sheet_id in String | <""> | null |ID Of the spreadsheet to put data in (script must have edit access).
tab_matches_dev_id in Bool | <true> | null | Override tab_id with the name+instance number of the device.
tab_id in String | <"Data"> | null | Name of the tab that the device will put data into.

Check out https://github.com/OPEnSLab-OSU/Loom/wiki/Using-Loom-with-Google-Sheets (or http://www.open-sensing.org/evaporometerblog/datalog) for more information on these parameters.

Loom_GoogleSheets::Loom_GoogleSheets(LoomManager* manager, JsonArrayConst p)

Constructor that takes Json Array, extracts args and delegates to regular constructor.

Parameters
manager
in The array of constuctor args to expand

bool Loom_GoogleSheets::send_to_internet(const JsonObject json, LoomInternetPlat* plat) override protected

Send JSON data to a google sheet.

Parameters
json in The JSON data, formatted according to publish();
plat in A pointer to an internet platform
Returns True if success