修改了DoubanSubjectObj某些字段的@Key使得SDK能够获取attribute,tag字段数据 #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
com.dongxuexidu.douban4j.service.DoubanBookMovieMusicService#getMusicInfoById
这个方法无法获取db:attribute或者db:tag的字段。
其它类似的方法应该也有类似问题。
样例请求:
https://api.douban.com/music/subject/4753298
原因是在于sdk中请求的是https的douban API,而https的API对应的alias是db2而不是db。
因此google的api在反序列化的时候没有把attribute和tag字段转换出来。
将java bean里相应字段的@key改为db2就可以了。
如下方法测试通过:
com.dongxuexidu.douban4j.service.DoubanBookMovieMusicServiceTest#testGetMusicInfoById
ps. 另外不小心修改了.gitignore也提交了,只是忽略掉idea IDE相关的文件,干脆也一并PR了。:)