我努力寻找一个简单的代码行,它使用oauth令牌从企业github读取文件内容,但是找不到这样的例子.
我试过https://github.com/jcabi/jcabi-github,但它不支持企业github?(也许我错了)
现在我正在尝试自我:
GitHubClient client = new GitHubClient("enterprise url");
GitHubRequest request = new GitHubRequest();
request.setUri("/readme");
GitHubResponse response = client.get(request);
Run Code Online (Sandbox Code Playgroud)
那又怎样?我只看到了一个getBody,也许我需要用一些json库来解析它?它必须更简单..我期待的东西像:repo.get(url).getContent()