Add, change or delete blocks
edit_blocksChange some blocks of a slide and leave the others alone, in one step: "add": new blocks [{"type", "props"}] (placed on top, or at the bottom with "at_bottom": true); "update": [{"id", "props"}] -- only the given props change. The same props for several blocks at once, like selecting them in the editor: {"ids": [...], "props"}; or for a card and everything drawn on it: {"inside": <id of the card's background block>, "props"} -- that block and every block lying within its rectangle (props a block type does not have, like "link" of a code block, are skipped for it); "delete": [block ids]. Returns the slide (ids only unless "response" is "full").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | New blocks: [{"type", "props"}]. | |
| slug | Yes | The presentation's slug (its address: /movie/<slug>/). | |
| delete | No | Ids of blocks to delete. | |
| update | No | Changes: [{"id" | "ids": [...] | "inside": <card block id>, "props"}]. | |
| response | No | "brief" (default): only the ids, numbers and types of the slides and blocks; "full": every prop of every block too. | |
| slide_id | Yes | The id of a slide (stable, the "id" of the slide in the presentation). Its number (position) changes when slides are reordered. | |
| at_bottom | No | Put the added blocks under the others (default: on top). | |
| base_version | No | Optional: the "version" of the slide as you read it. The change is refused (409 conflict) when somebody changed the slide meanwhile, instead of overwriting their work. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | ||
| w | No | ||
| bg | No | ||
| id | Yes | Stable id of the slide. | |
| fit | No | ||
| url | No | The address people open in a browser. | |
| name | No | ||
| number | Yes | 1-based position; changes when slides are reordered. | |
| name_tr | No | The same text in the other languages of the site: {"en": "..."}. | |
| objects | Yes | Blocks, bottom to top ("props" only in the full form). | |
| version | No | Stamp of the content as it is now: give it back as "base_version" to change it only if nobody else did meanwhile. | |
| background | No | The "src" of the background picture, or null. | |
| transition | No | Entrance effect of this incoming slide. | |
| layout_warnings | No | How the changed slides will probably look: texts too long for their blocks, blocks outside the slide, texts over each other (estimated -- look at them). | |
| transition_duration | No | Animation milliseconds, not auto advance. | |
| missing_translations | No | What is not translated yet into the other languages of the site (add it): the first ones; "missing_translations_count" says how many there are. | |
| missing_translations_count | No | How many texts are not translated yet. |