5 YouTube operational API commits
Benjamin_Loison edited this page 2023-02-23 22:45:44 +01:00

This is a list of the YouTube operational API commits that were done specifically for this project.

Commit Date Insertions Deletions Title
483c3a3804410c4021c456b47e007e6d35dac58d 12/23/22 56 0 Add forgotten community.php
2b574ab1ba85513067a9bbc537edc606179dfe1e 12/28/22 60 44 #1: Add ability to retrieve comments loved by the video creator, solving https://stackoverflow.com/q/71186488
c49c15398dfe138f4b61905f5eed2cf66fef45d1 12/28/22 29 27 Fix #1: Cleaning the commentThreads endpoint
8d154f9c17e99332ce817ef8722b0343554524b6 12/29/22 3 1 Fix #110: last page of results of channels?part=communtiy may produce an error in PHP 8
0fc0dc411ed348deb2f887d56d54d067ae3e7d57 01/07/23 105 2 Fix #113: Add the ability to retrieve Saved playlists of a YouTube channel PLAYLISTS tab
bf7dc8ee0c2ae44b06f12cc95381da39c21b9139 01/14/23 87 56 #113: Add multiple playlist sections, playlist authors, playlist custom thumbnail support
d8cdc4b93ddcaafe36023f1eecdf9cbdf5998fef 01/15/23 34 9 Add pagination to channels?part=channels
f6e92b6e27509982991bb0e4103e6d9268741388 01/15/23 5 4 Make channels?part=channels pagination more resilient by not relying on expected number of items in case of pagination
a0de0ad3d21665645037186ca1d5a65567cf19e4 01/15/23 4 3 Retrieve correctly the title of playlists section in every case
02c2f0f61f02d3de9e6af78ace4a62d3f2e02b19 01/16/23 49 32 Fix #121: channels?part=channels doesn't work in all cases
1b1692a7362501a9ee0cb0abaa466f5753e54973 01/17/23 2 2 Move Community: list endpoint from YouTube Data API v3 endpoints section in index.php to own endpoints
df115b6d1b06dd6f583f4523af75564ae2652262 01/17/23 5 1 #122: Make CommentThreads.php order=time work
3066c46d05e9bf30f9ebcb4dfe5c00e59ab34ec2 01/21/23 5 0 Make not return any item if there isn't a tab
e1a9d221ab866f0f6d20e7cf7a40fad61525b5ea 01/21/23 7 5 Fix #122: CommentThreads.php order=time doesn't work and authorDisplayName is incorrect
7440f279a0a0f111103f165a67478995d09458cd 01/21/23 12 3 Format output of liveChats?part=snippet
f7ed4a970e43d3c8fd90af192cabd735fbef2bf6 01/21/23 53 19 #51: Add ability to retrieve channel community post comments
d8de7927b26fe1b40c43981b030349dd54b8f133 01/22/23 19 10 Make channels?part=playlists work fine with YouTube Originals playlists
b62d0d2187eef1ef0b7d8ba637ce504420064aba 01/22/23 4 2 Add videoOffsetTimeMsec field to liveChats?part=snippet
c94e51d95bc5cf7a16c5c497ec285b8fcdb38da2 01/22/23 5 1 Add support for negative timestamp in liveParts?part=snippet
6cd2c46f4cfca09941faeb100eccbd14d5105c92 02/19/23 4 0 #135: Add a temporary fix to channels?part=playlists due to unsupported shows
628786590b4c72e7fe9d211ddc2100e864723c60 02/21/23 27 36 Fix #48: Rely on tab name thanks to tabRenderer/title instead of a path existence
55063814e901cd1c163f5936b42514a7f7c1b9db 02/23/23 13 1 #135: Add support to shows in if the show isn't alone in a row
adcf61b36adb4f2cec481c38c91887a779a582cc 02/23/23 16 5 Make channels?part=playlists&id=UCanUnexistingChannelAAA returns no item instead of faulting in fatal error
23 commits From 12/23/22 to 02/23/23 604 263
Used following algorithm to generate this table:
import os, subprocess, datetime, re

path = '/var/www/html/YouTube-operational-API/'

os.chdir(path)

def execute(command):
    return subprocess.check_output(command, shell = True).decode('utf-8')

with open('/home/benjamin/Desktop/bens_folder/school/m2/web-data-management/project/operational_commits_required.txt') as f:
    lines = f.read().splitlines()

totalInsertions, totalDeletions = 0, 0
firstDate, lastDate = None, None
firstCommit, lastCommit = None, None

with open('table.md', 'w') as f:
    f.write(f'| Commit | Date | Insertions | Deletions | Title\n')
    f.write(f'|--------|------|------------|-----------|------\n')
    for linesIndex, line in enumerate(lines):
        print(line)
        if linesIndex == 0:
            firstCommit = line
        elif linesIndex == len(lines) - 1:
            lastCommit = line
        commitLines = execute(f'git show --shortstat {line}').splitlines()
        dateLine = commitLines[2]
        #print(dateLine)
        date = datetime.datetime.strptime(dateLine, 'Date:   %a %b %d %H:%M:%S %Y +0100').strftime('%m/%d/%y')
        print(date)
        if linesIndex == 0:
            firstDate = date
        elif linesIndex == len(lines) - 1:
            lastDate = date
        #print(commitLines)
        title = commitLines[4][4:]
        print(title)
        for issue in re.findall( r'#([0-9]+?):', title):
            title = title.replace(f'#{issue}', f'[#{issue}](https://github.com/Benjamin-Loison/YouTube-operational-API/issues/{issue})')
        fileChanges = commitLines[-1]
        #print(fileChanges)
        insertions, deletions = 0, 0
        if 'insertion' in fileChanges:
            insertions = int(fileChanges.split(' insertion')[0].split()[-1])
        if 'deletion' in fileChanges:
            deletions = int(fileChanges.split(' deletion')[0].split()[-1])
        print(insertions, deletions)
        totalInsertions += insertions
        totalDeletions += deletions
        f.write(f'| [`{line}`](https://github.com/Benjamin-Loison/YouTube-operational-API/commit/{line}) | {date} | {insertions} | {deletions} | {title}\n')
    f.write(f'| [{len(lines)} commits](https://github.com/Benjamin-Loison/YouTube-operational-API/compare/{firstCommit}..{lastCommit}) | From {firstDate} to {lastDate} | {totalInsertions} | {totalDeletions} | ')