java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.repositories.GHLicense
All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHLicense extends GHBase
This class represents a GitHub license. It provides methods for fetching data about the license such as its name, SPDX ID, key, URL, and node ID.
  • Constructor Details

    • GHLicense

      public GHLicense(org.json.JSONObject jsonObject)
      Constructs a new GHLicense instance with the provided JSON object.
      Parameters:
      jsonObject - the JSON object containing the license data
  • Method Details

    • toJSONObject

      public org.json.JSONObject toJSONObject()
      Description copied from class: GHBase
      Returns a new JSONObject.
      Overrides:
      toJSONObject in class GHBase
      Returns:
      a new JSONObject
    • getUrl

      public String getUrl()
      Returns the URL of the license.
      Returns:
      the URL of the license
    • getName

      public String getName()
      Returns the name of the license.
      Returns:
      the name of the license
    • getKey

      public String getKey()
      Returns the key of the license.
      Returns:
      the key of the license
    • getNodeId

      public String getNodeId()
      Returns the node ID of the license.
      Returns:
      the node ID of the license
    • getSpdxId

      public String getSpdxId()
      Returns the SPDX ID of the license.
      Returns:
      the SPDX ID of the license