1
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:
2022-01-22 05:09:02 +08:00
parent 718aa584bd
commit c9409bc26c
6 changed files with 118 additions and 13 deletions
-1
View File
@@ -26,7 +26,6 @@ public class GithubReleasesTest {
release.getAssets().stream().findFirst().ifPresent(GithubReleasesTest::downloadAssets);
}
}
private static void printInfo(@Nullable GithubRelease release) {
+26
View File
@@ -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"));
}
}
}