public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    String targetVenue = req.getParameter("vid");
    if (targetVenue != null) {
      PersistenceManager pm = Common.getPM();
      try {
        FoursquareApi api = Common.getCurrentApi(pm);
        Checkin[] herenow = new Checkin[0];
        
        try {
          Result<CheckinGroup> res = api.venuesHereNow(targetVenue, 500, 0, 0L);
          if (res.getMeta().getCode() != 200) {
            log.warning("Failed to retrieve here now for venue "+targetVenue);
            log.info(res.getMeta().toString());
          } else {
            herenow = res.getResult().getItems();
          }
        } catch (FoursquareApiException e) {
          log.warning("Failed to retrieve here now for venue "+targetVenue);
          log.info(e.toString());
        }
        
        String channel = null;
        if (req.getParameter("channel") != null) {
          channel = Common.createChannelToken(targetVenue);
        }
        
        StringBuilder sb = new StringBuilder();
        sb.append("{\"herenow\":" + herenow.length + ",");
        if (channel != null) {
          sb.append("\"channel\":\"" + channel + "\",");
        }
        sb.append("\"checkins\":[");
        for (int i = 0; i < herenow.length; i++) {
          if (i != 0) {
            sb.append(",");
          }
          
          boolean isMayor = herenow[i].getIsMayor() != null
                            && herenow[i].getIsMayor().equals(Boolean.TRUE);
          
          sb.append(Common.checkinToJson(herenow[i].getUser().getFirstName(),
                                         herenow[i].getUser().getPhoto(), isMayor));
        }
        sb.append("]}");
        resp.getWriter().print(sb.toString());
      } finally {
        pm.close();
      }
    }
  }