Context context = new ContextBuilder() .priority(Priority.REALTIME) .build(); CommandExecutor executor = NameApiRemoteExecutors.get(); Mode mode = NameApiModeFactory.withContext( "api-key", context, //the default and live server is "api.nameapi.org" new Host("api.nameapi.org", Protocol.HTTPS), NameApiPortUrlFactory.version5_3() ); EmailNameParserCommand command = new EmailNameParserCommand(); try { EmailNameParserResult result = executor.execute(command, mode, "john.doe@gmail.com").get(); } catch (Exception e) { throw new RuntimeException(e); }
Activity