Skip to content

docs(market): fix Java getRankList example to use RankListOptions - #1250

Open
hogan-yuan wants to merge 1 commit into
mainfrom
fix/java-rank-list-doc
Open

docs(market): fix Java getRankList example to use RankListOptions#1250
hogan-yuan wants to merge 1 commit into
mainfrom
fix/java-rank-list-doc

Conversation

@hogan-yuan

Copy link
Copy Markdown
Member

Fixes #1249.

The Java example for the rank-list (人气排行榜) API called ctx.getRankList("hot_all-us", false) with positional args, but the Java API takes a RankListOptions object:

RankListOptions opts = new RankListOptions();
opts.key = "hot_all-us";
opts.needArticle = false;
var resp = ctx.getRankList(opts).get();

Updated the Java example in all three languages (en / zh-CN / zh-HK). The Rust / Python / Node.js / C++ examples in the same page were already correct.

The accompanying runtime crash (JNI call failed) is fixed separately in longbridge/openapi#587.

The Java example called getRankList("hot_all-us", false), but the Java
API takes a RankListOptions object (key, needArticle), not positional
args. Updated the example in all three languages (en / zh-CN / zh-HK).

Reported in #1249.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

人气排行榜的获取文档跟api参数不一致

1 participant