Add a slide
add_slideAdd a slide to a presentation you may edit, at the end or at "position" (1-based), optionally with its blocks right away. Returns the new slide (ids only unless "response" is "full").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | Canvas height in px (default 720). | |
| w | No | Canvas width in px (200-4000, default 1280). | |
| bg | No | Background colour, #rrggbb. | |
| fit | No | How the background picture fits. | |
| name | No | Slide name (at most 100 characters), in the language of the presentation. | |
| slug | Yes | The presentation's slug (its address: /movie/<slug>/). | |
| name_tr | No | The slide name in the other languages of the site: {"en": "..."}. | |
| objects | No | Blocks of the slide, bottom to top: [{"type": "text"|"shape"|"button"|"line"|"image"|"code", "props": {...}}]. Missing props take the presentation theme's defaults (every prop is described in the block format reference). A link to a slide of the same presentation may be given as {"kind": "slide", "slide_number": N}. | |
| position | No | 1-based place; default: the end. | |
| response | No | "brief" (default): only the ids, numbers and types of the slides and blocks; "full": every prop of every block too. | |
| background | No | Background picture: the "src" of an uploaded picture; null removes it. | |
| transition | No | Entrance effect of this incoming slide (default: none). | none |
| transition_duration | No | Animation duration in milliseconds (100-3000, default 500); not auto advance. Values outside the range are clamped. |
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. |