Best Practice: get_room_results() vs Get_all_results()
Posted: Mon Jan 21, 2019 3:24 am
Hi,
I'm a little confused to the distinction between these two methods, and there are parallels to some other methods with similar relationships, but let's just use these two for now:
Specifically, the only difference I am seeing is that a variable level must be specified for the latter, which seems unnecessary because 'room' is in the method name, so I'd assume the level would always be 'z'. After that, what is the intended use for each? I would have assumed (based on the name) that the first one wouldn't take any room ID's and would return a dictionary with a specified variable for all the rooms in the model.
After that, what is the purpose of requiring both the 'aps_var' and the 'vista_var'? These are always matched pairs, right? So it seems like it's just requiring an extra step where I have to pull out a full list of all the variables to be sure I have both specified correctly.
I'm a little confused to the distinction between these two methods, and there are parallels to some other methods with similar relationships, but let's just use these two for now:
Code: Select all
get_all_room_results(room_id, aps_var, var_level, [start_day], [end_day])
get_room_results( room_id, aps_var, vista_var, var_level, start_day = -1, end_day = -1 )After that, what is the purpose of requiring both the 'aps_var' and the 'vista_var'? These are always matched pairs, right? So it seems like it's just requiring an extra step where I have to pull out a full list of all the variables to be sure I have both specified correctly.