Source code for q2_smart.ts_endpoints.traits

from .base import CallType, TSEndpoint
from .decorators import authenticate
from .constants import TS, TRAITS, USERS


[docs] class Traits(TSEndpoint):
[docs] @authenticate async def set_trait(self, trait_id: str, user_id: int) -> bool: response = await self._send_request( f"{TS}/{TRAITS}/{trait_id}/{USERS}/{user_id}", CallType.POST, mock_response=self.mock_set_trait, ) return response.ok
@property def mock_set_trait(self) -> dict: return {}