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

Meetup Integration - Streaming Events #2

Open
gedanziger opened this issue Apr 23, 2019 · 0 comments
Open

Meetup Integration - Streaming Events #2

gedanziger opened this issue Apr 23, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@gedanziger
Copy link
Member

gedanziger commented Apr 23, 2019

Integrate the Open Events streaming API on meetup to pull events to the demo application. This SDK handles it using the Open Events Stream Method:

meetup.getStreamOpenEvents(parameters, function(err, resp) {
	console.log(err, resp);
});

This function can be extended to handle ingesting event and group data to our database, mapping to the models created in #1.

Use the following mapping from the event object returned (make sure to handle nulls properly. Check API docs to see what will always vs not always be mapped). All properties are returned assuming the object is called event:

  • id (uuid) - NOT MAPPED, generated by us
  • created (datetime) - NOT MAPPED, set when the object is created in our db
  • source (string - enum) [MEETUP, EVENTBRITE] - All events pulled from meetups will have the value MEETUP here.
  • name (string) <- event.name
  • description (string - blob) <- event.description
  • url (string) <- event.event_url
  • photoUrl (string) <- event.photo_url
  • sourceId (string) <- event.id
  • time (datetime) <- generate this from event.time
  • timeLocal (string) <- generate this from our time property and event.utc_offset
  • country (string) <- event.venue.country
  • city (string) <- event.venue.city
  • lat (number, best format for latitude in sequelize) - event.venue.lon
  • lon (number, best format for longitude in sequelize) - event.venue.lat
  • group (foreign key to group) - depending on if a group is created, we will set this

Note that multiple events can be sent for an event with a given sourceId, so make sure not to create an extra copy if there is an existing event with that sourceId in the database.

Additionally, if the object from the API has a group contained, check if a group exists in the database with that ID. if it does not, persist a group model to the DB.

  • id (uuid) - NOT MAPPED, generated by us
  • created (datetime) - NOT MAPPED, set when the object is created in our DB
  • source (string - enum) [MEETUP, EVENTBRITE] - Set to MEETUP
  • name (string) - event.group.name
  • url (string) <- event.group.urlname
  • photoUrl (string) - event.group.group_photo.thumb_link
  • sourceId (string) - event.group.id
@gedanziger gedanziger added the enhancement New feature or request label Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant