.NET Azure Function to get YouTube Stats for all videos on a channel
- Create a file in the solution called "local.settings.json"
- Fill it in with the following:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"YOUTUBE_API_KEY": "",
"YOUTUBE_APP_NAME": ""
}
}
- Create a YouTube API Key via Data v3 in Google API Console https://developers.google.com/youtube/v3/getting-started
- Fill in your YOUTUBE_APP_NAME & YOUTUBE_API_KEY
- Run the function and the API will be available at
http://localhost:7071/api/GetChannelVideoStats/{ids}
- Call the API where the {id} is your actual youtube channel id or multiple Ids.
License under MIT