Vatsim-Scandinavia / events

Event Calendar Manager with API endpoints
GNU General Public License v3.0
0 stars 0 forks source link

Import events from my.vatsim.net #8

Open Atriusftw opened 1 day ago

Atriusftw commented 1 day ago

core.vateud.net have this functionality today, which makes it really simple to add the event. It takes the event link as input, then imports all data in correct fields, even the banner image.

bjerrecs commented 5 hours ago

This is achived with the help of the vatsim.net event API https://vatsim.dev/api/events-api/get-event

https://my.vatsim.net/api/v2/events/view/vectors-to-copenhagen-180
{
"data": {
"id": 12487,
"type": "Event",
"name": "Vectors to Copenhagen",
"link": "https://my.vatsim.net/events/vectors-to-copenhagen-180",
"organisers": [
{
"region": "EMEA",
"division": "EUD",
"subdivision": null,
"organised_by_vatsim": false
}
],
"airports": [
{
"icao": "EKCH"
}
],
"routes": [],
"start_time": "2024-10-07T17:00:00.000000Z",
"end_time": "2024-10-07T20:00:00.000000Z",
"short_description": "VATSIM Scandinavia invites you to \"Vectors to Copenhagen\"! \r\nFrom 17z to 20z, enjoy three hours of full ATC staffing as you fly into Denmark's capital. \r\nArrive early for a smooth landing or depart Copenhagen to explore Europe. \r\nPrepare for heavy traffic as the event progresses!",
"description": "VATSIM Scandinavia invites you to \"Vectors to Copenhagen\"! \r\nFrom 17z to 20z, enjoy three hours of full ATC staffing as you fly into Denmark's capital. \r\nArrive early for a smooth landing or depart Copenhagen to explore Europe. \r\nPrepare for heavy traffic as the event progresses!\r\n\r\nEnsure your charts are in check, dust off your aircraft from the hangar, and mark your presence at this electrifying event. We look forward to seeing you in the virtual skies!\r\n\r\n[Briefings, Charts and everything you need to know is here!](https://wiki.vatsim-scandinavia.org/books/danish-airports-charts/page/ekch-copenhagenkastrup)\r\n\r\n[Check the ATC bookings here](https://vatsim-scandinavia.org/)",
"banner": "https://vatsim-my.nyc3.digitaloceanspaces.com/events/tKcd4sCDvqKfkJtDo1SicYKqKLzww5kzi1u0n3fH.jpg"
}
}

Should be easy to achive