diff --git a/CHANGELOG.md b/CHANGELOG.md index 9301acb80dc..e363b26bd38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [Unreleased] +### Added +- Beta: Added API methods that wrap the API endpoint for managing Dash objects on plot.ly. The API interface is under `plotly.api.v2.dash_apps` + ## [2.0.8] - 2017-04-21 ### Added - offline embedded plots are now responsive to window resizing when `output_type == "div"` is set in `plotly.offline.iplot()`. @@ -10,7 +14,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Updated - `plotly.offline.plot` and `plotly.offline.iplot` now accept various [configuration options](https://plot.ly/javascript/configuration-options/) for their arguments. - ## [2.0.7] - 2017-04-07 ### Updated - Updated `plotly.min.js` to version 1.25.0 for `plotly.offline`. diff --git a/plotly/api/v2/__init__.py b/plotly/api/v2/__init__.py index 5ccbccfd4f4..852a18947c7 100644 --- a/plotly/api/v2/__init__.py +++ b/plotly/api/v2/__init__.py @@ -1,4 +1,4 @@ from __future__ import absolute_import -from plotly.api.v2 import (dashboards, files, folders, grids, images, plot_schema, - plots, users) +from plotly.api.v2 import (dash_apps, dashboards, files, folders, grids, + images, plot_schema, plots, users) diff --git a/plotly/api/v2/dash_apps.py b/plotly/api/v2/dash_apps.py new file mode 100644 index 00000000000..e38848b53ae --- /dev/null +++ b/plotly/api/v2/dash_apps.py @@ -0,0 +1,26 @@ +""" +Beta interface to Plotly's /v2/dash-apps endpoints. +""" +from __future__ import absolute_import + +from plotly.api.v2.utils import build_url, request + +RESOURCE = 'dash-apps' + + +def create(body): + """Create a dash app item.""" + url = build_url(RESOURCE) + return request('post', url, json=body) + + +def retrieve(fid): + """Retrieve a dash app from Plotly.""" + url = build_url(RESOURCE, id=fid) + return request('get', url) + + +def update(fid, content): + """Completely update the writable.""" + url = build_url(RESOURCE, id=fid) + return request('put', url, json=content)