func NewUniAPI(userid string, grapher *grapher.Grapher) API { a := &uniAPI{userID: userid, grapher: grapher, open: make(map[string]int64), queues: make(map[string]int64)} grapher.SetAPI(a) return a }
func newChannelAPI(c appengine.Context, store *store, userid string, sessionid string, bufferOnly bool, grapher *grapher.Grapher) *channelAPI { a := &channelAPI{sessionID: sessionid, store: store, userID: userid, c: c, bufferOnly: bufferOnly, grapher: grapher} grapher.SetAPI(a) return a }