Package com.google.code.stackexchange.client

Examples of com.google.code.stackexchange.client.AsyncStackExchangeApiClient


            printHelp(options);           
        } else if(line.hasOption(APPLICATION_KEY_OPTION)) {
        final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION);
       
        final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue);
        final AsyncStackExchangeApiClient client = factory.createAsyncStackExchangeApiClient();
      System.out.println("Fetching badges and tags asynchronously.");
        Future<List<Badge>> badgesFuture = client.getBadges();
        Future<List<Tag>> tagsFuture = client.getTags();
      System.out.println("Done fetching badges and tags asynchronously. Now blocking for result.");
      List<Badge> badges = badgesFuture.get();
      System.out.println("============ Badges ============");
      for (Badge badge : badges) {
        printResult(badge);
View Full Code Here

TOP

Related Classes of com.google.code.stackexchange.client.AsyncStackExchangeApiClient

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.