Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Sheetsu

Yuri Schimke edited this page Jul 18, 2018 · 8 revisions

Sheetsu

Visit Your APIs to get your sheet id. For authentication, find the details under "Show all cool options". HTTP Verbs are selected with -X, and data submitted with "-d '{...}'"

https://sheetsu.com/docs/beta

Aliases

sheetsuapi -> https://sheetsu.com/apis/v1.0/{0}

Limitations

Currently only supports a single authenticated Sheetsu API.

Bash Completion for full URIs

$ okurl https://sheetsu.com/apis/v1.0/{SHEET}
//sheetsu.com/apis/v1.0/{SHEET}                              //sheetsu.com/apis/v1.0/{SHEET}/sheets/{TAB}
//sheetsu.com/apis/v1.0/{SHEET}/:column/:value               //sheetsu.com/apis/v1.0/{SHEET}/sheets/{TAB}/:column/:value
//sheetsu.com/apis/v1.0/{SHEET}/_keys                        //sheetsu.com/apis/v1.0/{SHEET}/sheets/{TAB}/_keys
//sheetsu.com/apis/v1.0/{SHEET}/search                       //sheetsu.com/apis/v1.0/{SHEET}/sheets/{TAB}/search

API List

Access public APIs without Authentication

$ sheetsuapi 020b2c0f
[
  {
    "id": "1",
    "name": "Peter",
    "score": "43"
  },
  {
    "id": "2",
...

Authenticate to access a restricted API

$ okurl --authorize sheetsu
Sheetsu API Key []: xxxxxxxx
Sheetsu API Password []:

Posting a new row to your API

$ okurl https://sheetsu.com/apis/v1.0/8b82ef7ce3b8 | jq -r '.[] | [.Name, .Age] | @tsv'
Jim	25
Todd	32
Yuri	102

$ okurl https://sheetsu.com/apis/v1.0/8b82ef7ce3b8/_keys
[
  "Name",
  "Age",
  "Comments",
  "older"
]

$ okurl https://sheetsu.com/apis/v1.0/8b82ef7ce3b8 -X POST -d '{ "Name": "Yuri3", "Age": "102" }'
{
  "Name": "Yuri3",
  "Age": "102"
}

$ okurl https://sheetsu.com/apis/v1.0/8b82ef7ce3b8 | jq -r '.[] | [.Name, .Age] | @tsv'
Jim	25
Todd	32
Yuri	102
Yuri3	102 

Download from one API and upload in bulk

$ tweetsearch schimke | jq '{rows: [.statuses[] | {"Text": .text, "User": .user.name}] }' | okurl https://sheetsu.com/apis/v1.0/8b82ef7ce3b8 -d @-
[
  {
    "Text": "MIDWINTER BY CHAD SCHIMKE https://t.co/J0ggTs0cBb",
    "User": "Chad Schimke"
  },
  {
    "Text": "Já ouviu ‘Satori LIVE- Día de Muertos, Oaxaca Mexico’ de satorimusica na #SoundCloud? #np https://t.co/nxWg71l5hg",
Clone this wiki locally