Skip to content

Instantly share code, notes, and snippets.

@ceeK
Last active August 29, 2015 14:16
Show Gist options
  • Save ceeK/02029249332286e33af1 to your computer and use it in GitHub Desktop.
Save ceeK/02029249332286e33af1 to your computer and use it in GitHub Desktop.
Missing routes

Event types

  • Need to be able to obtain event types from the server

GET /events/activity_types

[
  "yoga",
  "barre"
]

Venue searching (crux of the app experience right now)

  • Need to be able to efficiently search venues for appropriate classes. Current way is hacky and either downloads entire database or requires the use of mutex locks :(

GET /venues/search

Params:

  • lat
  • lon
  • radius
  • event_type
  • start_date (could be half way through a day)
  • end_date (always full day)
[ "# Each index is a day"
  [ "# Each index is a dictionary with a venue, a count of relevant events, and a min price"
    {
      "venue": {
        
      },
      "min_price": 0,
      "count": 45
    },
    {
      "venue": {
        
      },
      "min_price": 0,
      "count": 45
    }
  ],
  [
    {
      "venue": {
        
      },
      "min_price": 0,
      "count": 45
    },
    {
      "venue": {
        
      },
      "min_price": 0,
      "count": 45
    }
  ]
]

Event search

  • Need to efficient obtain the classes for a certain venue after selecting it on venue page.

GET /venues/<venue_id>

Params:

  • event_type - this saves us downloading classes they aren't looking at right now
  • start_date - could be half way through today, needed to not download unnecessary old events
  • end_date - full day
[ "# Each index is a day"
  [ "# Each index is an event dictionary"
    {
      "event_id": "123",
      "name": "A Fancy Yoga Class"
    },
    {
      "event_id": "124",
      "name": "A Fancy Yoga Class ||"
    }
  ],
  [
    {
      "event_id": "345",
      "name": "A Fancy Yoga Class |||"
    }
  ]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment