# youtube-sdk

> Youtube Data API Driver for NodeJS

Latest version **0.2.0** (published 2016-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install youtube-sdk
pnpm add youtube-sdk
yarn add youtube-sdk
bun add youtube-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-08-09 |
| First published | 2016-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+5 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Mohammed Id Bouche |
| Maintainers | idbouche |
| Keywords | sdk, youtube-api, API, v3, Node, nodejs, youtube |

## Links

- npm: https://www.npmjs.com/package/youtube-sdk
- Repository: https://github.com/idbouche/youtube-sdk
- Homepage: https://github.com/idbouche/youtube-sdk#readme
- Issues: https://github.com/idbouche/youtube-sdk/issues
- npm.io page: https://npm.io/package/youtube-sdk

## Dependencies (3)

- [qs](https://npm.io/package/qs.md) 6.2.1
- [env2](https://npm.io/package/env2.md) 2.1.1
- [request](https://npm.io/package/request.md) 2.74.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2016-08-09
- 0.1.0 — 2016-08-08
- 0.0.3 — 2016-08-08
- 0.0.2 — 2016-08-04
- 0.0.1 — 2016-08-03
- 0.0.0 — 2016-08-03

## README

node youtube-sdk
================
Small SDK for youtube API.

[![Build](https://travis-ci.org/idbouche/youtube-sdk.svg?branch=master)](https://travis-ci.org/idbouche/youtube-sdk)
[![Version](https://img.shields.io/npm/v/youtube-sdk.svg)](https://www.npmjs.com/package/youtube-sdk)
[![Downloads](https://img.shields.io/npm/dt/youtube-sdk.svg)](https://www.npmjs.com/package/youtube-sdk)
[![License](https://img.shields.io/npm/l/express.svg)](https://www.npmjs.com/package/youtube-sdk)


# Installation
    npm install youtube-sdk

# Example
```js
// Setup

var Youtube = require('youtube-sdk');

var YT = new Youtube();
YT.use('Your key API')


var params = {
  part       : 'snippet',
  location   : '48.858319942162794,2.2944259643554683',
  locationRadius: '4000m',
  maxResults    : '50',
  order: 'date',
  type: 'video',
  publishedBefore: '2016-08-03T00:00:00Z', //Date Google
  publishedAfter: '2016-08-02T00:00:00Z'
};

// Request server API method

YT.get('search', params, function (err, data) {
  if (err){
    console.log(err);
  }else{
    console.log(data);
  }

});
```

# Setup
```js
var youtube = require('youtube-sdk');

var YT = new youtube();

YT.use('YOUR API KEY')
```

Required config options:
* YOUR API KEY — Key api code (check your application settings on https://console.developers.google.com)
* resource - Look here https://developers.google.com/apis-explorer/#p/youtube/v3/
* params -  Object look here https://developers.google.com/apis-explorer/#p/youtube/v3/
* callback - Function callback return errors (errors youtube api) data in JSON


# API requests
For youtube API requests you have to use method *get(_resource, _params, _callback)*.

* **[string] _resource** - name of youtube API resource,    
  - **'activities'**
  - **'channels'**
  - **'channelBanners'**
  - **'guideCategories'**
  - **'playlistItems'**
  - **'playlists'**
  - **'search'**
  - **'subscriptions'**
  - **'thumbnails'**
  - **'videoCategories'**
  - **'videos'**
* **[mixed] _params** - object with values of parts for api method. This param is required.
  - **'snippet'**
  - **'contentDetails'**
  - **'status'**
  - **'statistics'**
  - **'player'**
  - **'topicDetails'**
  - **'recordingDetails'**
  - **'fileDetails'**
  - **'processingDetails'**
  - **'suggestions'**
  - **'...'**
* **[mixed] _callback** - required, function callback.


# For developers
Your commits and pull requests are welcome. Please run the tests before

    npm test

You have to provide tests for the new features.

# Support
* [Mohammed Id Bouche](idbouche2@gmail.com)


# Thanks to
* [Nunki.co](http://nunki.co)
* [MarquesDev](https://github.com/MarquesDev)
* [Sami-Radi](https://github.com/Sami-Radi)

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