IFPA Calendar in iCal format


#1

So I have been hacking away on my C# / .NET implementation of an IFPA API data wrapper, found here

And one of the uses I thought would make the most sense is a way for the IFPA calendar to be integrated into my iOS phone calendar or Google Calendar. So I whipped up a quick API that consumes IFPA calendar info and outputs .ics data. Using this ICS data you can add it to your iCloud or Google calendars via the following url format

http://pinballcalendar20170829102021.azurewebsites.net/api/calendar/{address}/{distanceInMiles}

Example: Show me events 250 miles from Providence, RI

http://pinballcalendar20170829102021.azurewebsites.net/api/calendar/Providence/250

To add this event to your google calendar, go to calendar.google.com and click the dropdown menu near ‘Other Calendars’ and add by url, crafting your url like above.

On an iOS device you can go into Settings -> Calendar and go to accounts, add a new one, and choose ‘other’, then choose subscribed calendar and punch in the URL. I am still working out bugs so if you see them, feel free to send me a PM or post here. I’ll be putting the website on github in a separate project as well.


#2

whoa. very cool!


#3

Definitely not perfect though. I might consider finding a way to filter leagues/ongoing events as they aren’t super helpful in iOS


#4

This is actually awesome.


#5

This is really cool, but I did find an issue for leagues like above. Here’s an example URL.

http://pinballcalendar20170829102021.azurewebsites.net/api/calendar/Nashville/150

It appears that a league event has dates that span the entire league calendar, not just league event dates?


#6

Yeah. That’s the way the IFPA calendar actual page does it too right?

Leagues are a special case. What I might do is hide all events that have League in their name or that are larger than 4 days long.


#7

What I could do is for items that have League in the title and / or items that are longer than 4 days (unlikely to be a single ‘event’), just show the event in the calendar on the last day.

Viewing the Nashville calendar page on IFPA I don’t actually see the league you are referring to?
https://www.ifpapinball.com/calendar/


#8

Why not show it on the first day instead of the last? That way, someone in Nashville - for example - will see the first date of the event and “5 weeks” in the description and can manually edit the calendar item to repeat weekly for five weeks.

(I haven’t loaded your ical in my calendar, but I assume it includes the description)


#9

Well, I think because the last day is more likely to be the tournament finals? I can implement however makes the most sense, or provide query string parameters to allow people to customize the calendar output for however people see fit. I need to get this project into github tonight so people can post issues.


#10

I guess I just assumed that people need to play in the events leading up to the final, and they might miss those if only the final is on their calendar. But yeah, whatever makes most sense!


#11

I’ve published the very small web project here on github

I’ve also added a ‘showLeagues=false’ querystring option to hide anything with ‘league’ in the name or that spans more than 3 days of play.

Example:
http://pinballcalendar20170829102021.azurewebsites.net/api/calendar/Providence/250?showLeagues=false

omitting that parameter will default to true / aka showing leagues


#12

I’ve completed the C# / .NET pinball api wrapper, it should be feature complete (covers all IFPA endpoints as well as providing rudimentary data from IPDB from machine data lookup).

Available on Nuget

I’m pretty happy with the calendar. I think my next project will be a cross platform mobile app for IFPA. That’s very ambitious so probably won’t be anytime soon, but I would love for my phone to alert me when my rank has changed or nearby tournaments are happening.


#13

For anyone interested in this kind of thing, some time ago I also made a PHP wrapper for the IFPA API way back around the time it launched. I never did much with it but it would be cool for someone to pick it up and take care of it.


#14

Great idea! I tried this but unfortunately didn’t work in OS X Calendar. I used the variables Adelaide/800 and got the following error from Calendar:

"Access to “Pinball HQ Tournament” in “calendar (1)” in account “iCloud” is not permitted.

The server responded:
“403”
to operation CalDAVWriteEntityQueueableOperation."

Pinball HQ Tournament is a tournament in Sydney.


#15

Thanks @onetaste for the feedback. I googled that error and I believe its due to the Organizer field set to the TD… apparently MacOS/Calendar is very strict about the organizer field. I’ve omitted that field, can you remove and try to re-add the calendar and let me know if it works?


#16

Works perfectly on Mac Calendar now, thank you!!!


#17

I have been using this for a month now and I really like it, i use it to tell me about local tournaments I compete in regularly and also for all tournaments around australia so that when I travel I can try and time it with a tourney. Thanks for putting this together.


#18

Thanks dude! I’m happy it’s being used. I updated the libraries a bit to make them .NET standard; hopefully the next step is a cross platform IFPA app. Check back years from now :smile: