![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Simplify your life using this api to search videos, related videos, channel details, comments threads on YouTube.
Results are on Youtube API response format
npm install yt-list@latest
API expects a YOUTUBE_API_KEY variable with the API key
Create .env file in the root of your project with your YouTube API Key
YOUTUBE_API_KEY=your youtube api key
const ytlist = require('yt-list')
Search videos based on a search query.
NextPageToken to retrieve the next page of results Amount of results per page
const searchResults = await ytlist.searchVideos(searchQuery, nextPageToken, amount);
// Response object
{
totalResults: Integer,
query: String,
items: Array[Object], // YouTube API response format below
nextPageToken: String,
}
// YouTube API response format
{
"kind": "youtube#searchResult",
"etag": etag,
"id": {
"kind": string,
"videoId": string,
"channelId": string,
"playlistId": string
},
"snippet": {
"publishedAt": datetime,
"channelId": string,
"title": string,
"description": string,
"thumbnails": {
(key): {
"url": string,
"width": unsigned integer,
"height": unsigned integer
}
},
"videoId": string
}
}
Search Related Videos based on a videoId
NextPageToken to retrieve the next page of results Amount of results per page
const searchRelatedResults = await ytlist.searchRelatedVideos(videoId, nextPageToken, amount);
// Response object
{
totalResults: Integer,
items: Array[String], // Related Video Ids
nextPageToken: String,
}
List channel details by ChannelId
const channel = await ytlist.listChannelDetails(channelId);
// Response object
{
channelId: String,
snippet: {
title: String,
description: String,
thumbnails: { medium: [Object] }
},
statistics: { subscriberCount: String }
}
List comment threads of a videoId
NextPageToken to retrieve the next page of results
const comments = await ytlist.listCommentThreads(videoId, nextPageToken);
// Response object
{
pageInfo: { totalResults: Integer, resultsPerPage: Integer },
items: Array[Object], // YouTube API response format below
videoId: String,
nextPageToken: String,
}
// YouTube API response format
{
"kind": "youtube#commentThread",
"etag": etag,
"id": string,
"snippet": {
"channelId": string,
"videoId": string,
"topLevelComment": comments Resource,
"canReply": boolean,
"totalReplyCount": unsigned integer,
"isPublic": boolean
},
"replies": {
"comments": [
comments Resource
]
}
}
{
"kind": "youtube#comment",
"etag": etag,
"id": string,
"snippet": {
"authorDisplayName": string,
"authorProfileImageUrl": string,
"authorChannelUrl": string,
"authorChannelId": {
"value": string
},
"channelId": string,
"videoId": string,
"textDisplay": string,
"textOriginal": string,
"parentId": string,
"canRate": boolean,
"viewerRating": string,
"likeCount": unsigned integer,
"moderationStatus": string,
"publishedAt": datetime,
"updatedAt": datetime
}
}
List video details by VideoId
const video = await ytlist.listVideoDetails(viodeId);
// Response object
{
"videoId": String,
"snippet": {
"publishedAt": datetime,
"channelId": string,
"title": string,
"description": string,
"thumbnails": {
(key): {
"url": string,
"width": unsigned integer,
"height": unsigned integer
}
},
"channelTitle": string,
"tags": [
string
],
"categoryId": string,
"liveBroadcastContent": string,
"defaultLanguage": string,
"localized": {
"title": string,
"description": string
},
"defaultAudioLanguage": string
},
"contentDetails": {
"duration": string,
"dimension": string,
"definition": string,
"caption": string,
"licensedContent": boolean,
"regionRestriction": {
"allowed": [
string
],
"blocked": [
string
]
},
"statistics": {
"viewCount": unsigned long,
"likeCount": unsigned long,
"dislikeCount": unsigned long,
"favoriteCount": unsigned long,
"commentCount": unsigned long
}
}
Tests are written with mocha
npm test
FAQs
JavaScript Wrapper for YouTube API on list methods
The npm package yt-list receives a total of 5 weekly downloads. As such, yt-list popularity was classified as not popular.
We found that yt-list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.