Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events API - add ICS export URL to event object #854

Open
carrythebanner opened this issue Jan 7, 2025 · 0 comments
Open

Events API - add ICS export URL to event object #854

carrythebanner opened this issue Jan 7, 2025 · 0 comments

Comments

@carrythebanner
Copy link
Collaborator

The Events API currently has a shareable property with a full URL to the event on the web.

Example:

{
  "events": [
    {
      "id": "6245",
      "caldaily_id": "9300",
      "title": "Shift to Pedalpalooza Ride",
      ...
      "shareable": "https://shift2bikes.org/calendar/event-9300",
    }
  ]
}

(see API docs)

To export the event to an ICS file (vCalendar format), you have to know the API URL. Currently our front-end client builds the URL itself:

value.exportlink = '/api/ics.php?id=' + value.id;

If each event object included its own export URL clients could simply use that as-is, e.g.

{
  "events": [
    {
      "id": "6245",
      "caldaily_id": "9300",
      "title": "Shift to Pedalpalooza Ride",
      ...
      "shareable": "https://shift2bikes.org/calendar/event-9300",
      "export": "https://shift2bikes.org/api/ics.php?id=6245",
    }
  ]
}

(Note that ICS export currently uses the calevent ID aka listing ID, which exports all occurrences.)

See also #735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant