September 8, 2021

API — 2.3.0

  • GET /projects and GET /projects/:id now accept an optional query parameter of variant; when provided, the data exported will be specific to the variant with an API ID that matches the parameter's value. For default and structured formats, the variants key will not be included when the variant parameter is provided.

    • Example: /projects/<PROJECT_ID>?variant=xxx-xxx-xxx

  • GET /projects/:id will not include top-level projects and project_xyz keys

    • Example request: GET /projects/123

    • Example response before change:

      • { projects: { project_123: { text_item: "Hello World", ... }}}

    • Example response after change:

      • { text_item: "Hello World", ... }

August 11, 2021

API — 2.2.0

  • GET /projects and GET /projects/:id now accepts an optional query parameter of format, which can be either flat or structured. If no format is provided, the full JSON of the project will be returned with blocks and frames.

    • Example: /projects/<PROJECT_ID>?format=flat

July 28, 2021

With the recent release of Variants for Components, we've included them in both exports from our web-app and the JSON response from the API.

API — 2.1.0

  • GET /projects/:id will now return component variants. This applies both for when fetching projects or when fetching the component library (i.e. id = ditto_component_library)

  • GET /projects/:id will now match the project JSON export from the web-app to include component information (is_comp and component_api_id) in the text object

June 21, 2021

We've updated our React library and our demo project to work with the multi-project JSON structure that the CLI now saves in text.json.

Ditto React — 0.0.4

  • TypeScript bindings are now exported 🎉

  • A new projectId prop can be passed to DittoProvider or Ditto

    • If passed to DittoProvider, all descendant Ditto components will default to pulling text from the associated project

    • If passed to Ditto, the component will pull text from the associated project

    • If passed to both DittoProvider and Ditto, the value passed to Ditto will take precedence

    • Breaking change: If a Ditto component is rendered that is not provided a projectId via direct prop or DittoContext ancestor, an error will be thrown

See more details in the updated documentation.

Ditto Demo

  • Upgraded ditto-react to version 0.0.4

  • Updated source to work with new ditto-react version by passing projectId props to all instances of DittoContext

June 7, 2021

We've updated both our CLI and API to handle multiple projects.

Heads up! This results in some breaking changes to the CLI in order for it to list projects, and will change the format of the text.json fetched by the CLI. Please upgrade your Ditto CLI via either npm or yarn.

API — 2.0.0

  • GET /project-names is the new name of the previous GET /projects endpoint. Just as before, this will return the names and IDs of projects in your Ditto workspace with Developer Mode turned on

  • GET /projects/:id will now return the structured JSON in a format compatible with multiple projects

  • GET /projects is a new endpoint that will return the content of multiple projects (specified via the query parameter projectIds) as a single JSON object

CLI — 1.0.0

  • We've updated the CLI to handle syncing multiple projects in a single directory! This means several things:

    • /ditto/config.yml now supports multiple projects. ditto-cli pull will pull all projects in the current directory's /ditto/config.yml

    • We've added two new commands to add and remove projects from /ditto/config.yml

      • ditto-cli project add

      • ditto-cli project remove

      • The regular ditto-cli project command will now function as ditto-cli project add

April 1, 2021

API — 1.1.0

  • GET /projects now includes the Component Library if Developer Mode is enabled for the Component Library

  • GET /projects/:id will return the Component Library as a structured JSON if the ID provided is ditto_component_library

February 25, 2021

API — 1.0.0

  • GET /projects endpoint for fetching Ditto projects from workspace

  • GET /projects/:id endpoint for fetching content in Ditto project as structured JSON