mirror of
https://github.com/CarmJos/GithubReleases4J.git
synced 2026-06-05 13:31:10 +08:00
[v1.0.0] 完成GithubUser信息的获取
This commit is contained in:
@@ -26,7 +26,6 @@ public class GithubReleasesTest {
|
||||
release.getAssets().stream().findFirst().ifPresent(GithubReleasesTest::downloadAssets);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void printInfo(@Nullable GithubRelease release) {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import cc.carm.lib.githubreleases4j.GithubRelease;
|
||||
import cc.carm.lib.githubreleases4j.GithubReleases4J;
|
||||
import cc.carm.lib.githubreleases4j.GithubUser;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
public class GithubUserTestTest {
|
||||
|
||||
public static final SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
@Test
|
||||
public void onTest() {
|
||||
|
||||
GithubRelease release = GithubReleases4J.getLatestRelease("CarmJos", "UltraDepository");
|
||||
if (release != null) {
|
||||
System.out.println("# " + release.getName() + " [" + FORMAT.format(release.getCreateTime()) + "]");
|
||||
|
||||
GithubUser author = release.getAuthor();
|
||||
System.out.println("- " + author.getStarredURL("LSeng", "Kar"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user