func (c *Client) GetSessionEvents(sid session.ID, afterN int) (retval []events.EventFields, err error) {
	query := make(url.Values)
	if afterN > 0 {
		query.Set("after", strconv.Itoa(afterN))
	}
	response, err := c.Get(c.Endpoint("sessions", string(sid), "events"), query)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	retval = make([]events.EventFields, 0)
	if err := json.Unmarshal(response.Bytes(), &retval); err != nil {
		return nil, trace.Wrap(err)
	}
	return retval, nil
}
// Returns events that happen during a session sorted by time
// (oldest first).
//
// afterN allows to filter by "newer than N" value where N is the cursor ID
// of previously returned bunch (good for polling for latest)
//
// This function is usually used in conjunction with GetSessionReader to
// replay recorded session streams.
Returns events that happen during a session sorted by time
(oldest first).

afterN allows to filter by "newer than N" value where N is the cursor ID
of previously returned bunch (good for polling for latest)

This function is usually used in conjunction with GetSessionReader to
replay recorded session streams.
// Returns events that happen during a session sorted by time // ( oldest first ) . // // afterN allows to filter by " newer than N " value where N is the cursor ID // of previously returned bunch ( good for polling for latest ) // // This function is usually used in conjunction with GetSessionReader to // replay recorded session streams .
func (c *Client) GetSessionEvents(sid session.ID, afterN int) (retval []events.EventFields, err error) {
	query := make(url.Values)
	if afterN > 0 {
		query.Set("after", strconv.Itoa(afterN))
	}
	response, err := c.Get(c.Endpoint("sessions", string(sid), "events"), query)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	retval = make([]events.EventFields, 0)
	if err := json.Unmarshal(response.Bytes(), &retval); err != nil {
		return nil, trace.Wrap(err)
	}
	return retval, nil
}
func ( c * Client ) GetSessionEvents ( sid session . ID , afterN int ) ( retval [ ] events . EventFields , err error ) { query := make ( url . Values ) if afterN > 0 { query . Set ( " " , strconv . Itoa ( afterN ) ) } response , err := c . Get ( c . Endpoint ( " " , string ( sid ) , " " ) , query ) if err != nil { return nil , trace . Wrap ( err ) } retval = make ( [ ] events . EventFields , 0 ) if err := json . Unmarshal ( response . Bytes ( ) , & retval ) ; err != nil { return nil , trace . Wrap ( err ) } return retval , nil }
Returns events that happen during a session sorted by time
(oldest first).
Returns events that happen during a session sorted by time ( oldest first ) .