Skip to content

Comments

Calendar#43

Open
c-harding wants to merge 50 commits intomainfrom
calendar
Open

Calendar#43
c-harding wants to merge 50 commits intomainfrom
calendar

Conversation

@c-harding
Copy link
Owner

Add endpoint for serving an ical calendar containing all activities

const router = express.Router();

const mkRequestLogin = (res: express.Response) => async () => {
res.status(403).send('Not logged in');
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Handle logging in


res.type('text/calendar; charset=UTF-8');

const cal = ical({ name: 'Strava activities' });
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add proper caching of ical (only fetch new activities, e.g. from past week)
  • Clear old caches after certain time
  • Handle logout through GUI
  • Add link to GUI


for await (const activity of eagerIterator(strava.getStravaActivities())) {
const startTime = moment(activity.start_date).tz(activity.timezone.split(' ')[1]);
const location = activity.start_latlng.join(', ');
Copy link
Owner Author

@c-harding c-harding May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Consider geocoding here

@c-harding c-harding force-pushed the calendar branch 2 times, most recently from 094f89f to d9215dd Compare January 11, 2023 20:15
@c-harding c-harding force-pushed the calendar branch 5 times, most recently from 56c2872 to dbc9936 Compare February 22, 2023 22:55
@unitbob1
Copy link

A UI could be provided with two buttons to launch a calendar app, or to copy the ICAL link allowing the user choice over which they use. This allows google calendar users to add it both on mobile and windows very easily

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants