The Users client allows you to access your Users on your Catalytic team.

MethodDescription
getGets a specific User by Id, Email or Username
findSearch for Users by Name, or get all users.

Quickstart Example

/*
 * This example demonstrates listing all users
 */
import org.catalytic.sdk.CatalyticClient;
import org.catalytic.sdk.entities.User;
import org.catalytic.sdk.entities.UsersPage;

public class Program {
  
    public static void main(String[] args) throws Exception {
				
      	// Create and initialize the Catalytic SDK Client
        CatalyticClient catalytic = new CatalyticClient();
      
      	// Find all users
        UsersPage results = catalytic.users().find();
      
      	// `results` is a results page containing `users` and 
        // a `nextPageToken` you can use to page through results.
      	List<User> users = new ArrayList<>();
        users.addAll(results.getUsers());
      
      	// Loop through all pages of users and add them to the `users` List
      	while (results.getNextPageToken() != null) {
          	results = catalytic.users().find(results.getNextPageToken());
          	users.addAll(results.getUsers());
        }
      
      	// Print out a list of their emails
      	for (User user : users) {
            System.out.println(user.getEmail()); 
        }
    }
}