Klasse Github

Alle implementierten Schnittstellen:
HttpRequestInterface, JSONHelper

public class Github extends GHBase
This class represents the main entry point for interacting with the GitHub API. It provides methods for fetching data about users, organizations, advisories, and gitignore templates.
  • Konstruktordetails

    • Github

      public Github(String token)
      Constructs a new GitHub instance with the provided username and token.
      Parameter:
      token - the GitHub token
  • Methodendetails

    • findOrganisationByName

      public GHOrganisation findOrganisationByName(String name)
      Finds an organization by its name.
      Parameter:
      name - the name of the organization
      Gibt zurück:
      the organization
    • findUserByName

      public GHUser findUserByName(String name)
      Finds a user by their username.
      Parameter:
      name - the username of the user
      Gibt zurück:
      the user
    • getToken

      public String getToken()
      Returns the GitHub token.
      Gibt zurück:
      the GitHub token
    • listGlobalAdvisories

      public List<GHAdvisory> listGlobalAdvisories()
      Lists all global advisories.
      Gibt zurück:
      a list of all global advisories
    • getGlobalAdvisories

      public GHAdvisory getGlobalAdvisories(String id)
      Gets a global advisory by its ID.
      Parameter:
      id - the ID of the advisory
      Gibt zurück:
      the advisory
    • listGitignoreTemplates

      public List<GHGitignoreTemplate> listGitignoreTemplates()
      Lists all gitignore templates.
      Gibt zurück:
      a list of all gitignore templates
    • getGitignoreTemplate

      public GHGitignoreTemplate getGitignoreTemplate(String name)
      Gets a gitignore template by its name.
      Parameter:
      name - the name of the template
      Gibt zurück:
      the gitignore template
    • getSelfUser

      public SelfUser getSelfUser()
      Lists all user advisories.
      Gibt zurück:
      a list of all user advisories
    • getLogger

      public static Logger getLogger()