Plot.ly Node API
intro
node-plotly
is an un-official JavaScript client library for https://api.plot.ly/v2/
.
See below for documentation. Or visit https://api.plot.ly/v2/ for more details on specific endpoints
documentation
configuration / authentication
Configuring the API client with your own API credential and optionally an On-Prem host is as simple
as calling the .config
method like so:
var PlotlyAPI = require('node-plotly');
PlotlyAPI.config({
username: 'string', // default: undefined
apiKey: 'string', // default: undefined
protocol: 'string', // default: https
host: 'string', // default: api.plot.ly
});
users
PlotlyAPI.Users.create
PlotlyAPI.Users.update
PlotlyAPI.Users.retrieve
files
PlotlyAPI.Files.update
PlotlyAPI.Files.retrieve
grids
PlotlyAPI.Grids.create
PlotlyAPI.Grids.update
PlotlyAPI.Grids.content
plots
PlotlyAPI.Plots.create
PlotlyAPI.Plots.update
PlotlyAPI.Plots.content
Dashboards
PlotlyAPI.Dashboards.content(fileId, shareKey?)
PlotlyAPI.Dashboards.content('user:1').then(function(result) {
console.log(result);
});
{
collaborators: {count: 0, results: []},
comments: null,
content: '...',
creation_time: '2016-07-18T20:01:55.490291Z',
date_modified: '2016-07-18T20:01:55.490Z',
deleted: null,
embed_url: 'https://local.plot.ly/~._-aA1/114.embed',
fid: '._-aA1:114',
filename: 'Map Dashboard',
filetype: 'dashboard',
image_urls: {},
img_url: '',
owner: '._-aA1',
parent: -1,
parented: true,
preview: '',
referencers: [],
references: [],
share_key: null,
share_key_enabled: null,
stars: null,
subfolder_count: null,
title: '',
views: 0,
web_url: 'https://local.plot.ly/~._-aA1/114/',
world_readable: true,
api_urls: {
files: 'https://api-local.plot.ly/v2/files/._-aA1:114',
dashboards: 'https://api-local.plot.ly/v2/dashboards/._-aA1:114',
parent: 'https://api-local.plot.ly/v2/folders/home?user=._-aA1'
}
}
license
MIT. See license
file.