fomo no mo
DESCRIPTION
Presented by Vanessa Dean and Natalie Arellano on July 8, 2014 at The Flatiron School.TRANSCRIPT
![Page 1: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/1.jpg)
Natalie ArellanoVanessa Dean
Tuesday, July 8
Flatiron School Presents
FOMO No Mo’
![Page 2: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/2.jpg)
FOMO
![Page 3: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/3.jpg)
![Page 4: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/4.jpg)
![Page 5: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/5.jpg)
Other Events Happening Tonight
(you made the right choice)
![Page 6: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/6.jpg)
![Page 7: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/7.jpg)
![Page 8: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/8.jpg)
![Page 9: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/9.jpg)
![Page 10: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/10.jpg)
API Requests
Request URL for members from Flatiron Presents
https://api.meetup.com/2/members?group_id=14306982&key=1afad6758asdfb3q4f
Request URL for events that the member’s groups are hosting in the next week
https://api.meetup.com/2/events?&sign=true&photo-host=public&member_id=9053050&time=1404858600000,%201405463400000
&page=20&key=1afad6758asdfb3q4f
![Page 11: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/11.jpg)
Net::HTTP.get(“https://api.meetup.com/2/events?&sign=true&photo-host=public&member_id=9053050& time=1404858600000,%201405463400000&key=1afad6758asdfb3q4f")
YIKES!
![Page 12: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/12.jpg)
JSON.parse(Net::HTTP.get(events_request_uri))
Ruby
FTW!
![Page 13: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/13.jpg)
Data Structure
![Page 14: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/14.jpg)
railroady -M | dot -Tpng > models.png
Schema
![Page 15: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/15.jpg)
InitializationMember.all.sample(3).each do |member| my_hash["results"].each do |result|
# create the event if not exists event = Event.find_or_create_by(:name => result["name"], :date => result["time"], :url => result["event_url"])
# create the group if not exists, and assign it to the event event.group = Group.find_or_create_by(:name => result["group"]["name"], :urlname => result["group"]["urlname"])
# assign the group color -- assign color is defined on Group event.group.assign_color
# add the current member to the group if not already a member event.group.members << member unless event.group.members.include?(member)
# add the event date based on the time in milliseconds given by Meetup event.assign_date(Time.at(event.date.to_i/1000).to_date) endend
def assign_date(new_date) my_date = EventDate.find_or_create_by(event_date: new_date) self.event_date = my_dateend
![Page 17: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/17.jpg)
Lessons Learned
• APIs can be demystified
• Objects make things easier
• Value of collaboration
![Page 18: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/18.jpg)
Next Steps We Could Take
• Add ability to choose the seed group (instead of always sampling from Flatiron Presents members)
• Let user sign in with their Meetup account and choose groups they are a part of
• Add filters, e.g. narrow search results by location, pizza == true
![Page 19: FOMO No Mo](https://reader035.vdocument.in/reader035/viewer/2022081412/540d93c18d7f72767e8b4a7a/html5/thumbnails/19.jpg)
Questions?