13.5.0 • Published 3 years ago

@gooddata/gooddata-js v13.5.0

Weekly downloads
9,723
License
BSD-3-Clause
Repository
github
Last release
3 years ago

npm version

GoodData JS SDK

Thin javascript abstraction over the GoodData REST API

Getting started

Usage

Using as a npm package

1) go to your project directory and add the package: \ → with yarn: yarn add @gooddata/gooddata-js \ → with npm: npm install --save @gooddata/gooddata-js

:heavy_exclamation_mark: **WARNING: npm package renamed from `gooddata` to `@gooddata/gooddata-js`** :heavy_exclamation_mark:

2) import the package's default export: \ → in transpiled browser app with ES6 modules syntax: import { factory } from '@gooddata/gooddata-js'; \ → in node.js with CommonJS syntax: const factory = require('@gooddata/gooddata-js').factory;

4) call the API:

```js
var gooddata = factory({ domain: 'secure.gooddata.com' });
gooddata.user.login('john.doe@example.com', 'your-secret-password')
    .then((response) => console.log('Login OK', response))
    .catch((apiError) => console.error('Login failed', apiError, "\n\n", apiError.responseBody));

```

5) Please note that CORS could prevent the request. Refer to your options in GoodData.UI documentation, ie. setup local proxy or ask the GoodData platform for allowing a specific domain.

Using as a standalone library

You have two options:

  • download gooddata.js or gooddata.min.js from the latest release
  • build on your own:
    git clone https://github.com/gooddata/gooddata-js.git
    cd gooddata-js
    git checkout v6.0.0 # choose a version, or omit this line to use unstable code from `master` branch
    yarn install --pure-lockfile
    yarn build
    # get gooddata.js and gooddata.min.js from /dist folder

Then you can import the library file and global variable gooddata contains all exported members:

<script type="text/javascript" src="gooddata.js"></script>
<script type="text/javascript">
    var sdk = gooddata.factory({ domain: 'secure.gooddata.com' });
    sdk.user.login('john.doe@example.com', 'your-secret-password')
</script>

Contributing :coffee:

We welcome any contribution in form of issues or pull requests.

Install Node.js (node 12.16.1, npm v6.13.4) and Yarn 1.22.4.

These commands may come in handy while developing:

commanddescription
yarn install --frozen-lockfilefirst step
yarn devbuild gooddata-js to /dist in watch mode
yarn testrun unit tests in watch mode
yarn validatevalidate codestyle (tslint)
yarn buildbuild commonjs /lib and bundle files to /dist
grunt yuidoc:compilebuild yui docs to /docs

Do not forget to update CHANGELOG.md when contributing.

Publishing

:heavy_exclamation_mark: Only for internal gooddata developers :heavy_exclamation_mark:

NPM package publishing

Package publishing is done via Jenkins Job:

https://checklist.intgdc.com/job/client-libs/job/gooddata-js-release/

SDK API documentation publishing

To publish API documentation sdk.gooddata.com/gooddata-js/api you have to prompt following commands:

commanddescription
1. yarn build
2. grunt bump-gh-pagesPublishes documentation

Changelog

License

(C) 2007-2018 GoodData Corporation

For more information, please see LICENSE

13.5.0

3 years ago

13.4.0

3 years ago

13.3.0

3 years ago

13.2.0

3 years ago

13.1.4

4 years ago

13.1.3

4 years ago

13.1.2

4 years ago

13.1.1

4 years ago

13.1.0

4 years ago

13.0.4

4 years ago

13.0.3

4 years ago

13.0.2

4 years ago

13.0.1

4 years ago

13.0.0

4 years ago

12.5.5

4 years ago

12.5.4

4 years ago

12.5.3

4 years ago

12.5.2

4 years ago

12.5.1

4 years ago

12.5.0

4 years ago

12.4.0

4 years ago

12.3.0

4 years ago

12.2.0

4 years ago

12.1.0

4 years ago

12.0.0

4 years ago

11.22.0

4 years ago

11.21.2

4 years ago

11.21.1

4 years ago

11.21.0

4 years ago

11.20.0

5 years ago

11.19.3

5 years ago

11.19.2

5 years ago

11.19.1

5 years ago

11.19.0

5 years ago

11.18.2

5 years ago

11.18.1

5 years ago

11.18.0

5 years ago

11.17.0

5 years ago

11.16.0

5 years ago

11.15.0

5 years ago

11.14.2

5 years ago

11.14.1

5 years ago

11.14.0

5 years ago

11.13.0

5 years ago

11.12.0

5 years ago

11.11.0

5 years ago

11.10.0

5 years ago

11.9.0

5 years ago

11.8.0

5 years ago

11.7.0

5 years ago

11.6.0

5 years ago

11.5.0

5 years ago

11.4.0

5 years ago

10.2.1

5 years ago

10.0.3

5 years ago

11.3.1

5 years ago

11.3.0

5 years ago

11.2.2

5 years ago

11.2.1

5 years ago

11.2.0

5 years ago

11.1.1

5 years ago

11.1.0

5 years ago

11.0.0

5 years ago

10.2.0

5 years ago

10.1.0

5 years ago

10.0.1

5 years ago

10.0.0

5 years ago

9.0.1

6 years ago

9.0.0

6 years ago

8.4.1

6 years ago

8.4.0

6 years ago

8.3.0

6 years ago

8.2.0

6 years ago

8.1.1

6 years ago

8.1.0

6 years ago

8.0.0

6 years ago

7.1.1

6 years ago

7.1.0

6 years ago

7.0.0

6 years ago

6.2.0

6 years ago

6.1.2

6 years ago

6.1.1

6 years ago

6.1.0

6 years ago

6.0.0

6 years ago

6.0.0-alpha10

6 years ago

6.0.0-alpha9

6 years ago

6.0.0-alpha8

6 years ago

6.0.0-alpha7

6 years ago