Closed KendallDoesCoding closed 1 year ago
Hi @KendallDoesCoding , this is a paid API and we need to search any different api service which fits our requirement.
Hi @KendallDoesCoding , this is a paid API and we need to search any different api service which fits our requirement.
Can you help find a API?
Yes @KendallDoesCoding , I found Youtube data API, it requires an api key (which is free, I have created one, you can too!) json received contains details like viewCount, Total video count and subscribers count as well Can we connect somewhere (maybe discord) to discuss the approach ?
Attachment -
Yes @KendallDoesCoding , I found Youtube data API, it requires an api key (which is free, I have created one, you can too!) json received contains details like viewCount, Total video count and subscribers count as well Can we connect somewhere (maybe discord) to discuss the approach ?
Attachment -
Sure. What's your discord.
Can you work on this Issue?
sure, my dc is bhaskar#6847 I can work on it, first will work on that sort feature :p
CHATGPT says we can solve this issue by:
How can I use a API to get the total current views of a YouTube channel on my website?
To get the total current views of a YouTube channel on your website using API, you can follow these steps:
// Replace YOUR_API_KEY with your actual API key
const apiKey = 'YOUR_API_KEY';
const channelId = 'UC_x5XG1OV2P6uZZ5FSM9Ttw'; // Replace with the channel ID you want to get the view count for
// Make a request to the YouTube Data API to get the channel statistics
fetch(`https://www.googleapis.com/youtube/v3/channels?part=statistics&id=${channelId}&key=${apiKey}`)
.then(response => response.json())
.then(data => {
// Parse the response to extract the total view count of the channel
const viewCount = data.items[0].statistics.viewCount;
// Display the total view count on your website
document.getElementById('view-count').textContent = viewCount;
})
.catch(error => console.error(error));
In this example, we're using the fetch function to make a GET request to the YouTube Data API's channels endpoint with the part parameter set to statistics and the id parameter set to the channel ID we want to get the view count for. We're also passing in our API key as a query parameter.
Once we get the response from the API, we parse it to extract the total view count of the channel from the statistics object in the response. Finally, we display the view count on our website by setting the text content of an HTML element with the ID view-count
sure, my dc is bhaskar#6847 I can work on it, first will work on that sort feature :p
I sent a friend req on discord.
Hey @KendallDoesCoding, is this issue still open?
Hey @KendallDoesCoding, is this issue still open?
Yes. Do you want to be assigned?
Sure. Can we connect on Discord to discuss the issue and approach to solve it? If yes, here is my username: Mayank12#1117
@MayankBansal12 - i sent you a friend req... @iONBain i thought you were interested in working on this after #7 as well, but you haven't yet finished #7.
Hi @KendallDoesCoding , Is anyone working on this issue?
Hey, @vansh2552. I am working on this issue as of now. Please feel free to look out for some other issues.
@KendallDoesCoding Is there any issue revolving around github actions since I see you have a actions workflow. Or any functionality that you wish to add using actions?
@KendallDoesCoding Is there any issue revolving around github actions since I see you have a actions workflow. Or any functionality that you wish to add using actions?
Not really, but if you have any ideas, you can go ahead and create a github issue in the repo, and if I approve the issue you can get to work.
Using the socialblade API, list "Total Views" as the most recent available (last month, last week, etc). https://socialblade.com/business-api