Skip to content

Commit

Permalink
baremetalboard
Browse files Browse the repository at this point in the history
  • Loading branch information
johnthebrit committed Aug 31, 2022
1 parent c4fd8f6 commit 8f31ab9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
27 changes: 27 additions & 0 deletions DP-900/people.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"firstName": "Bruce",
"lastName": "Wayne",
"codename": "Batman",
"address": {
"city": "Gotham",
"country": "USA"
},
"powers": [
"money"
]
},
{
"firstName": "Clark",
"lastName": "Kent",
"codename": "Superman",
"address": {
"city": "Metropolis",
"country": "USA"
},
"powers": [
"strength", "invulnerability","heat vision"
],
"pets": "Krypto"
}
]
Binary file added Whiteboards/BareMetalandArcOverview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions YouTube/dump-comments.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#I'm using native secret management of PS to get my YouTube API key
#Set-Secret -Name YouTubeAPIKey -Secret "YOURKEY" #to set
$key = Get-Secret -Name YouTubeAPIKey -AsPlainText
$channelId = 'UCpIn7ox7j7bH_OFj7tYouOQ' #replace with yours

$part='id,snippet'

$items = @()
$response = $null

do {
if($null -ne $response.nextPageToken) {
$urltofetch = "https://www.googleapis.com/youtube/v3/comments?part=$($part)&key=$($key)&maxResults=100&channelId=$($channelId)&pageToken=$($response.nextPageToken)"
}
else {
$urltofetch = "https://www.googleapis.com/youtube/v3/comments?part=$($part)&key=$($key)&maxResults=100&channelId=$($channelId)"
}
$response = Invoke-RestMethod -Uri $urltofetch
$items += $response.items
} while($null -ne $response.nextPageToken)

0 comments on commit 8f31ab9

Please sign in to comment.