01 | function module:GetDatabase(sheet) |
02 | local database = { } |
03 | function database:PostAsync(key, value) |
04 | return doPost(sheet, key, value) |
05 | end |
06 | function database:GetAsync(key) |
07 | return doGet(sheet, key) |
08 | end |
09 | return database |
10 | 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.