1.3.8 • Published 4 years ago
jasonkaraniks-simple-youtube-api v1.3.8
Jasonkaraniks Simple Youtube API
Jasonkaraniks Simple Youtube API is a powerful Node.js module that allows you to interact with the youtube API easily!
ALL VERSIONS BEFORE 1.3.5 WERE DELETED.
Installation
npm install --save jasonkaraniks-simple-youtube-api
Functions
// The Youtube API Keys Have A Limit! If Reached It Will Give An Error! \\
const JasonkaraniksSimpleYoutubeApi = require("jasonkaraniks-simple-youtube-api")
JasonkaraniksSimpleYoutubeApi.search("TYPE (video, channel, playlist)", "VIDEO/CHANNEL/PLAYLIST TITLE", "YOUTUBE API KEY", CALLBACK_FUNCTION) // Search For Something (In JSON Form).
JasonkaraniksSimpleYoutubeApi.getPlaylist("PLAYLIST ID", "YOUTUBE API KEY", CALLBACK_FUNCTION) // Get Info About A Specific Playlist (In JSON Form).
JasonkaraniksSimpleYoutubeApi.getVideo("VIDEO ID", "YOUTUBE API KEY", CALLBACK_FUNCTION) // Get Info About A Specific Video (In JSON Form).
JasonkaraniksSimpleYoutubeApi.getChannel("CHANNEL ID", "YOUTUBE API KEY", CALLBACK_FUNCTION) // Get Video About A Specific Channel (In JSON Form).
JasonkaraniksSimpleYoutubeApi.getPlaylistItems("PLAYLIST ID", "YOUTUBE API KEY", CALLBACK_FUNCTION) // Get Items From A Playlist (In JSON Form).
JasonkaraniksSimpleYoutubeApi.getSubscriptions("CHANNEL ID", "YOUTUBE API KEY", CALLBACK_FUNCTION) // Get A Channel's Subscriptions (In JSON Form).
JasonkaraniksSimpleYoutubeApi.downloadVideo("VIDEO ID", "YOUTUBE API KEY", CALLBACK_FUNCTION) // Currently Does Nothing (In JSON Form).
Example #1 (Search For Videos And Get Them)
// The Youtube API Keys Have A Limit! If Reached It Will Give An Error! \\
const JasonkaraniksSimpleYoutubeApi = require("jasonkaraniks-simple-youtube-api")
JasonkaraniksSimpleYoutubeApi.search("video", "Minecraft", "YOUTUBE API KEY", function(searchedvideo){
for(var video in searchedvideo.items){
JasonkaraniksSimpleYoutubeApi.getVideo(searchedvideo.items[video].id.videoId, "YOUTUBE API KEY", function(foundvideo){
console.log("Video " + video + "'s Title: " + foundvideo.snippet.title)
console.log("Video " + video + "'s Description: " + foundvideo.snippet.description)
console.log("Video " + video + "'s Channel Title: ",foundvideo.snippet.channelTitle)
console.log("Video " + video + "'s Thumbnails: Default: ",foundvideo.snippet.thumbnails.default.url)
console.log("Video " + video + "'s Thumbnails: Medium: ",foundvideo.snippet.thumbnails.medium.url)
console.log("Video " + video + "'s Thumbnails: High: ",foundvideo.snippet.thumbnails.high.url)
})
}
})
1.3.8
4 years ago
1.3.7
4 years ago
1.3.6
4 years ago
1.3.5
4 years ago
1.3.3
4 years ago
1.3.2
4 years ago
1.3.1
4 years ago
1.2.0
4 years ago
1.2.8
4 years ago
1.2.7
4 years ago
1.2.6
4 years ago
1.2.5
4 years ago
1.2.4
4 years ago
1.2.3
4 years ago
1.2.2
4 years ago
1.3.0
4 years ago
1.2.1
4 years ago
1.2.9
4 years ago
1.1.9
4 years ago
1.1.8
4 years ago
1.1.7
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.1.6
4 years ago
1.0.7
4 years ago
1.1.5
4 years ago
1.0.6
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.0.5
4 years ago
1.0.2
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago