Natalie Arellano
Vanessa Dean
Tuesday, July 8
Flatiron School Presents
FOMO No Mo’
FOMO
Other Events Happening Tonight
(you made the right choice)
API Requests
Request URL for members from Flatiron Presents
meetup.com/2/members?group_id=14306982&key=1afad67
Request URL...
Net::HTTP.get(“https://api.meetup.com/2/events?
&sign=true&photo-host=public&member_id=9053050& time=140485860
JSON.parse(Net::HTTP.get(events_request_uri))
Data Structure
railroady -M | dot -Tpng > models.png
Schema
Initialization
Member.all.sample(3).each do |member|
my_hash["results"].each do |result|
# create the event if not exists
...
DEMO
Lessons Learned
• APIs can be demystified
• Objects make things easier
• Value of collaboration
Next Steps We Could Take
• Add ability to choose the seed group (instead of
always sampling from Flatiron Presents members...
Questions?
Thanks!
We are:
Natalie Arellano
natalie.p.arellano@gmail.com
and
Vanessa Dean
vanessa.dean@gmail.com
FOMO No Mo'
FOMO No Mo'
FOMO No Mo'
FOMO No Mo'
FOMO No Mo'
FOMO No Mo'
of 20

FOMO No Mo'

Presented by Vanessa Dean and Natalie Arellano on July 8, 2014 at The Flatiron School.
Published on: Mar 3, 2016
Published in: Technology      
Source: www.slideshare.net


Transcripts - FOMO No Mo'

  • 1. Natalie Arellano Vanessa Dean Tuesday, July 8 Flatiron School Presents FOMO No Mo’
  • 2. FOMO
  • 3. Other Events Happening Tonight (you made the right choice)
  • 4. API Requests Request URL for members from Flatiron Presents meetup.com/2/members?group_id=14306982&key=1afad67 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
  • 5. Net::HTTP.get(“https://api.meetup.com/2/events? &sign=true&photo-host=public&member_id=9053050& time=140485860
  • 6. JSON.parse(Net::HTTP.get(events_request_uri))
  • 7. Data Structure
  • 8. railroady -M | dot -Tpng > models.png Schema
  • 9. Initialization Member.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) end end def assign_date(new_date) my_date = EventDate.find_or_create_by(event_date: new_date) self.event_date = my_date end
  • 10. DEMO
  • 11. Lessons Learned • APIs can be demystified • Objects make things easier • Value of collaboration
  • 12. 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
  • 13. Questions?
  • 14. Thanks! We are: Natalie Arellano natalie.p.arellano@gmail.com and Vanessa Dean vanessa.dean@gmail.com

Related Documents