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
-
titleString -
authorizationTokenString -
optionsObjectfor 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
-
projectIdStringProject identifier
-
dashboardUriStringUri of a dashboard to be deleted
deleteProject
-
projectId
Delete project
Parameters
-
projectIdString
getColorPalette
-
projectId
Fetches a chart color palette for a project represented by the given projectId parameter.
Parameters
-
projectIdString- 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
-
projectIdString- 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
-
bootstrapDataObject- data was got from bootstrap resource
getDatasets
-
projectId
Fetches all datasets for the given project
Parameters
-
projectIdString- GD project identifier
Returns
An array of objects containing datasets metadata
getFeatureFlags
-
projectId
Gets aggregated feature flags for given project and current user
Parameters
-
projectIdString- 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
-
profileIdString- 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
-
projectIdString- GD project identifier
setColorPalette
-
projectId -
colors
Sets given colors as a color palette for a given project.
Parameters
-
projectIdString- GD project identifier
-
colorsArray- 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?