HN2new | past | comments | ask | show | jobs | submitlogin

Looks neat! Seems very limited though.. like you can't even insert multiple lines in one request?


Just tried it out. The script is able to handle multiple commands (GET, POST, etc) in one go, but you will have to package the payload as an array.

See https://github.com/ziolko/spreadapi/blob/master/spread-api.j...

As an example:

    curl -L \
        --data '[{ "method": "POST", "sheet": "Sheet1", "payload": { "username": "John", "age": 25 } }, { "method": "GET", "sheet": "Sheet1" }]' \
        "https://script.google.com/macros/s/$APP_ID/exec"
A single curl request, that POSTs a user, and then GETs the data. So you can do multiple POSTs to add multiple rows too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: