@ix-xs/youtube.api
v1.0.1
Published
Youtube API JS
Downloads
3
Readme
npm install @ix-xs/youtube.api
const YoutubeAPI = require("@ix-xs/youtube.api");
const client = new YoutubeAPI({ apiKey:"votre_clé_api" });
Méthode | options | Description |
| --- | --- | --- |
| getChannelByUsername()
| username
:string; | Récupère les informations d'une chaîne utilisateur. |
| getChannelById()
| id
:string; | Récupère les informations d'une chaîne utilisateur. |
| getLastVideoByUsername()
| username
:string; | Récupère les informations sur la dernière video de l'utilisateur. |
| getLlastVideoByChannelId()
| id
:string; | Récupère les informations sur la dernière video de l'utilisateur. |
const YoutubeAPI = require("@ix-xs/youtube.api");
const client = new YoutubeAPI({ apiKey:"votre_clé_api" });
client.getChannelByUsername("GoogleDevelopers").then(console.log); // Renvoi les informations de la chaine utilisateur.
client.getChannelById("UC_x5XG1OV2P6uZZ5FSM9Ttw").then(console.log); // Renvoi les informations de la chaine utilisateur.
client.getLastVideoByUsername("GoogleDevelopers").then(console.log); // Renvoi les informations sur la dernière video de l'utilisateur.
client.getLastVideoByChannelId("UC_x5XG1OV2P6uZZ5FSM9Ttw").then(console.log); // Renvoi les informations sur la dernière video de l'utilisateur.