NBeing / VSAV_MatchDB

0 stars 1 forks source link

Youtube API #5

Open NBeing opened 2 years ago

NBeing commented 2 years ago

I need to get that API token setup!

Once set up:

Controller pseudocode

youtube parsing (url) {
    edit out timestamp+query params in url
    normalise url
    save url
    get title uploader and date uploaded from youtube api
    save data
}

if type is invalid, return error

if type is video{
    if the url is youtube {
        if timestamp in payload {
            save timestamp
            youtube parsing (url)
        }

        else if url contains timestamp query param  {
            parse timestamp from url query param
            save timestamp
            youtube parsing (url)
        }

        else  {
            youtube parsing (url)
        }
    }
    save url
}

if type is fightcade {
    save url
}