(users)
Retrieve the current user for the authenticated team.
from midday import Midday
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.users.get()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Update the current user for the authenticated team.
from midday import Midday, models
with Midday(
token="MIDDAY_API_KEY",
) as m_client:
res = m_client.users.update(request={
"full_name": "Jane Doe",
"team_id": "team-abc123",
"email": "jane.doe@acme.com",
"avatar_url": "https://cdn.midday.ai/avatars/jane-doe.jpg",
"locale": "en-US",
"week_starts_on_monday": True,
"timezone": "America/New_York",
"time_format": 24,
"date_format": models.DateFormatRequest.YYYY_DASH_MM_DASHDD,
})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.UpdateCurrentUserRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.UpdateCurrentUserResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |