使用接口来创建 BilibiliAPI 实例

This commit is contained in:
czp 2018-03-16 09:38:14 +08:00
parent 7e31fb4900
commit 693f96f180
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@
# 添加依赖
## Gradle
compile group: 'com.hiczp', name: 'bilibili-api', version: '0.0.9'
compile group: 'com.hiczp', name: 'bilibili-api', version: '0.0.10'
# 名词解释
B站不少参数都是瞎取的, 并且不统一, 经常混用, 以下给出一些常见参数对应的含义

View File

@ -63,14 +63,14 @@ public class BilibiliAPI implements BilibiliServiceProvider, BilibiliCaptchaProv
this.bilibiliAccount = BilibiliAccount.emptyInstance();
}
public BilibiliAPI(BilibiliAccount bilibiliAccount) {
public BilibiliAPI(BilibiliSecurityContext bilibiliSecurityContext) {
this.bilibiliClientProperties = BilibiliClientProperties.defaultSetting();
this.bilibiliAccount = new BilibiliAccount(bilibiliAccount);
this.bilibiliAccount = new BilibiliAccount(bilibiliSecurityContext);
}
public BilibiliAPI(BilibiliClientProperties bilibiliClientProperties, BilibiliAccount bilibiliAccount) {
public BilibiliAPI(BilibiliClientProperties bilibiliClientProperties, BilibiliSecurityContext bilibiliSecurityContext) {
this.bilibiliClientProperties = bilibiliClientProperties;
this.bilibiliAccount = new BilibiliAccount(bilibiliAccount);
this.bilibiliAccount = new BilibiliAccount(bilibiliSecurityContext);
}
@Override