5.0.2 • Published 6 years ago

gooddata v5.0.2

Weekly downloads
154
License
BSD-3-Clause
Repository
github
Last release
6 years ago

GoodData JS SDK

GoodData javascript sdk library mainly provides a thin javascript abstraction over the GoodData REST API. It is created to makes it easy to use the GD platform and write small javascript apps relying on GD APIs.

Usage

The result of the build is in dist/gooddata[.min].js. Result of the build UMD-compatible - you can use it both globally (see D3 example) and as AMD module. Note that you need to provide jQuery before trying to load sdk. In both AMD and CommonJS environment we expect jQuery library module to be named jquery.

Node JS

You can use the SDK in nodejs, but do not forget to set custom domain URL:

const gooddata = require('gooddata');
const getStream = require('get-stream');

gooddata.config.setCustomDomain('secure.gooddata.com');

gooddata.user.login('john.doe@example.com', 'your-secret-password')
    .then(() => console.log('Success'))
    .catch((e) => {
        getStream(e.response.body).then(str => console.error(str))
    });

Quick start

To build the sdk you need to have git and Node.js installed. MacOS users should install Homebrew first and then run:

$ brew install git node yarn

Now, clone this repo with $ git clone git@github.com:gooddata/gooddata-js.git and get the library dependecies with

$ yarn install

Build

In the repository run:

$ grunt

and the built library is ready for you at dist/gooddata.min.js

Develop

It is easy to start your own project with this repository or modify and explore examples depicting some of the sdk usages. To start with examples run:

$ grunt dev

Which starts proxy that allows your script to communicate with secure.gooddata.com (backend can be changed with $ grunt dev --backend=some-other-backend.na.getgooddata.com).

To run some of the examples, first you need to update credentials in the related js file. In case of d3-data-viz example you need to edit viz.js file and update user and passwd variables. Then just add the name of the example to URL like localhost:8443/d3-data-viz and you should get a nice chord chart rendered in a while.

Documentation

Documentation of functions available in SDK can be found at sdk.gooddata.com/gooddata-js/api. It can be generated right from the source code by running:

$ grunt doc

Tests

Run tests with:

$ grunt test

Test coverage report can be found in coverage/ folder.

Releasing

Flow of release is:

  • bump version to version+1 in package.json
  • create version commit & tag and push these to your upstream remote (so watch your remote naming)

Steps to publish a release:

  • run yarn version command to select next version
  • run grunt bump-gh-pages in master
  • run npm publish in master
  • you're done
5.0.2

6 years ago

6.0.0-alpha7

6 years ago

6.0.0-alpha6

6 years ago

6.0.0-alpha5

6 years ago

6.0.0-alpha4

6 years ago

6.0.0-alpha3

6 years ago

5.0.1

6 years ago

6.0.0-alpha2

6 years ago

5.0.0

6 years ago

6.0.0-alpha1

6 years ago

6.0.0-alpha0

6 years ago

5.0.0-alpha4

6 years ago

5.0.0-alpha3

6 years ago

5.0.0-alpha2

6 years ago

5.0.0-alpha1

6 years ago

4.5.1

6 years ago

4.5.0

6 years ago

4.4.1

6 years ago

4.4.0

6 years ago

4.3.1

7 years ago

4.3.0

7 years ago

4.2.0

7 years ago

4.1.0

7 years ago

4.0.0

7 years ago

3.0.0

7 years ago

2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.6.0

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3-alpha

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

0.1.63-0

8 years ago

0.1.62-0

8 years ago

0.1.61

8 years ago