← Back to team overview

zeitgeist team mailing list archive

[Blueprint advanced-api] Advanced API calls

 

Blueprint changed by Seif Lotfy:

Whiteboard changed:
  Imagine the following event sequence:
  
  open(w), open(z), open(x), close(z), open(y), close(x), close(w),
  close(y)
  
  The two methods I propose are:
  ---
  def FindEventsEncapsulatedBy(self, time_range, event_templates,
  		result_event_templates, storage_state, num_events, result_type):
  
  if i query this with x i check for all events with x and create transactions based on the open(x) & close(x). everything lying in between them is encapsulated thus the return here will be close(z), open(y)
  ---
  def FindEventsEncapsulating(self, time_range, event_templates,
  		result_event_templates, storage_state, num_events, result_type):
  
  if i query this with x i check for all events with x it will look for all transactions that have x in them
  int this case z and w
  
  ================
  
  I am not sure what this API would be used for? What kind of UI/UX are
  you expecting?
  
  Also; does this not somehow imply the failure of the current FindRelated
  API?
  
  // kamstrup
  
  --------------
+ 
+ ================
+ The main difference is FindRelated API gives you stuff that is related in means of, filtering out noise etc
+ These two methods are going to be used by FindRelated API but they do have the right to stand on their own
+ 
+ 2 Use cases would be
+ * What did I do while work on while X was open
+ * What was already open before I opened X
+ 
+ Both have similarity to FindRelated but are not the same...
+ Example if i open/close X 20 times and Y appears their once it will be handeled by FindRelated as noise unless its near a Open/Close/Modify event of X. However the 2 other methods will sort spit it out as a normal occurring Event.

-- 
Advanced API calls
https://blueprints.edge.launchpad.net/zeitgeist/+spec/advanced-api