Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit 709e47f

Browse files
committed
Added getDownloadUrl() method
1 parent 77590b4 commit 709e47f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/main/java/org/kohsuke/github/GHContent.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package org.kohsuke.github;
22

33
import java.io.IOException;
4-
import java.util.Arrays;
5-
import java.util.List;
64

75
import javax.xml.bind.DatatypeConverter;
86

@@ -26,6 +24,7 @@ public class GHContent {
2624
private String url; // this is the API url
2725
private String git_url; // this is the Blob url
2826
private String html_url; // this is the UI
27+
private String download_url;
2928

3029
public GHRepository getOwner() {
3130
return owner;
@@ -101,6 +100,11 @@ public String getHtmlUrl() {
101100
return html_url;
102101
}
103102

103+
/**
104+
* URL to retrieve the raw content of the file. Null if this is a directory.
105+
*/
106+
public String getDownloadUrl() { return download_url; }
107+
104108
public boolean isFile() {
105109
return "file".equals(type);
106110
}

0 commit comments

Comments
 (0)