Add HippoClient.main_caps_client convenience property
This commit is contained in:
@@ -34,7 +34,7 @@ async def amain():
|
||||
client.session.message_handler.subscribe("ChatFromSimulator", _respond_to_chat)
|
||||
|
||||
# Example of how to work with caps
|
||||
async with client.main_region.caps_client.get("SimulatorFeatures") as features_resp:
|
||||
async with client.main_caps_client.get("SimulatorFeatures") as features_resp:
|
||||
print("Features:", await features_resp.read_llsd())
|
||||
|
||||
while True:
|
||||
|
||||
@@ -541,6 +541,12 @@ class HippoClient(BaseClientSessionManager):
|
||||
return None
|
||||
return self.main_region.circuit
|
||||
|
||||
@property
|
||||
def main_caps_client(self) -> Optional[CapsClient]:
|
||||
if not self.main_region:
|
||||
return None
|
||||
return self.main_region.caps_client
|
||||
|
||||
async def aclose(self):
|
||||
try:
|
||||
self.logout()
|
||||
|
||||
Reference in New Issue
Block a user