project Class
Functions for working with projects
createProject
-
title
-
authorizationToken
-
options
Create project Note: returns a promise which is resolved when the project creation is finished
Parameters
-
title
String -
authorizationToken
String -
options
Objectfor project creation (summary, projectTemplate, ...)
Returns
created project object
deleteAllObjects
-
projectId
-
dashboardUri
Deletes dashboard and its objects (only the author of the dashboard can delete the dashboard and its objects)
Parameters
-
projectId
StringProject identifier
-
dashboardUri
StringUri of a dashboard to be deleted
deleteProject
-
projectId
Delete project
Parameters
-
projectId
String
getColorPalette
-
projectId
Fetches a chart color palette for a project represented by the given projectId parameter.
Parameters
-
projectId
String- A project identifier
Returns
An array of objects with r, g, b fields representing a project's color palette
getColorPaletteWithGuids
-
projectId
Fetches a chart color palette for a project represented by the given projectId parameter.
Parameters
-
projectId
String- A project identifier
Returns
An array of objects representing a project's color palette with color guid or undefined
getCurrentProjectId
()
String
Get current project id
Returns
current project identifier
getCurrentProjectIdInBootstrap
-
bootstrapData
Return current project id in bootstrap
Parameters
-
bootstrapData
Object- data was got from bootstrap resource
getDatasets
-
projectId
Fetches all datasets for the given project
Parameters
-
projectId
String- GD project identifier
Returns
An array of objects containing datasets metadata
getFeatureFlags
-
projectId
Gets aggregated feature flags for given project and current user
Parameters
-
projectId
String- A project identifier
Returns
Hash table of feature flags and theirs values where feature flag is as key
getProjects
-
profileId
Fetches projects available for the user represented by the given profileId
Parameters
-
profileId
String- User profile identifier
Returns
An Array of projects
getTimezone
-
projectId
Gets current timezone and its offset. Example output:
{
id: 'Europe/Prague',
displayName: 'Central European Time',
currentOffsetMs: 3600000
}
Parameters
-
projectId
String- GD project identifier
setColorPalette
-
projectId
-
colors
Sets given colors as a color palette for a given project.
Parameters
-
projectId
String- GD project identifier
-
colors
Array- An array of colors that we want to use within the project. Each color should be an object with r, g, b fields. // TODO really object?