Examples of StackExchangeApiClientFactory


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

        if(line.hasOption(HELP_OPTION)) {
            printHelp(options);           
        } else if(line.hasOption(APPLICATION_KEY_OPTION)) {
        final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION);
       
        final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue);
        final StackExchangeApiClient client = factory.createStackExchangeApiClient();
       
        if(line.hasOption(ID_OPTION)) {
          String idValue = line.getOptionValue(ID_OPTION);
          List<User> users = client.getUsers(Long.valueOf(idValue));
          printResult(users.get(0));
View Full Code Here

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

        if(line.hasOption(HELP_OPTION)) {
            printHelp(options);
        } else if(line.hasOption(APPLICATION_KEY_OPTION)) {
        final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION);
       
        final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue);
        final StackExchangeApiClient client = factory.createStackExchangeApiClient();
       
        if(line.hasOption(ID_OPTION)) {
          String idValue = line.getOptionValue(ID_OPTION);
          List<Answer> answersByUser = client.getAnswersByUsers(Long.valueOf(idValue));
          for (Answer answer : answersByUser) {
View Full Code Here

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

        if(line.hasOption(HELP_OPTION)) {
            printHelp(options);           
        } else if(line.hasOption(APPLICATION_KEY_OPTION)) {
        final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION);
       
        final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue);
        final StackExchangeApiClient client = factory.createStackExchangeApiClient();
       
        if(line.hasOption(ID_OPTION)) {
          String idValue = line.getOptionValue(ID_OPTION);
          List<Question> question = client.getQuestions(Long.valueOf(idValue));
          printResult(question.get(0));
View Full Code Here

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

        if(line.hasOption(HELP_OPTION)) {
            printHelp(options);
        } else if(line.hasOption(APPLICATION_KEY_OPTION)) {
        final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION);
       
        final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue);
        final StackExchangeApiClient client = factory.createStackExchangeApiClient();
       
        if(line.hasOption(ID_OPTION)) {
          String idValue = line.getOptionValue(ID_OPTION);
          List<Comment> userComments = client.getUsersComments(Long.valueOf(idValue));
          for (Comment comment : userComments) {
View Full Code Here

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

        if(line.hasOption(HELP_OPTION)) {
            printHelp(options);
        } else if(line.hasOption(APPLICATION_KEY_OPTION)) {
        final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION);
       
        final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue);
        final StackExchangeApiClient client = factory.createStackExchangeApiClient();
       
        List<Statistics> stats = client.getStatistics();
        printResult(stats);
       
        } else {
View Full Code Here

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

        if(line.hasOption(HELP_OPTION)) {
            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();
View Full Code Here

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

        if(line.hasOption(HELP_OPTION)) {
            printHelp(options);           
        } else if(line.hasOption(APPLICATION_KEY_OPTION)) {
        final String keyValue = line.getOptionValue(APPLICATION_KEY_OPTION);
       
        final StackExchangeApiClientFactory factory = StackExchangeApiClientFactory.newInstance(keyValue);
        final StackExchangeApiClient client = factory.createStackExchangeApiClient();
       
      List<Badge> badges = client.getBadgesByName();
      System.out.println("============ Badges ============");
      for (Badge badge : badges) {
        printResult(badge);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.