Package com.github.api.v2.schema

Examples of com.github.api.v2.schema.Milestone


            request.connect();
          maxRateLimit = request.getHeaderFieldInt(ApplicationConstants.MAX_RATE_LIMIT_HEADER, -1);
          currentRateLimit = request.getHeaderFieldInt(ApplicationConstants.CURRENT_RATE_LIMIT_HEADER, -1);
           
            if (request.getResponseCode() != expected) {
              throw new GitHubException(convertStreamToString(getWrappedInputStream(request.getErrorStream(),
                        GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()))));
            } else {
                return getWrappedInputStream(request.getInputStream(),
                        GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()));
            }
    } catch (IOException e) {
      throw new GitHubException(e);
    } finally {
    }
  }
View Full Code Here


          maxRateLimit = request.getHeaderFieldInt(ApplicationConstants.MAX_RATE_LIMIT_HEADER, -1);
          currentRateLimit = request.getHeaderFieldInt(ApplicationConstants.CURRENT_RATE_LIMIT_HEADER, -1);
         
         
          if (request.getResponseCode() != expected) {
              throw new GitHubException(convertStreamToString(getWrappedInputStream(request.getErrorStream(),
                        GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()))));
          } else {
              return getWrappedInputStream(request.getInputStream(),
                                           GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()));
          }
      } catch (IOException e) {
          throw new GitHubException(e);
      }
  }
View Full Code Here

          request.connect();
          maxRateLimit = request.getHeaderFieldInt(ApplicationConstants.MAX_RATE_LIMIT_HEADER, -1);
          currentRateLimit = request.getHeaderFieldInt(ApplicationConstants.CURRENT_RATE_LIMIT_HEADER, -1);
         
          if (request.getResponseCode() != expected) {
              throw new GitHubException(convertStreamToString(getWrappedInputStream(request.getErrorStream(),
                        GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()))));
          } else {
              return getWrappedInputStream(request.getInputStream(),
                                           GZIP_ENCODING.equalsIgnoreCase(request.getContentEncoding()));
          }
      } catch (IOException e) {
          throw new GitHubException(e);
      }
  }
View Full Code Here

      String response = convertStreamToString(callApiGet(builder.buildUrl()));
      Matcher matcher = ApplicationConstants.ACCESS_TOKEN_PATTERN.matcher(response);
      if (matcher.find()) {
              return matcher.group(1);
            } else {
              throw new GitHubException(response);
            }
    } catch (Exception e) {
      throw new GitHubException(e);
    }
  }
View Full Code Here

        try {
          JsonElement element = parser.parse(new InputStreamReader(jsonContent, UTF_8_CHAR_SET));
          if (element.isJsonObject()) {
            return element.getAsJsonObject();
          } else {
            throw new GitHubException("Unknown content found in response." + element);
          }
        } catch (Exception e) {
            throw new GitHubException(e);
        } finally {
          closeStream(jsonContent);
      }
  }
View Full Code Here

        try {
          JsonElement element = parser.parse(new InputStreamReader(jsonContent, UTF_8_CHAR_SET));
          if (element.isJsonArray()) {
            return element.getAsJsonArray();
          } else {
            throw new GitHubException("Unknown content found in response." + element);
          }
        } catch (Exception e) {
            throw new GitHubException(e);
        } finally {
          closeStream(jsonContent);
      }
  }
View Full Code Here

   *
   * @param args
   *            the arguments
   */
  public static void main(String[] args) {
    GitHubServiceFactory factory = GitHubServiceFactory.newInstance();
    FeedService service = factory.createFeedService();
    Feed feed = service.getPublicUserFeed("apache", 10);
    printResult(feed);
  }
View Full Code Here

   *
   * @param args
   *            the arguments
   */
  public static void main(String[] args) {
    GitHubServiceFactory factory = GitHubServiceFactory.newInstance();
    NetworkService service = factory.createNetworkService();
    List<NetworkCommit> commits = service.getNetworkData("facebook", "tornado", "7b80c2f4db226d6fa3a7f3dfa59277da1d642f91");
    for (NetworkCommit commit : commits) {
      printResult(commit);
    }
  }
View Full Code Here

   *
   * @param args
   *            the arguments
   */
  public static void main(String[] args) {
    GitHubServiceFactory factory = GitHubServiceFactory.newInstance();
    PullRequestService service = factory.createPullRequestService();
    List<PullRequest> pullRequests = service.getPullRequests("technoweenie", "faraday");
    for (PullRequest pullRequest : pullRequests) {
      printResult(pullRequest);         
    }
    PullRequest pullRequest = service.getPullRequest("technoweenie", "faraday", 15);
View Full Code Here

   *
   * @param args
   *            the arguments
   */
  public static void main(String[] args) {
    GitHubServiceFactory factory = GitHubServiceFactory.newInstance();
    ObjectService service = factory.createObjectService();
    List<Tree> trees = service.getTree("facebook", "tornado", "7b80c2f4db226d6fa3a7");
    for (Tree tree : trees) {
      printResult(tree);         
    }
    List<Blob> blobs = service.getBlobs("facebook", "tornado", "7b80c2f4db226d6fa3a7");
View Full Code Here

TOP

Related Classes of com.github.api.v2.schema.Milestone

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.