use of com.zhouzifei.tool.config.GithubFileProperties in project simpleFS by shengdingbox.
the class GithubApiClient method main.
public static void main(String[] args) throws IOException {
final FileInputStream fileInputStream = new FileInputStream("/Users/Dabao/Downloads/123.png");
final FileProperties fileProperties = new FileProperties();
final GithubFileProperties githubFileProperties = fileProperties.getGithub();
githubFileProperties.setToken("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");
githubFileProperties.setUser("shengdingbox");
githubFileProperties.setRepository("static");
final GithubApiClient githubApiClient = new GithubApiClient(fileProperties);
final String s = githubApiClient.uploadInputStream(fileInputStream, "123.png");
System.out.println(s);
}
use of com.zhouzifei.tool.config.GithubFileProperties in project simpleFS by shengdingbox.
the class GithubApiClient method init.
@Override
public GithubApiClient init(FileProperties fileProperties) {
final GithubFileProperties githubFileProperties = fileProperties.getGithub();
this.repository = githubFileProperties.getRepository();
this.token = githubFileProperties.getToken();
this.user = githubFileProperties.getUser();
return this;
}
Aggregations