Class GHAsset

java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHAsset

public class GHAsset extends GHObject
Asset in a release.
See Also:
  • Constructor Details

    • GHAsset

      public GHAsset()
  • Method Details

    • getContentType

      public String getContentType()
      Gets content type.
      Returns:
      the content type
    • setContentType

      public void setContentType(String contentType) throws IOException
      Sets content type.
      Parameters:
      contentType - the content type
      Throws:
      IOException - the io exception
    • getDownloadCount

      public long getDownloadCount()
      Gets download count.
      Returns:
      the download count
    • getLabel

      public String getLabel()
      Gets label.
      Returns:
      the label
    • setLabel

      public void setLabel(String label) throws IOException
      Sets label.
      Parameters:
      label - the label
      Throws:
      IOException - the io exception
    • getName

      public String getName()
      Gets name.
      Returns:
      the name
    • getOwner

      public GHRepository getOwner()
      Gets owner.
      Returns:
      the owner
    • getSize

      public long getSize()
      Gets size.
      Returns:
      the size
    • getState

      public String getState()
      Gets state.
      Returns:
      the state
    • getHtmlUrl

      public URL getHtmlUrl()
      Deprecated.
      This object has no HTML URL.
      Gets the html url.
      Specified by:
      getHtmlUrl in class GHObject
      Returns:
      the html url
    • getBrowserDownloadUrl

      public String getBrowserDownloadUrl()
      Gets browser download url.
      Returns:
      the browser download url
    • delete

      public void delete() throws IOException
      Delete.
      Throws:
      IOException - the io exception
    • wrap

      public static GHAsset[] wrap(GHAsset[] assets, GHRelease release)
      Wrap gh asset [ ].
      Parameters:
      assets - the assets
      release - the release
      Returns:
      the gh asset [ ]
    • getRoot

      @Deprecated public GitHub getRoot()
      Deprecated.
      For access to the GitHub instance, use a local copy instead of pulling it out of objects.
      Get the root GitHub instance for this object.
      Returns:
      the root GitHub instance