From 4e63e54e5c8162977577adb2fb4422b86b4161e3 Mon Sep 17 00:00:00 2001 From: GPortas Date: Wed, 24 Jan 2024 09:19:42 +0000 Subject: [PATCH] Stash: initialization docs WIP --- README.md | 2 +- docs/installation.md | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 80680ee5..97440490 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A JavaScript/TypeScript API wrapper for [Dataverse](http://guides.dataverse.org/en/latest/api/). - [Installation](./docs/installation.md) -- [Use Cases Documentation](./docs/api.md) +- [Use Cases](./docs/useCases.md) - [Local Development](./docs/localDevelopment.md) - [Contributing](./CONTRIBUTING.md) - [License](./LICENSE) diff --git a/docs/installation.md b/docs/installation.md index 564ed89d..00520cd8 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,6 +2,8 @@ ## NPM +### Stable version + A stable 1.x version of this package is available as `js-dataverse` at https://www.npmjs.com/package/js-dataverse Install the package stable version using npm: @@ -10,10 +12,20 @@ Install the package stable version using npm: npm install js-dataverse ``` +### Development versions + An unstable 2.x version of this package with breaking changes is under development. Until a 2.0 version is officially released, it can be installed from https://github.com/IQSS/dataverse-client-javascript/pkgs/npm/dataverse-client-javascript -## API Config +## Initialization + +In order for the package to connect to the Dataverse API, there is an `APIConfig` object that should be initialized to set the preferred authentication mechanism with the associated credentials for connecting to the Dataverse API. + +Currently, the supported authentication mechanisms are: + +- API Key: The recommended mechanism and the original one from the initial package versions. The API Key should correspond to a particular Dataverse user. + +- Session Cookie: This is an experimental feature primarily designed for Dataverse SPA development. It is necessary to enable the corresponding feature flag in the Dataverse installation (See https://guides.dataverse.org/en/latest/installation/config.html?#feature-flags). It is recommended not to use this mechanism. -TODO +TODO \ No newline at end of file