quip / quip-api

Quip Automation REST API for editing documents, folders, and users
Apache License 2.0
297 stars 163 forks source link

Editing a Slideshow #75

Open pedrocolon93 opened 4 years ago

pedrocolon93 commented 4 years ago

Hi there,

I am trying to use the API to edit a slideshow, but I get the following:

Traceback (most recent call last):
  File "testquip.py", line 17, in <module>
    r = client.edit_document( "GxLtAAShiNmc", "potato", operation=client.APPEND, format="html")
  File "/Users/pedro/Documents/git/quip-api/python/quip.py", line 416, in edit_document
    return self._fetch_json("threads/edit-document", post_data=args)
  File "/Users/pedro/Documents/git/quip-api/python/quip.py", line 808, in _fetch_json
    raise QuipError(error.code, message, error)
quip.QuipError: 400: Invalid or missing slide layout for adding a new slide.

Does anyone know what the slide layout is??

jesseditson commented 4 years ago

Looks like we have an undocumented required parameter - I've updated the docs internally which should go out in the next week or so. In the meantime, here's a screenshot of the new docs:

image

It seems to me like you'll just want to pass slide_layout=0 unless the only content you're adding is an image tag, in which case you'll use slide_layout=1