Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fboucher/azyoutubestats
Serverless functions returning YouTube Statistics
https://github.com/fboucher/azyoutubestats
azure-functions hacktoberfest statistics youtube-api-v3
Last synced: about 1 month ago
JSON representation
Serverless functions returning YouTube Statistics
- Host: GitHub
- URL: https://github.com/fboucher/azyoutubestats
- Owner: FBoucher
- License: mit
- Created: 2020-10-22T12:26:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-05T00:32:04.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T02:36:22.778Z (8 months ago)
- Topics: azure-functions, hacktoberfest, statistics, youtube-api-v3
- Language: C#
- Homepage:
- Size: 30.3 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# azYouTubeStats
Using the Serverless Azure functions it returns YouTube Statistics.
Once deployed, you will need to add `APIKEY` to you configuration. If you are running it locally rename `local.settings.example.json` file `local.settings.json` and update `__YOUR_API_KEY__` with your value.
```json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"APIKEY": "__YOUR_API_KEY__"
}
}
```
## Deployment[Develop Azure Functions by using Visual Studio Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-vs-code?tabs=csharp&?WT.mc_id=azYouTubeStats-github-frbouche)
## Currently implemented:
More to come but for now this is what we have.
---
### GetVideoStatsFromPlaylist
Return the **real** statistics for all individual videos contain in a YouTube PlayList.
GET GetVideoStatsFromPlaylist
Body Intput
```json
{
// [Required]
"playlistId": "xxxxxxxxxxxxxxxxxxx",// [Required]
"code": "azure security token"// [Optional]
"withComment": "true"
}```
Body Output:
``` json
{
"contentType": null,
"serializerSettings": null,
"statusCode": null,
"value": [
{
"videoId": "xxxxxxxxxxx",
"title": "Video Title",
"viewCount": 903,
"likeCount": 26,
"dislikeCount": 4,
"commentCount": 6,
"language": "fr-CA",
"tags": [
"microsoft azure",
"cloud"
],
"comments": [
{
"commentId": "1234567",
"videoId": "xxxxxxxxxxx",
"videoTitle": "Video Title",
"textOriginal": "Thank you",
"authorDisplayName": "Frank Boucher",
"likeCount": 0,
"totalReplyCount": 0,
"publishedAt": "2021-01-10T23:02:59Z",
"updatedAt": "2021-01-10T23:03:13Z",
"isPublic": true
},
{
"commentId": "12345678",
"videoId": "xxxxxxxxxxx",
"videoTitle": "Video Title",
"textOriginal": "Thanks for sharing",
"authorDisplayName": "Frank Boucher",
"likeCount": 2,
"totalReplyCount": 0,
"publishedAt": "2020-11-12T13:14:15Z",
"updatedAt": "2020-11-12T13:14:15Z",
"isPublic": true
}
],
"publishedAt": "2021-03-01T11:41:27Z",
"duration": "PT7M5S"
}
]
}```
### GetVideoCommentsFromPlaylist
Return the all comments of all the videos contain in a YouTube PlayList.
GET GetVideoCommentsFromPlaylist
Body Input:```json
{
// [Required]
"playlistId": "xxxxxxxxxxxxxxxxxxx",// [Required]
"code": "azure security token"
}```
Body Output:
```json
{
"contentType": null,
"serializerSettings": null,
"statusCode": null,
"value": [
{
"commentId": "1234567",
"videoId": "xxxxxxxxxxx",
"videoTitle": "Video Title",
"textOriginal": "Thank you",
"authorDisplayName": "Frank Boucher",
"likeCount": 0,
"totalReplyCount": 0,
"publishedAt": "2021-01-10T23:02:59Z",
"updatedAt": "2021-01-10T23:03:13Z",
"isPublic": true
},
{
"commentId": "12345678",
"videoId": "zzzzzzzz",
"videoTitle": "Another Video Title",
"textOriginal": "Thanks for sharing",
"authorDisplayName": "Frank Boucher",
"likeCount": 2,
"totalReplyCount": 0,
"publishedAt": "2020-11-12T13:14:15Z",
"updatedAt": "2020-11-12T13:14:15Z",
"isPublic": true
}
]
}```