Class GitHubClientEx


  • @NotThreadSafe
    public class GitHubClientEx
    extends GitHubClientSSL
    Extended version of GitHubClient with some information about OAuth scopes
    • Constructor Detail

      • GitHubClientEx

        public GitHubClientEx()
      • GitHubClientEx

        public GitHubClientEx​(String hostname)
      • GitHubClientEx

        public GitHubClientEx​(URL url)
      • GitHubClientEx

        public GitHubClientEx​(String hostname,
                              int port,
                              String scheme)
    • Method Detail

      • getTokenOAuthScopes

        @Nullable
        public List<String> getTokenOAuthScopes()
        Returns:
        list of token scopes or null if oauth token not used or last response does not have 'X-OAuth-Scopes' header
      • getLastRequestAcceptedOAuthScopes

        @Nullable
        public List<String> getLastRequestAcceptedOAuthScopes()
        Returns:
        list of required token scopes for last request or null if no token used or last response does not have 'X-Accepted-OAuth-Scopes' header
      • setTrackOAuthInfo

        public void setTrackOAuthInfo​(boolean track)
      • setCredentials

        public org.eclipse.egit.github.core.client.GitHubClient setCredentials​(String user,
                                                                               String password)
        Overrides:
        setCredentials in class org.eclipse.egit.github.core.client.GitHubClient
      • setOAuth2Token

        public org.eclipse.egit.github.core.client.GitHubClient setOAuth2Token​(String token)
        Overrides:
        setOAuth2Token in class org.eclipse.egit.github.core.client.GitHubClient
      • updateRateLimits

        protected org.eclipse.egit.github.core.client.GitHubClient updateRateLimits​(HttpURLConnection request)
        Overrides:
        updateRateLimits in class org.eclipse.egit.github.core.client.GitHubClient
      • getApiUri

        public String getApiUri()
      • patch

        public <V> V patch​(@NotNull
                           String uri,
                           @Nullable
                           Object params,
                           @Nullable
                           Type type)
                    throws IOException
        Patch data to URI
        Type Parameters:
        V -
        Parameters:
        uri -
        params -
        type -
        Returns:
        response
        Throws:
        IOException