-
- All Implemented Interfaces:
public final class UserClientClient that allows you to work with users.
-
-
Method Summary
Modifier and Type Method Description final Either<StreamError, User>getUser(Function1<FindUserParams, Unit> params)Get a User that matches the given params. final Either<StreamError, User>getOrCreateUser(Function1<UserParams, Unit> params)Get a User that matches the given params or create it if doesn't exist. final Either<StreamError, User>createUser(Function1<UserParams, Unit> params)Create a User with given params. final Either<StreamError, User>createUser(User user)Create a User. final Either<StreamError, Unit>deleteUser(String id)Delete a User by id. final Either<StreamError, User>updateUser(Function1<UpdateUserParams, Unit> params)Update an already existing user with the given params. -
-
Method Detail
-
getUser
final Either<StreamError, User> getUser(Function1<FindUserParams, Unit> params)
Get a User that matches the given params.
- Parameters:
params- A function over FindUserParams that defines params to be used.
-
getOrCreateUser
final Either<StreamError, User> getOrCreateUser(Function1<UserParams, Unit> params)
Get a User that matches the given params or create it if doesn't exist.
- Parameters:
params- A function over UserParams that define params to be used.
-
createUser
final Either<StreamError, User> createUser(Function1<UserParams, Unit> params)
Create a User with given params.
- Parameters:
params- A function over UserParams that define params to be used.
-
createUser
final Either<StreamError, User> createUser(User user)
Create a User.
- Parameters:
user- The user to be created.
-
deleteUser
final Either<StreamError, Unit> deleteUser(String id)
Delete a User by id.
- Parameters:
id- The id of the User to be deleted.
-
updateUser
final Either<StreamError, User> updateUser(Function1<UpdateUserParams, Unit> params)
Update an already existing user with the given params.
- Parameters:
params- A function over UpdateUserParams that define params to be used.
-
-
-
-