Closed leonhard-s closed 1 year ago
Closing due to low demand. Users seeking this functionality can use pattern like the following to support these types of lazy lookups:
import auraxium
from auraxium import event, ps2
async def main() -> None:
async def auraxium.Client(...) as client:
char_id_cache: list[int] = []
@trigger(event.Death)
async def on_death(evt: event.Death) -> None:
char_id_cache.append(evt.character_id)
if len(char_id_cache) > 100:
chars = client.find(ps2.Character, character_id=','.join(map(str, char_id_cache)))
do_stuff_with_chars(chars)
char_id_cache.clear()
When working with websocket data, it is common to have a barrage of similar responses sent to the REST API all the time, like when resolving experience IDs or character names.
For these time-insensitive use-cases, it would be better to bundle these requests depending on their URL and query as part of a single, larger query.
A few notes on implementation:
auraxium.census.Query
level (as opposed to the object model or HTTP level)There were plans for the proxy system to take on similar capabilities at one point. We should make sure this does not overlap with the new proxy system (#22) too much.