open-index/open-npm huggingface dataset:
npm package: @jamesbacon/youtubeapi
Description: A Module to easly use the YouTube API.
Author: James Bacon
Latest version: 2.1.0

# YouTubeAPI
> https://www.npmjs.com/package/@jamesbacon/youtubeapi

## How to.

You first need to get your credentials.
1. Follow Step One of this guide to get them: [developers.google.com](https://developers.google.com/youtube/v3/quickstart/nodejs)
2. Once you have them create a new folder in your root project folder named ".credentials".
3. Place the new file you got from Step One into the new folder.
4. Now follow step 3 (The Google Developers Step 3 not this one) to get your token.
5. Once you have done that navigate to your user folder e.g. "C:\Users\james" and open ".credentials".
6. Copy the .json file that's there (If there's more than two copy the one that says google-apis-nodejs-quickstart) over to your own ".credentials" folder.
7. Rename it to token.json and you're all set.

Below is a simple template of what it looks like.

```javascript
const youtube = require('@jamesbacon/youtubeapi');

var credentials = require('./.credentials/client_secret.json').installed;
var token = require('./.credentials/token.json');

const oauth = youtube.authorize(credentials, token);

youtube.commentThread.list({
    auth: oauth,
    part: 'snippet, replies',
    videoId: 'KIIm9PszZDM',
    maxResults: '1'
}).then(thread => {
    console.log(thread);
}).catch(error => console.log(error));
```

This is my first ever public project so be easy on me, hahahaha.
npm package: @jamesbeard/knex
Description: A batteries-included SQL query & schema builder for Postgres, MySQL and SQLite3 and the Browser
Author: Tim Griesser
Latest version: 0.13.1

# [knex.js](http://knexjs.org)

[![npm version](http://img.shields.io/npm/v/knex.svg)](https://npmjs.org/package/knex)
[![Build Status](https://travis-ci.org/tgriesser/knex.svg?branch=master)](https://travis-ci.org/tgriesser/knex)
[![Coverage Status](https://coveralls.io/repos/tgriesser/knex/badge.svg?branch=master)](https://coveralls.io/r/tgriesser/knex?branch=master)
[![Dependencies Status](https://david-dm.org/tgriesser/knex.svg)](https://david-dm.org/tgriesser/knex)
[![Gitter chat](https://badges.gitter.im/tgriesser/knex.svg)](https://gitter.im/tgriesser/knex)

> **A SQL query builder that is _flexible_, _portable_, and _fun_ to use!**

A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle(including Oracle Wallet Authentication), WebSQL) query builder for
Node.js and the Browser, featuring:

- [transactions](http://knexjs.org/#Transactions)
- [connection pooling](http://knexjs.org/#Installation-pooling)
- [streaming queries](http://knexjs.org/#Interfaces-Streams)
- both a [promise](http://knexjs.org/#Interfaces-Promises) and [callback](http://knexjs.org/#Interfaces-Callbacks) API
- a [thorough test suite](https://travis-ci.org/tgriesser/knex)
- the ability to [run in the Browser](http://knexjs.org/#Installation-browser)

[Read the full documentation to get started!](http://knexjs.org)

For support and questions, join the `#bookshelf` channel on freenode IRC

For an Object Relational Mapper, see: http://bookshelfjs.org

To see the SQL that Knex will generate for a given query, see: [Knex Query Lab](http://michaelavila.com/knex-querylab/)

## Examples

We have several examples [on the website](http://knexjs.org). Here is the first one to get you started:

```js
var knex = require('knex')({
  dialect: 'sqlite3',
  connection: {
    filename: './data.db'
  }
});

// Create a table
knex.schema.createTable('users', function(table) {
  table.increments('id');
  table.string('user_name');
})

// ...and another
.createTable('accounts', function(table) {
  table.increments('id');
  table.string('account_name');
  table.integer('user_id').unsigned().references('users.id');
})

// Then query the table...
.then(function() {
  return knex.insert({user_name: 'Tim'}).into('users');
})

// ...and using the insert id, insert into the other table.
.then(function(rows) {
  return knex.table('accounts').insert({account_name: 'knex', user_id: rows[0]});
})

// Query both of the rows.
.then(function() {
  return knex('users')
    .join('accounts', 'users.id', 'accounts.user_id')
    .select('users.user_name as user', 'accounts.account_name as account');
})

// .map over the results
.map(function(row) {
  console.log(row);
})

// Finally, add a .catch handler for the promise chain
.catch(function(e) {
  console.error(e);
});
```