symphony.bdk.core.service.user.user_service.OboUserService#
- class symphony.bdk.core.service.user.user_service.OboUserService(user_api: symphony.bdk.gen.pod_api.user_api.UserApi, users_api: symphony.bdk.gen.pod_api.users_api.UsersApi, auth_session: symphony.bdk.core.auth.auth_session.AuthSession, retry_config: symphony.bdk.core.config.model.bdk_retry_config.BdkRetryConfig)#
Bases:
object
Class exposing OBO-enabled endpoints for user management. This service is used for retrieving information about a particular user, search users by ids, emails or usernames, perform some action related to user like:
list/search users
follow/unfollow users
- __init__(user_api: symphony.bdk.gen.pod_api.user_api.UserApi, users_api: symphony.bdk.gen.pod_api.users_api.UsersApi, auth_session: symphony.bdk.core.auth.auth_session.AuthSession, retry_config: symphony.bdk.core.config.model.bdk_retry_config.BdkRetryConfig)#
Methods
__init__
(user_api, users_api, auth_session, ...)follow_user
(follower_ids, user_id)Make a list of users to start following a specific user.
list_users_by_emails
(emails[, local, active])Search users by emails.
list_users_by_ids
(user_ids[, local, active])Search users by user ids.
list_users_by_usernames
(usernames[, active])Search users by usernames.
search_all_users
(query[, local, chunk_size, ...])Search for users by first name, last name, display name, and email; optionally, filter results by company, title, location, marketCoverage, responsibility, function, or instrument.
search_users
(query[, local, skip, limit])Search for users by first name, last name, display name, and email; optionally, filter results by company, title, location, marketCoverage, responsibility, function, or instrument.
unfollow_user
(follower_ids, user_id)Make a list of users to stop following a specific user.
- follow_user(follower_ids: [<class 'int'>], user_id: int) None #
Make a list of users to start following a specific user. See: Follow User
- Parameters
follower_ids – List of the ids of the followers.
user_id – The id of the user to be followed.
- list_users_by_emails(emails: [<class 'str'>], local: bool = False, active: bool = None) symphony.bdk.gen.pod_model.v2_user_list.V2UserList #
Search users by emails. See : Users Lookup v3
- Parameters
emails – List of emails.
local – If true then a local DB search will be performed and only local pod users will be returned. If absent or false then a directory search will be performed and users from other pods who are visible to the calling user will also be returned.
active – If not set all user status will be returned, if true all active users will be returned, if false all inactive users will be returned.
- Returns
Users found by emails.
- list_users_by_ids(user_ids: [<class 'int'>], local: bool = False, active: bool = None) symphony.bdk.gen.pod_model.v2_user_list.V2UserList #
Search users by user ids. See : Users Lookup v3
- Parameters
user_ids – List of user ids.
local – If true then a local DB search will be performed and only local pod users will be returned. If absent or false then a directory search will be performed and users from other pods who are visible to the calling user will also be returned.
active – If not set all user status will be returned, if true all active users will be returned, if false all inactive users will be returned.
- Returns
Users found by user ids.
- list_users_by_usernames(usernames: [<class 'str'>], active: bool = None) symphony.bdk.gen.pod_model.v2_user_list.V2UserList #
Search users by usernames. See : Users Lookup v3
- Parameters
usernames – List of usernames.
active – If not set all user status will be returned, if true all active users will be returned, if false all inactive users will be returned.
- Returns
Users found by usernames.
- async search_all_users(query: symphony.bdk.gen.pod_model.user_search_query.UserSearchQuery, local: bool = False, chunk_size: int = 50, max_number: Optional[int] = None) AsyncGenerator[symphony.bdk.gen.pod_model.user_v2.UserV2, None] #
Search for users by first name, last name, display name, and email; optionally, filter results by company, title, location, marketCoverage, responsibility, function, or instrument.
Same as
search_users()
but returns an asynchronous generator which performs the paginated calls with the correct skip and limit values. See: Search Users- Parameters
query – Searching query containing complex information like title, location, company…
local – If true then a local DB search will be performed and only local pod users will be returned. If absent or false then a directory search will be performed and users from other pods who are visible to the calling user will also be returned.
chunk_size – the maximum number of elements to retrieve in one underlying HTTP call
max_number – the total maximum number of elements to retrieve
- Returns
an asynchronous generator of users
- search_users(query: symphony.bdk.gen.pod_model.user_search_query.UserSearchQuery, local: bool = False, skip: int = 0, limit: int = 50) symphony.bdk.gen.pod_model.user_search_results.UserSearchResults #
Search for users by first name, last name, display name, and email; optionally, filter results by company, title, location, marketCoverage, responsibility, function, or instrument. See: Search Users
- Parameters
query – Searching query containing complex information like title, location, company…
local – If true then a local DB search will be performed and only local pod users will be returned. If absent or false then a directory search will be performed and users from other pods who are visible to the calling user will also be returned.
skip – Number of users to skip. Default: 0
limit – Maximum number of users to return. Default: 50
- Returns
the list of users found by query.
- unfollow_user(follower_ids: [<class 'int'>], user_id: int) None #
Make a list of users to stop following a specific user. See: Unfollow User
- Parameters
follower_ids – List of the ids of the followers.
user_id – The id of the user to be unfollowed.