-
Notifications
You must be signed in to change notification settings - Fork 79
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
API Endpoint for Events to be listed on the website /api/events #343
Conversation
For the service account creation.
Hopefully this helps and I can delete this message whenever if it's not useful. |
@MandyMeindersma Let me know what you think about this whenever you have time. |
Just for completionists sake, the endpoint json would return something like this (these are throw away events) {
"statusCode": 200,
"message": "Success",
"events": [
{
"kind": "calendar#event",
"etag": "\"3429537132936000\"",
"id": "6q60o3fo5sqnkeq68j6bhjlsfc",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=NnE2MG8zZm81c3Fua2VxNjhqNmJoamxzZmMgc3RldmUuc2hlZXRzZmFjZUBt",
"created": "2024-05-03T01:11:57.000Z",
"updated": "2024-05-03T20:36:06.468Z",
"summary": "Test event friday.",
"creator": {
"email": "[email protected]",
"self": true
},
"organizer": {
"email": "[email protected]",
"self": true
},
"start": {
"dateTime": "2024-05-04T20:00:00-06:00",
"timeZone": "America/Edmonton"
},
"end": {
"dateTime": "2024-05-04T21:00:00-06:00",
"timeZone": "America/Edmonton"
},
"iCalUID": "[email protected]",
"sequence": 1,
"reminders": {
"useDefault": true
},
"eventType": "default"
},
{
"kind": "calendar#event",
"etag": "\"3429542509008000\"",
"id": "5civg5i4e3btljevb9jup2bpfj",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=NWNpdmc1aTRlM2J0bGpldmI5anVwMmJwZmogc3RldmUuc2hlZXRzZmFjZUBt",
"created": "2024-05-03T21:19:05.000Z",
"updated": "2024-05-03T21:20:54.504Z",
"summary": "Second Event",
"creator": {
"email": "[email protected]",
"self": true
},
"organizer": {
"email": "[email protected]",
"self": true
},
"start": {
"dateTime": "2024-05-04T21:00:00-06:00",
"timeZone": "America/Edmonton"
},
"end": {
"dateTime": "2024-05-04T22:00:00-06:00",
"timeZone": "America/Edmonton"
},
"iCalUID": "[email protected]",
"sequence": 0,
"attendees": [
{
"email": "[email protected]",
"organizer": true,
"self": true,
"responseStatus": "accepted"
},
{
"email": "des-calendar-service-act-test@deveedmonton-testing-calendar.iam.gserviceaccount.com",
"responseStatus": "needsAction"
}
],
"reminders": {
"useDefault": true
},
"eventType": "default"
}
]
} |
@dgmouris this is great! if you would like we can excract this later to a Nuxt Module so others can use it? that can be a cool project! |
So @arashsheyda I think later is key here, right now people will be able to read the endpoint @arashsheyda do you mean as another project as a whole? If so the options here are pretty limitless! |
PS. I think this is good to go once we test it and set up the service account with the devedmonton email :) Let me know your folks' thoughts. |
@dgmouris yes I meant after this PR gets merge we can create a new project e.g. |
@ajyong @MandyMeindersma I'm still getting familiar with the contributing to this site, I was wondering how I can get either some review/feedback/change requests on this PR :) I would like to test this with the devedmonton google account as well if you folks feel comfortable with that:) |
No problem @MandyMeindersma I was assuming you folks got a little busy with work, I just wanted to make sure this isn't forgotten :) As a note, I think it would be best to merge this once we've tested it with the calendar :) Let me know how I can help or who I should talk if you folks need help :) Thanks again! |
* @param {number} limitEvents - Limit the number of events to fetch (query param) | ||
* @example | ||
* // Example usage: | ||
* // GET /api/events?startDate=2024-05-01&limitEvents=25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the comments so so much! Thank you!!
Still in the process of figuring out what I am supposed to be doing (the videos are very helpful @dgmouris thank you) I did give you access to edit and add events on the public calendar for testing @dgmouris Feel free to make a mess of it. No one is currently using it. Also lemme know if I should add any of your students as well |
@allcontributors add @dgmouris for ideas, code and documentation |
I've put up a pull request to add @dgmouris! 🎉 |
Thank you so much @dgmouris for making the videos and making it so easy to follow! I am so sorry it took me so long to do this. That is not normal. Normally I get to reviews and asks within 2-3 days and I will be more timely as y'all are making more prs Also the calendar is kinda bare right now because I have to ask ben how he did the meetup import to the calendar. And I'll be asking other organizers to add their events too! Yay! |
Hey @MandyMeindersma thanks for taking the time to review this! I'm excited because I hope this is the beginning of the ground work where we can display all events in one place. |
What issue is this referencing?
This hopefully going to enable us to manage one google calendar and have ability to list those events so that we can see them on the website, which is the original issue referenced #312.
This requires and google service account that has permissions to "Make Changes to Events" in the user's google calendar account. Documentation for this will be added shortly.
It also introduces new environment variables that kind of look like this based on the working example shown below.
Hopefully someone can help me get some credentials for a DES email that probably has all of these events so that I can double check the environment variables locally.
Do these code changes work locally and have you tested that they fix the issue yourself?
Does the following command run without warnings or errors?
npm run pr-checks
Have you taken a look at our contributing guidelines?
My node version matches the one suggested when running
nvm use
?I'm not using 18.17.0, I'm currently using 20.10.0 but I don't think that these changes should be an issue.