Package api.search.user

Examples of api.search.user.UserSearch


   * @param username the username
   * @return the user
   * @throws CouldNotLoadException the could not load exception
   */
  public static User userFromName(String username) throws CouldNotLoadException{
    UserSearch us = UserSearch.search(username.toLowerCase());
    if (us.getResponse().getResults() != null && !us.getResponse().getResults().isEmpty()){
      return fromId(us.getResponse().getResults().get(0).getUserId().intValue());
    }
    else {
      throw new CouldNotLoadException("User not found");
    }
  }
View Full Code Here

TOP

Related Classes of api.search.user.UserSearch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.