I’ve been following the introduction of Valve’s new Steam Deck to the gaming world with great interest. The portable gaming PC has garnered much attention and praise in the markets that it is currently available in. The Deck seems to be able to do it all, and to put it bluntly, I want one!
Therein lies my problem. When accessing the Steam Deck reservation page in Australia, we’re greeted with a message, loud and clear:
“This item is not available for reservation in your country”
To ensure I find out when it does in fact become available in Australia I went ahead with a mini project to update me via email whether it can be reserved in Australia. To help facilitate this, I am piggy-backing off of an API call the Steam Deck page is making in order to inform of the reservation status.
To verify this DOES work, using a VPN I changed my location the the States, and I could reserve it. Though you can do this by posting to friends or mail forwarding services, I am trying to remain patient 😇.
Azure Functions to the rescue
I went about this by utilsing Azure Functions written with dotnet core which do the following.
This is an HTTP Trigger function which returns a boolean value of whether the Steam Deck can be reserved or not. The value of this is provided to the request body to UploadEmailMessageToQueue.
This HTTP Trigger function gets the result of the GetSteamDeckStatu and modifies an email message to explain whether it can be reserved or not. This message is then uploaded to an Azure Storage Account Queue Storage.
This function is called based on messages in it’s connected Azure Storage Queue. When a new email message is added to the queue, this function will be called which then uses SendGrid to send the email
This function is on a timer basis to coordinate the calling of GetSteamDeckStatus and then passing that return value to the UploadEmailMessageToQueue function so that the emails can be sent.
The result of these functions
Emails in my inbox letting me know if the Steam Deck can be reserved in Australia.
The component at the top of this post is also utilsing the GetSteamDeckStatus function to update the status so this post ‘should’ display green when it is available in Australia.