Skip to content

[Cangjie] Add new service#11789

Open
Zxilly wants to merge 2 commits intobadges:masterfrom
ZxillyFork:master
Open

[Cangjie] Add new service#11789
Zxilly wants to merge 2 commits intobadges:masterfrom
ZxillyFork:master

Conversation

@Zxilly
Copy link
Copy Markdown

@Zxilly Zxilly commented Apr 7, 2026

Implemented a new Cangjie service for the Cangjie package ecosystem to provide version badges.
This PR adds the base service, version badge endpoint, and related tests.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Messages
📖 ✨ Thanks for your contribution to Shields, @Zxilly!

Generated by 🚫 dangerJS against b755ae2

@PyvesB
Copy link
Copy Markdown
Member

PyvesB commented Apr 11, 2026

Hello @Zxilly ! 👋🏻 Thanks for the contribution! Is there any documentation on the registry API? Would there be a way to get a native JSON response?

@PyvesB PyvesB added the service-badge New or updated service badge label Apr 11, 2026
@Zxilly
Copy link
Copy Markdown
Author

Zxilly commented Apr 11, 2026

Sorry, this document is available only in Chinese. https://pkgdocs.cangjie-lang.cn/docs/zh/1.0.0/central-repo/source_zh_cn/appendix/api.html

@Zxilly
Copy link
Copy Markdown
Author

Zxilly commented Apr 11, 2026

Some curl command can be used as test.

curl -L -sS "https://pkg.cangjie-lang.cn/registry/index/un/ic/unicode_case"
curl -L -sS "https://pkg.cangjie-lang.cn/registry/index/f_/st/f_store?organization=fountain"

@PyvesB
Copy link
Copy Markdown
Member

PyvesB commented Apr 11, 2026

I'm not seeing any information on rate-limits. Are there any constraints on the usage of this API?

@Zxilly
Copy link
Copy Markdown
Author

Zxilly commented Apr 11, 2026

The official documentation does not provide specific rate limit values, but based on my own testing, the API continues to function normally even when the RPS exceeds 100. Since the service that supports index queries appears to be an object storage system, I suspect that even if there is a rate limit, it must be set to a very high value.

@PyvesB
Copy link
Copy Markdown
Member

PyvesB commented Apr 11, 2026

Okay, I'd say it's acceptable to move forward with this API. Could you switch from BaseService to BaseJsonService?

@Zxilly
Copy link
Copy Markdown
Author

Zxilly commented Apr 11, 2026

The index method returns data in JSONL format rather than JSON, so I think it will be difficult to migrate to BaseJsonService.

@jNullj
Copy link
Copy Markdown
Member

jNullj commented Apr 11, 2026

Should we make a new base-jsonl base service here?
I don't mind adding a pr and you rebase from it, or you can add it yourself in this PR (see core/base-json for context.
This will provide cleaner code and fall into our existing boilerplate.
Also useful for future code reuse if any other service needs jsonl.

@Zxilly
Copy link
Copy Markdown
Author

Zxilly commented Apr 11, 2026

I will add a base-jsonl service

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

Labels

service-badge New or updated service badge

Development

Successfully merging this pull request may close these issues.

3 participants