function module:GetDatabase(sheet) local database = {} function database:PostAsync(key, value) return doPost(sheet, key, value) end function database:GetAsync(key) return doGet(sheet, key) end return database end
So, from my understanding, whenever PostAsync() is called, doPost is returned, and whenever GetAsync() is called, doGet is returned? Am I correct in this understanding?
Also, functions are being called on the table? This code is confusing me for some reason.
Whenever you call :PostAsync() on the module, which is what the script is in, it'll return a function doPost() that I'm assuming uses PostAsync. This looks like code for a Sheets API.