2.0.7 • Published 5 years ago

@panviva/node-sdk v2.0.7

Weekly downloads
336
License
ISC
Repository
-
Last release
5 years ago

Panviva SDK

npm npm bundle size (scoped) npm (scoped)

Introduction

Wouldn't it be great if you could share information seamlessly? This JavaScript SDK allows you to push your knowledge further and consume a complete list of Panviva's API offerings within your application. This is a simple NPM package provided by Panviva to help streamline integration with Panviva APIs within JavaScript environments.

Prerequisites

To use the Panviva SDK, you must have:

  1. Access to a Panviva instance (also known as a tenant)
  2. A developer account on the Panviva developer portal (dev.panviva.com)
  3. An active Panviva API subscription (also known as an API plan) and valid Panviva API credentials

If you are not a customer or need help visit www.panviva.com/support.

How to get credentials

Follow the steps below to get your API key & instance name.

To get your API key you must:

  1. Sign into the Panviva developer portal at dev.panviva.com
  2. Navigate to your profile (click your name then click "Profile" from the top navigation bar)
  3. Your should now see your API key under "Your Subscriptions" section of your profile.

To get your instance name you must:

  1. Sign into the Panviva developer portal at dev.panviva.com
  2. Navigate to your API (click "APIs" from the top navigation bar)
  3. You should now see your API instance under your API suite (look for "The instance name for the API Suite is")

Installation

To install @panviva/node-sdk:

# Run this command in your project root
# with npm
npm install --save @panviva/node-sdk

# with yarn
yarn add @panviva/node-sdk

Set up:

const { PanvivaClient, ResourceApiKeys } = require('@panviva/node-sdk');

const panvivaClient = new PanvivaClient('_Your instance name here_');
// You can provide a base URL as the second argument, it defaults to `https://api.panviva.com`

panvivaClient.setApiKey(ResourceApiKeys.apiKeyHeader, '_Your API key_');

Example request:

panvivaClient
  .searchArtefacts({ simplequery: '*' })
  .then((response) => {
    console.log(response);
  })
  .catch((ex) => console.error(ex));

Available client methods

2.0.7

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

1.0.3

5 years ago