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

Display upcoming events #101

Open
pchinjr opened this issue Nov 14, 2023 · 2 comments
Open

Display upcoming events #101

pchinjr opened this issue Nov 14, 2023 · 2 comments

Comments

@pchinjr
Copy link
Contributor

pchinjr commented Nov 14, 2023

As a user, who navigates to the home page, I should see a list of upcoming events. There exists an RSS feed at https://www.meetup.com/NorfolkJS/events/rss/. The current implementation is no longer maintained. The meetup API has changed significantly.

@qwo
Copy link
Contributor

qwo commented Nov 17, 2023

Hey 👋,

I wrote the original implementation and I took a look if I could fix this and the gap. I wanted to add some documentation and I dug into this and saw this was very shitty. I hope this saves someone some time.

Meetup did not deprecated their RSS feed but put a rule that it requires to have OAUTH Flow / needed a registered developer API identity to read it.

context.
There are two files that are relevant.

1.https://github.com/norfolkjs/norfolkjs.github.io/blob/main/proxy/index.js
2. https://github.com/norfolkjs/norfolkjs.github.io/blob/main/javascripts/events.js

  1. The server proxy was to solve for CORS. since the frontend of Norfolkjs.org could not query meetup.com/norfolkjs/events/rss directly. this was just to get the XML

  2. the file here uses vanilla JS to modify and update the frontend and deserialized and formatted the data. Theoretically, if the data and feed events are the same, you can just drop and play. Otherwise you might have to modify the payload to match to make this work again

I looked through the docs, and you dont have to upgrade to the GraphQL API; Meetup disallowed any public access via the internet without OAUTH JWT Bearer token to read their stupid RSS feed.

This leads you that you have to create a OAUTH API KEY request. I made a request and they denied it. Which is balls [1] https://www.meetup.com/api/oauth/list/

image
  1. I tried alternatively putting up a new proxy function to just scrape the rss feed directly and forget them but this is how I discovered they require OAUTH2 to read the public RSS feed.. (which seems like defeats the purpose of RSS, which is an open feed spec)

  2. I tried looking at scraping the HTML at https://www.meetup.com/norfolkjs/events or mocking the requests in the backend with a fake user agent and wrote some code to do so. It also failed and at that point it was just over engineering.

TLDR: I think if someone was to work on this;

I would recommend just manually encoding a JSON file and adding the event with the correct details instead of calling the proxy file [1]

[2] Make sure it matches the format for events.js and call it done.

The frequency of events doesn't seem wild that it could be managed by humans. Also the CI is setup automatically to do this, similar to how the blog works.

@qwo
Copy link
Contributor

qwo commented Nov 17, 2023

also PS. Meetup + Post WeWork sucks. Have y'all looked at moving to a different less extortionist event platform? 😂

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

No branches or pull requests

2 participants