# you-link

> Simple library which helps work with different search API such [YouType Data Api](https://developers.google.com/youtube/v3/docs/)

Latest version **1.0.11** (published 2018-03-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install you-link
pnpm add you-link
yarn add you-link
bun add you-link
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2018-03-21 |
| First published | 2018-03-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexey Kalenkevich |
| Maintainers | alexey.kalenkevich |

## Links

- npm: https://www.npmjs.com/package/you-link
- Repository: https://github.com/kalenkevich/you-link-lib
- Homepage: https://github.com/kalenkevich/you-link-lib#readme
- Issues: https://github.com/kalenkevich/you-link-lib/issues
- npm.io page: https://npm.io/package/you-link

## Dependencies (1)

- [get-youtube-id](https://npm.io/package/get-youtube-id.md) ^1.0.0

## Recent versions

- 1.0.11 (latest) — 2018-03-21
- 1.0.10 — 2018-03-21
- 1.0.9 — 2018-03-21
- 1.0.8 — 2018-03-21
- 1.0.7 — 2018-03-21
- 1.0.6 — 2018-03-21
- 1.0.5 — 2018-03-21
- 1.0.4 — 2018-03-21
- 1.0.3 — 2018-03-21
- 1.0.2 — 2018-03-21
- 1.0.0 — 2018-03-21

## README

# YouLink Lib

Simple library which helps work with different search API such [YouType Data Api](https://developers.google.com/youtube/v3/docs/)

# Demo

Simple [application](https://you-link-app.herokuapp.com/) on Angular 5 

# Supported API

* [YouType Data Api](https://developers.google.com/youtube/v3/docs/)
* [Bing Web Search API](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-web-api-v7-reference)

# Can't Support

* [~~Twitter~~](https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets) 
as [Application-only authentication](https://developer.twitter.com/en/docs/basics/authentication/overview/application-only) available only server

# Usage

```javascript
    import YouLink, {YoutubeProviderId, BingProviderId} from 'you-link';

    YouLink.init([{
      contentProvider: YoutubeProviderId,
      apiKey: 'some-api-key'
    }, {
      contentProvider: BingProviderId,
      apiKey: 'some-api-key'
    }]);
```

# Create new provider

1. Extends from *BaseContentProvider*
2. Implement this methods 
```javascript
    get providerId()

    get supportSearch()

    get supportLinkParsing()

    adaptContent()

    sendSearchRequest()

    sendGetContentByIdRequest()

    parseContentId()
```
3. Register this provider on *init* method in *YouLink*
```javascript
    case YourProvider:
        this.providers.push(new YourProvider(options));
    break;
   
```
4. **Write unit test!!!**

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