Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

Commit

Permalink
Add Twitch v5 deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
awsr committed Jul 16, 2021
1 parent f7872ca commit ff60ebc
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Module/StreamXRef.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

CompanyName = 'Alex Wiser'

ModuleVersion = '3.4.0'
ModuleVersion = '3.4.1'

GUID = '8c89ef10-5110-4406-a876-82b8eadf5bb2'

Expand Down Expand Up @@ -41,6 +41,11 @@
IconUri = 'https://raw.githubusercontent.com/awsr/PS-StreamXRef/master/sxr.png'

ReleaseNotes = @'
## 3.4.1
* Added deprecation warning due to Twitch shutting down the v5 API in February, 2022.
* Added error message if module is run after this date
## 3.4.0
* Future-proofing by assuming Twitch will use 64-bit integers after running out of 32-bit integers for video ids.
Expand Down
8 changes: 8 additions & 0 deletions Module/StreamXRef.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Set-StrictMode -Version 3

# Deprecation error/warning due to Twitch shutting down v5 API at the end of February, 2022
if ([datetime]::UtcNow -ge [datetime]::new(2022, 3, 1)) {
Write-Error "Twitch v5 API has been shut down. Upgrade module, if available, or uninstall."
}
else {
Write-Warning "Twitch v5 API will be shut down by the end of February, 2022."
}

# Add type data
Add-Type -Path "$PSScriptRoot/typedata/StreamXRefTypes.dll"

Expand Down
7 changes: 6 additions & 1 deletion src/StreamXRef.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

CompanyName = 'Alex Wiser'

ModuleVersion = '3.4.0'
ModuleVersion = '3.4.1'

GUID = '8c89ef10-5110-4406-a876-82b8eadf5bb2'

Expand Down Expand Up @@ -41,6 +41,11 @@
IconUri = 'https://raw.githubusercontent.com/awsr/PS-StreamXRef/master/sxr.png'

ReleaseNotes = @'
## 3.4.1
* Added deprecation warning due to Twitch shutting down the v5 API in February, 2022.
* Added error message if module is run after this date
## 3.4.0
* Future-proofing by assuming Twitch will use 64-bit integers after running out of 32-bit integers for video ids.
Expand Down
8 changes: 8 additions & 0 deletions src/StreamXRef.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Set-StrictMode -Version 3

# Deprecation error/warning due to Twitch shutting down v5 API at the end of February, 2022
if ([datetime]::UtcNow -ge [datetime]::new(2022, 3, 1)) {
Write-Error "Twitch v5 API has been shut down. Upgrade module, if available, or uninstall."
}
else {
Write-Warning "Twitch v5 API will be shut down by the end of February, 2022."
}

# Add type data
Add-Type -Path "$PSScriptRoot/typedata/StreamXRefTypes.dll"

Expand Down

0 comments on commit ff60ebc

Please sign in to comment.