code: public boolean addFriendByName(String name, FriendGroup friendGroup) {
  		if (getRiotApi() != null) {
  			try {
  				final StringBuilder buf = new StringBuilder();
  				buf.append("sum");
  				buf.append(getRiotApi().getSummonerId(name));
  				buf.append("@pvp.net");
  				addFriendById(buf.toString(), name, friendGroup);
  				return true;
  			} catch (IOException | URISyntaxException e) {
  				e.printStackTrace();
  				return false;
  			}
  		}
  		return false;
  	}
docs: Sends an friend request to an other user. An Riot API key is required for
  this.
  
  @param name
  The name of the Friend you want to add (case insensitive)
  @param friendGroup
  The FriendGroup you want to put this user in.
  @return True if succesful otherwise false.