diff --git a/README.md b/README.md index b9434b60..aadb53d1 100644 --- a/README.md +++ b/README.md @@ -10,75 +10,51 @@ [twitter]: https://twitter.com/thesciencephile [discord]: https://discord.gg/syDu7Yks54 -

YouTube.js

+

+ YouTube.js +
+
+

-

A full-featured wrapper around the InnerTube API

+

A full-featured wrapper around the InnerTube API

+ [![Discord](https://img.shields.io/badge/discord-online-brightgreen.svg)][discord] [![CI](https://github.com/LuanRT/YouTube.js/actions/workflows/test.yml/badge.svg)][actions] [![NPM Version](https://img.shields.io/npm/v/youtubei.js?color=%2335C757)][versions] - [![Codefactor](https://www.codefactor.io/repository/github/luanrt/youtube.js/badge)][codefactor] [![Downloads](https://img.shields.io/npm/dt/youtubei.js)][npm] - [![Discord](https://img.shields.io/badge/discord-online-brightgreen.svg)][discord] -
- [![Donate](https://img.shields.io/badge/donate-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#white)][collaborators] - -
+ [![Codefactor](https://www.codefactor.io/repository/github/luanrt/youtube.js/badge)][codefactor] -
-

- Special thanks to: -
-
- - SerpApi -
- - API to get search engine results with ease. - -
-

-
-
+
+ Sponsored by    SerpApi - API to get search engine results with ease. +

-## Table of Contents +InnerTube is an API used by all YouTube clients. It was created to simplify the deployment of new features and experiments across the platform [^1]. This library manages all low-level communication with InnerTube, providing a simple and efficient way to interact with YouTube programmatically. Its design aims to closely emulate an actual client, including the parsing of API responses. + +If you have any questions or need help, feel free to reach out to us on our [Discord server][discord] or open an issue [here](https://github.com/LuanRT/YouTube.js/issues). + +### Table of Contents
    -
  1. - Description -
  2. -
  3. - Getting Started - -
  4. +
  5. Installation
  6. +
  7. Prerequisites
  8. Usage
  9. -
  10. Extending the library
  11. Contributing
  12. Contact
  13. Disclaimer
  14. License
-## Description - -InnerTube is an API used by all YouTube clients. It was created to simplify the deployment of new features and experiments across the platform [^1]. This library manages all low-level communication with InnerTube, providing a simple and efficient way to interact with YouTube programmatically. Its design aims to closely emulate an actual client, including the parsing of API responses. - -If you have any questions or need help, feel free to reach out to us on our [Discord server][discord] or open an issue [here](https://github.com/LuanRT/YouTube.js/issues). - -## Getting Started - ### Prerequisites YouTube.js runs on Node.js, Deno, and modern browsers. @@ -114,7 +90,7 @@ import { Innertube } from 'youtubei.js'; const youtube = await Innertube.create(/* options */); ``` -### Initialization Options +### Options
Click to expand @@ -136,7 +112,7 @@ const youtube = await Innertube.create(/* options */);
-## Browser Usage +### Browser Usage To use YouTube.js in the browser, you must proxy requests through your own server. You can see our simple reference implementation in Deno at [`examples/browser/proxy/deno.ts`](https://github.com/LuanRT/YouTube.js/tree/main/examples/browser/proxy/deno.ts). You may provide your own fetch implementation to be used by YouTube.js, which we will use to modify and send the requests through a proxy. See [`examples/browser/web`](https://github.com/LuanRT/YouTube.js/tree/main/examples/browser/web) for a simple example using [Vite](https://vitejs.dev/). @@ -195,7 +171,7 @@ A fully working example can be found in [`examples/browser/web`](https://github. -## Providing your own fetch implementation +### Providing your own fetch implementation You may provide your own fetch implementation to be used by YouTube.js. This can be useful in some cases to modify the requests before they are sent and transform the responses before they are returned (eg. for proxies). ```ts // provide a fetch implementation @@ -212,7 +188,7 @@ const yt = await Innertube.create({ -## Caching +### Caching Caching the transformed player instance can greatly improve the performance. Our `UniversalCache` implementation uses different caching methods depending on the environment. In Node.js, we use the `node:fs` module, `Deno.writeFile()` in Deno, and `indexedDB` in browsers. @@ -237,7 +213,7 @@ const yt = await Innertube.create({ }); ``` -## API +### API * `Innertube` @@ -697,7 +673,7 @@ Utility to call navigation endpoints. | endpoint | `NavigationEndpoint` | The target endpoint | | args? | `object` | Additional payload arguments | -## Extending the library +### Extending the library YouTube.js is modular and easy to extend. Most of the methods, classes, and utilities used internally are exposed and can be used to implement your own extensions without having to modify the library's source code. @@ -805,6 +781,6 @@ As such, any usage of trademarks to refer to such services is considered nominat ## License Distributed under the [MIT](https://choosealicense.com/licenses/mit/) License. -

+

(back to top) -

+

\ No newline at end of file