-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(uploader): Optionally link match videos on The Blue Alliance (#57)
Co-authored-by: Evan Strat <[email protected]>
- Loading branch information
Showing
22 changed files
with
330 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
{"googleClientSecret": "", "googleAccessToken": "", "googleRefreshToken": "","theBlueAllianceReadApiKey": ""} | ||
{ | ||
"googleClientSecret": "", | ||
"googleAccessToken": "", | ||
"googleRefreshToken": "", | ||
"googleTokenExpiry": "", | ||
"theBlueAllianceReadApiKey": "", | ||
"theBlueAllianceTrustedApiAuthId": "", | ||
"theBlueAllianceTrustedApiAuthSecret": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
{"eventName":"Demo Event","eventTbaCode":"","videoSearchDirectory":"./videos","googleClientId":"","googleAuthStatus":"Not started", "sandboxModeEnabled": true, "playoffsType":"Double elimination playoff", "youTubeVideoPrivacy": "private"} | ||
{ | ||
"eventName": "Demo Event", | ||
"eventTbaCode": "", | ||
"videoSearchDirectory": "./videos", | ||
"googleClientId": "", | ||
"googleAuthStatus": "Not started", | ||
"sandboxModeEnabled": true, | ||
"playoffsType": "Double elimination playoff", | ||
"youTubeVideoPrivacy": "private", | ||
"linkVideosOnTheBlueAlliance": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { TheBlueAllianceTrustedRepo } from "@src/repos/TheBlueAllianceTrustedRepo"; | ||
|
||
describe("TBA request signature", () => { | ||
it("should be correct for a sample request", () => { | ||
// This tests the signature for the sample request listed on https://www.thebluealliance.com/apidocs/trusted/v1 | ||
// These API credentials are NOT real. | ||
|
||
const fakeAuthId = "rosssssssssss"; | ||
const fakeAuthSecret = | ||
"ExqeZK3Gbo9v95YnqmsiADzESo9HNgyhIOYSMyRpqJqYv13EazNRaDIPPJuOXrQp"; // This is NOT a real secret! | ||
const tbaTrustedRepo = new TheBlueAllianceTrustedRepo(fakeAuthId, fakeAuthSecret); | ||
|
||
const path = "/api/trusted/v1/event/2014casj/matches/delete"; | ||
const body = JSON.stringify(["qm1"]); | ||
|
||
expect(tbaTrustedRepo.generateRequestSignature(path, body)).toBe("ca5c3e5c1b0e7132e4af13f805eca0be"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export interface YouTubePostUploadSteps { | ||
// Indicates if the video was successfully added to the YouTube playlist corresponding to the video's label | ||
addToYouTubePlaylist: boolean, | ||
// Indicates if the video was successfully associated with the match to the Blue Alliance | ||
linkOnTheBlueAlliance: boolean, | ||
} |
Oops, something went wrong.