Documentation: Syntax error in Github.create
The documentation requires a slight updation. Here we need to pass a URI in the second parameter of the method .
final GitHubClient githubClient = GitHubClient.create( URI.create("https://api.github.com/"), new File("/path-to-the/private-key.pem"), // here we need to convert the path to a URI APP_ID);
Duplicating my comment in the PR here
The method is defined as
public static GitHubClient create(final URI baseUrl, final File privateKey, final Integer appId){}
There's no create overload (AFAIK) which accepts URI for the private key. There's one which takes byte[] instead.
Can you show the code where we are accepting URI instead of File?
I see what you mean at line number 191 in the com.spotify.github.v3.clients.GitHubClient class, but why can't I pass File in the second parameter ? Line number 179 is the create overload that I am talking about. We are using version number 0.4.1, right ?
I don't think I follow. The private key is never accepted as a URI. Line 179 URI are the REST API and GraphQL API URLs, the last parameter is for access token in String format.
Ok I am sorry, there was an issue with my ide. The issue is resolved from my side. But thank you for taking your time ! Cheers !