Sync Dota 2 Esports Matches to GCal

DOTA2 The International
Photo by Stackie Jia / Unsplash

I rely heavily on Google Calendar to manage my rather chaotic schedule in life.

Probably like you, I want to know what and when is the next Dota 2 tournament happening, especially for Major Championships and The International.

I want to know exactly when the next Esports match or game is going to be played.

With this in mind, I was looking for a reliable way to sync upcoming and ongoing Dota 2 Esports matches to my Google Calendar. Alas, I couldn't find any.

Out of frustration, I built an app that syncs upcoming featured Dota 2 matches from Liquipedia.net to Google Calendar — D2GCal.

“So, how do I install this app?”. That’s the neat part — you don’t.

All you need to do is to import the calendar that I’ve created to your calendar and that’s it!

If you’re just here for the calendar, head over to jerrynsh.gumroad.com/l/d2gcal. Otherwise, feel free to stay on to listen to my short rambling blog post.

Before we start, here's a little peek at the result –

An example of upcoming Dota 2 Esports matches as GCal events
An example of upcoming Dota 2 Esports matches as GCal events

Ideation

The problem that I want to solve is straightforward – to answer the question "what and when is the next Dota 2 tournament match?".

So then I thought, wouldn't it be great if we could have a Google Calendar event for each of the upcoming matches of a featured tournament?

Technically, it should be a 1-way sync from the data source to my Google Calendar.

As a bonus, we can include some match-related details in the calendar’s event description:

  • Name of the league/event
  • The two competing teams in a single match
  • A link to the live stream

Ideally, only featured (usually Tier 1, and Tier 2) event matches are created on the calendar.

Why Google Calendar

This was easy for me to justify. I use Google Calendar a lot, both in my daily life and in my job.

Moreover, tracking upcoming Esports matches using Google Calendar would mean that users won’t have to install yet another app on their phones. This is probably the biggest win for me.

To top that off, Google Calendar has a built-in notification system that users can rely on. Users can manage their notification settings there.

Essentially by using Google Calendar, I’m offloading a lot of heavy lifting to Google.

From the users’ perspective, they can simply rely on their (probably already installed) Google Calendar app on their mobile phones or browsers. A win-win.

What about Apple Calendar


You can add Google Calendar events to your Apple calendar on your Mac, iPhone, or iPad by following this guide.

Data Source

To start, I spent my weekend looking for reliable data sources for upcoming Dota 2 esports matches. From this, I found a couple of sites:

Unfortunately, there was no official API for all these data sources.

Looking at the 4 options at hand, I decided to go with Liquipedia because of its simplicity in terms of UI and HTML structure.  Without an API, fetching data from a site with a simple HTML layout makes things a lot easier. Especially, if the data is server-rendered.

However, there’s a catch. Without using an API, I’ll need to make sure that my app stays up-to-date with the website layout change.

This could be potentially disastrous (breaking change) but there’s not much of a choice. To cope with this, I have notifications and alerts set to notify me immediately in case the app fails to retrieve any upcoming matches.

Google Calendar API

To create the calendar events programmatically means that I’d need to interact with Google Calendar API. Thankfully, Google Calendar API is pretty easy to use. Their documentation is very commendable.

Spoiled for choice, Google API SDK/library is available in many different programming languages such as JavaScript, Go, Python, etc.

Cron Job

To automate the entire process, I’ll run this app periodically, e.g. every 3 hours on a server.

The app will fetch the latest upcoming (and ongoing) matches from Liquipedia and then perform a 1-way sync to the Google Calendar that I’ve created.

Monetization

The monetization model is simple — you pay only once to get the link to the calendar.

"Wait, why should I pay for it?"

Great question. Sure, this information is available for free on the internet.

Heck, you could even create your own Dota 2 matches events on Google Calendar and share them with everyone.

Here’s the thing — create vs buy is always about making tradeoffs. It’s really up to you to decide if buying is worth the money, or if creating is worth the hassle.

Behind this there is me. I'm maintaining and paying servers to keep this running reliably.

Gumroad

Today, Gumroad seems to be the default go-to for selling digital products.

Gumroad is incredibly simple to set up. You wouldn’t need to integrate with payment providers, or analytics, or even build your landing page to make things even easier.

So, what’s the catch? Well, Gumroad takes a cut out of your revenue. Check out their pricing page for more info on this.

We’re At The End

Here I am thinking — “what’s next?”

Depending on how well this tiny project goes, I’ll probably look into creating one for each of the popular Esports titles.

Thanks for reading! As a tiny bonus, the first 100 users get 50% off with the discount code FIRST100.

Cheers!

DigitalOcean Referral Badge