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 ; }
Sends an friend request to an other user . An Riot API key is required for this .