Three weeks in, four APIs under your hands. Sheets and Docs added a third vocabulary — spreadsheets, values, documentId. How is that sitting with you?
The skeleton is identical, but I had to look up the response keys twice. Sheets is the only API so far that uses spreadsheets for its list.
Exactly the tax you pay once per API. What still felt awkward?
get_doc_title wrapping the API call in try/except. Why does a read need that but a list call does not?
Because id lookups can genuinely fail — wrong id, deleted doc, wrong account. List calls at worst return an empty list. Let the quiz sharpen that distinction.
This week you wrote five functions across Sheets and Docs:
list_spreadsheet_names() — GOOGLESHEETS_SEARCH_SPREADSHEETS, list key spreadsheetsread_first_sheet(id, range) — GOOGLESHEETS_BATCH_GET, returns values rowsappend_to_log(id, row) — GOOGLESHEETS_SPREADSHEETS_VALUES_APPEND, 2D valuescreate_doc(title) — GOOGLEDOCS_CREATE_DOCUMENT, returns the new documentIdget_doc_title(doc_id) — GOOGLEDOCS_GET_DOCUMENT_BY_ID, guarded with try/exceptFour APIs now share the same three-line skeleton. Only the strings change.
Create a free account to get started. Paid plans unlock all tracks.
Three weeks in, four APIs under your hands. Sheets and Docs added a third vocabulary — spreadsheets, values, documentId. How is that sitting with you?
The skeleton is identical, but I had to look up the response keys twice. Sheets is the only API so far that uses spreadsheets for its list.
Exactly the tax you pay once per API. What still felt awkward?
get_doc_title wrapping the API call in try/except. Why does a read need that but a list call does not?
Because id lookups can genuinely fail — wrong id, deleted doc, wrong account. List calls at worst return an empty list. Let the quiz sharpen that distinction.
This week you wrote five functions across Sheets and Docs:
list_spreadsheet_names() — GOOGLESHEETS_SEARCH_SPREADSHEETS, list key spreadsheetsread_first_sheet(id, range) — GOOGLESHEETS_BATCH_GET, returns values rowsappend_to_log(id, row) — GOOGLESHEETS_SPREADSHEETS_VALUES_APPEND, 2D valuescreate_doc(title) — GOOGLEDOCS_CREATE_DOCUMENT, returns the new documentIdget_doc_title(doc_id) — GOOGLEDOCS_GET_DOCUMENT_BY_ID, guarded with try/exceptFour APIs now share the same three-line skeleton. Only the strings change.