mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-30 06:37:36 +00:00
[Change] 调整搜索接口返回数据中Attribute的Enum存放位置;
[Change] PixivSearchLinkBuilder 调整SuppressWarnings注解; [Deprecated] PixivSearchLinkBuilder.SearchArea.jsonKey 将属性标记deprecated; [Add] PixivSearchAttribute 增加搜索结果属性枚举类, 用于代替`PixivSearchLinkBuilder.SearchArea.jsonKey`;
This commit is contained in:
parent
1a3f99685b
commit
d003601c34
18
src/main/java/net/lamgc/cgj/pixiv/PixivSearchAttribute.java
Normal file
18
src/main/java/net/lamgc/cgj/pixiv/PixivSearchAttribute.java
Normal file
@ -0,0 +1,18 @@
|
||||
package net.lamgc.cgj.pixiv;
|
||||
|
||||
public enum PixivSearchAttribute {
|
||||
|
||||
ARTWORKS("illustManga"),
|
||||
TOP("illustManga", "novel"),
|
||||
ILLUSTRATIONS("illust"),
|
||||
MANGA("manga"),
|
||||
NOVELS("novel")
|
||||
;
|
||||
|
||||
public final String[] attributeNames;
|
||||
|
||||
PixivSearchAttribute(String... attributeNames) {
|
||||
this.attributeNames = attributeNames;
|
||||
}
|
||||
|
||||
}
|
@ -15,7 +15,7 @@ import java.util.Objects;
|
||||
* @author LamGC
|
||||
* @see PixivURL#PIXIV_SEARCH_CONTENT_URL
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@SuppressWarnings({"unused", "UnusedReturnValue"})
|
||||
public class PixivSearchLinkBuilder {
|
||||
|
||||
private final String content;
|
||||
@ -296,13 +296,18 @@ public class PixivSearchLinkBuilder {
|
||||
*/
|
||||
NOVELS("novel");
|
||||
|
||||
/**
|
||||
* 可用的Json属性名
|
||||
* @deprecated 该属性信息以移至 {@link PixivSearchAttribute}
|
||||
* @see PixivSearchAttribute
|
||||
*/
|
||||
@Deprecated
|
||||
public final String jsonKey;
|
||||
|
||||
SearchArea(String jsonKey) {
|
||||
this.jsonKey = jsonKey;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user