Skip to content

Instantly share code, notes, and snippets.

@ceeK
Last active August 29, 2015 14:19
Show Gist options
  • Save ceeK/918414dd24bc1769331c to your computer and use it in GitHub Desktop.
Save ceeK/918414dd24bc1769331c to your computer and use it in GitHub Desktop.

OrganisationVenue response

The current implementation has us requesting OrganisationVenue's based on the events they run on a day-to-day basis. This means on a Monday, only OrganisationVenue's that have events running that day should be shown.

A typical request is only for one single day, as each day is loaded independently. Parameters:

  • lat
  • lon
  • radius
  • start_time
  • end_time
  • activity_type

An expected response would be along the lines of:

[
 { "organisation" : {...},
   "venue" : {...},
   "event_min_price : ...,
   "event_count" : ...
  },
  { "organisation" : {...},
   "venue" : {...},
   "event_min_price : ...,
   "event_count" : ...
  },
]

Each of these OrganisationVenue's should only be relevant for the date and activity_type supplied.

On my end, given that I no longer have access to the Event's, I would attach a dictionary onto the OrganisationVenue linking activity_types to the day they run. I can obtain this information from the request I make. Moreover, I would need to link event countandevent_min_price` to specific dates too.

Therefore, when loading from cache, I can safely query the dictionary for the activity_type and see what if any of the dates match the current query. If they do, I can show that organisation venue.

@nickcharlton
Copy link

Tagging could work, but it might be a bit messy. I'll see what I can pull off with what I've got.

We're certainly hitting the point where using a standalone search tool would help us massively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment