# watson-data-kits

> Node JS API SDK package providing programmatic access to the Watson Data Kits API

Latest version **0.1.5** (published 2018-04-13) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install watson-data-kits
pnpm add watson-data-kits
yarn add watson-data-kits
bun add watson-data-kits
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2018-04-13 |
| First published | 2018-04-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >6.10 |
| Dependencies | 3 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Chris Crossman |
| Maintainers | chriscrossman |

## Links

- npm: https://www.npmjs.com/package/watson-data-kits
- Repository: https://github.com/watson-data-kits/nodejs-sdk
- Homepage: https://github.com/watson-data-kits/nodejs-sdk#readme
- Issues: https://github.com/watson-data-kits/nodejs-sdk/issues
- npm.io page: https://npm.io/package/watson-data-kits

## Dependencies (3)

- [hget](https://npm.io/package/hget.md) ^3.1.0
- [request](https://npm.io/package/request.md) ^2.85.0
- [querystring](https://npm.io/package/querystring.md) ^5.2.0

## Recent versions

- 0.1.5 (latest) — 2018-04-13
- 0.1.4 — 2018-04-12
- 0.1.2 — 2018-04-12

## README

# Watson Data Kits - watson-data-kits-nodejs

NodeJS library for Watson Data Kits https://console.bluemix.net/catalog/

## Installation
Node v6.10 (or later) and npm are required. (`brew upgrade && brew install node`)

Install node modules with `npm install`

npm install datakits

## Usage

First, setup the client:
```
var travel = require('../lib/datakits');

var client = new travel.DatakitClient();

var params = {
    'location': '37.7749,-122.4194',
    'category': 'landmarks'
}

client.authorize(
  '<PROVIDED ACCESS TOKEN URL>',
  '<PROVIDED API URL>',
  '<YOUR API KEY>',
  '<YOUR INSTANCE ID>',

  function() {
    // Get attractions
    client.getAttractions(params, function(error, data){
      console.log(data);
    });

    // Get categories
    client.getCategories(function(error, data){
      console.log(data);
    });

    // Get countries
    client.getCountries(function(error, data){
      console.log(data);
    });

    // Get the name of the first country
    client.getCountries(function(error, data){
      console.log(data.results[0].name);
    });

    // Get concepts
    client.getConcepts(function(error, data){
      console.log(data);
    });

    // Get entities
    client.getEntities(function(error, data){
      console.log(data);
    });

    // Get keywords
    client.getKeywords(function(error, data){
      console.log(data);
    });
  }
);
```

Endpoints are implemented as methods on the `datakits` object. 

Current available endpoints include:

attractions : lists available attractions by location and category.

categories : lists available categories that can be searched against and the number of attractions at each location.

countries : lists general data on all the countries where the attractions can be found.

concepts : lists general information on the concepts associated with attractions at this location.

entities : lists general information on the entities associated with attractions at this location.

keywords : lists general information on the keywords associated with attractions at this location.

---
_Source: https://npm.io/package/watson-data-kits · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
