@API(status=STABLE)
public interface OboConnectionService
Modifier and Type | Method and Description |
---|---|
UserConnection |
acceptConnection(java.lang.Long userId)
Accept the connection request from a requesting user.
|
UserConnection |
createConnection(java.lang.Long userId)
Sends a connection request to another user.
|
UserConnection |
getConnection(java.lang.Long userId)
Get connection status, i.e.
|
java.util.List<UserConnection> |
listConnections(ConnectionStatus status,
java.util.List<java.lang.Long> userIds)
List all current connection statuses with external or specified users.
|
UserConnection |
rejectConnection(java.lang.Long userId)
Reject the connection request from a requesting user.
|
void |
removeConnection(java.lang.Long userId)
Removes a connection with a user.
|
UserConnection getConnection(@Nonnull java.lang.Long userId)
ConnectionService.getConnection(Long)
userId
- The id of the user with whom the caller want to check.java.util.List<UserConnection> listConnections(@Nullable ConnectionStatus status, @Nullable java.util.List<java.lang.Long> userIds)
ConnectionService.listConnections(ConnectionStatus, List)
status
- Filter the connection list based on the connection status.
The connection status can only be pending_incoming, pending_outgoing, accepted, rejected, or all.
If you do not specify a status, all connections will be returned.userIds
- List of user ids which are used to restrict the list of results.
This can be used to return connections with internal users;
although, by default, this endpoint does not list implicit connections with internal users.UserConnection createConnection(@Nonnull java.lang.Long userId)
ConnectionService.createConnection(Long)
userId
- The id of the user with whom the caller want to connect.UserConnection acceptConnection(@Nonnull java.lang.Long userId)
ConnectionService.acceptConnection(Long)
userId
- The id of the user who requested to connect with the caller.UserConnection rejectConnection(@Nonnull java.lang.Long userId)
ConnectionService.rejectConnection(Long)
userId
- The id of the user who requested to connect with the caller.void removeConnection(@Nonnull java.lang.Long userId)
ConnectionService.removeConnection(Long)
userId
- The id of the user with whom we want to remove the connection.