@Override
  public List<Event> searchEventByVenue(Venue v) {
    final List<Event> ret = new ArrayList<Event>();
    final String vID = v.getId();
    final HashMap<String, String> params = this.createDefaultHashMap();
    params.put("location", vID);
    final String url = this.conn.prepareURL("events/search", params);
    try {
      final JSONObject res = this.conn.query(url);
      final JSONObject tmp = res.getJSONObject("events");
      JSONArray events = null;
      try {
        // There is more than one results
        events = tmp.getJSONArray("event");
      } catch (final JSONException e) {
        // There is only one result
        events = new JSONArray();
        events.put(tmp.getJSONObject("event"));
      }

      for (int i = 0, numOfEvent = events.length(); i < numOfEvent; ++i) {
        final JSONObject event = events.getJSONObject(i);
        final HashMap<String, String> hint = new HashMap<String, String>();
        hint.put("eventName", event.getString("title"));
        hint.put("eventId", event.getString("id"));
        hint.put("venueId", event.getString("venue_id"));
        hint.put("startTime", event.get("start_time") == null ? event
            .getString("start_time") : null);
        hint.put("endTime", event.get("stop_time") == null ? event
            .getString("stop_time") : null);
        final Event e = new Event(hint);
        ret.add(e);
      }
    } catch (final Exception e) {
      throw new Error(e);
    }
    return ret;
  }