norfolkjs / norfolkjs.github.io

Website code for Norfolk.js
http://www.norfolkjs.org
12 stars 19 forks source link

How does the meetup proxy work? #97

Closed qwo closed 7 months ago

qwo commented 4 years ago

@pchinjr

so there is a proxy script here that uses the Meetup RSS feed feature. This cloud function

  1. proxies the request so it loads the RSS page that has a similar structure to the Meetup API query previously using auth tokens.

  2. The body was reformatted to match the new payload from the last one https://github.com/norfolkjs/norfolkjs.github.io/pull/94/files#diff-5df752e742e11a010c6da42466193caeR4

https://github.com/norfolkjs/norfolkjs.github.io/blob/master/proxy/index.js

qwo commented 4 years ago

@pchinjr let me know if this makes sense

pchinjr commented 4 years ago

ah ok, thanks for the clarification!!!

qwo commented 4 years ago

Primarily the thought process behind this ended up originally using the OAUTH API. However the new Meetup V4 API requires signing in and user-auth flow which doesn't fit this workflow.

The /RSS feed feature was used instead and it was easier to find a clean RSS/XML->JSON converter in node than doing it client side

https://github.com/norfolkjs/norfolkjs.github.io/blob/master/proxy/index.js#L1

It is possible for this to be refactored clientside only if the data parsing of the body is done on the client