How do their APIs compare?
How do their APIs compare?
About binarywang/wxjava · 2 messages · last activity 9/9/2026
Comparing these two projects requires distinguishing what "API" means in each, since they serve very different purposes.
binarywang/wxjava — SDK-style client APIs
WxJava exposes Java client library APIs that wrap WeChat's own HTTP/XML/JSON interfaces (公众号, 小程序, 企业微信, 支付, 开放平台, 视频号, etc.). The pattern shown in the README is:
- Instantiate a config object (e.g.
WxMpDefaultConfigImpl,WxMaDefaultConfigImpl) and set credentials like appId/secret [README.md:L190-L206]. - Instantiate a service (
WxMpServiceImpl,WxMaServiceImpl), inject the config, and call typed methods such asgetAccessToken()orgetUserService().getSessionInfo(...)[README.md:L207-L219].
For the mini-program (小程序) message-handling flavor, there's a router/handler API: WxMaMessageRouter lets you register WxMaMessageHandler lambdas keyed on message content (e.g. .rule().content("文本").handler(textHandler)), and handlers call back into sub-services like service.getMsgService().sendKefuMsg(...), service.getMediaService().uploadMedia(...), or service.getQrcodeService().createQrcode(...) [others/weixin-java-config/README.md:L166-L200, L241-L264]. Config for multi-account setups is done via @ConfigurationProperties-annotated classes like WxCpProperties for 企业微信 [others/weixin-java-config/README.md:L269-L276].
So wxjava's "API surface" is: Java method calls mirroring WeChat's own remote API contract, with the contribution guidance explicitly stating that new methods must match "微信官方接口定义" (WeChat's official interface definitions) for paths, methods, field names, required params, and response structure [skills/wxjava-api-contributor/references/contribution.md:L3].
novicezk/midjourney-proxy — REST DTO/VO-based web API
midjourney-proxy is a proxy server exposing its own REST endpoints (not a client SDK), using Spring-style DTOs for requests and VOs for responses, documented with Swagger/@ApiModel annotations:
SubmitChangeDTO— request body for upscale/variation/reroll actions, withtaskId,action(enumTaskAction), andindex(1–4) [src/main/java/com/github/novicezk/midjourney/dto/SubmitChangeDTO.java:L13-L24].SubmitImagineDTO,SubmitDescribeDTO,SubmitSimpleChangeDTO— other task-submission DTOs, all extending a commonBaseSubmitDTOvia@EqualsAndHashCode(callSuper = true)[src/main/java/com/github/novicezk/midjourney/dto/SubmitImagineDTO.java:L1-L13; SubmitDescribeDTO.java:L1-L10; SubmitSimpleChangeDTO.java:L1-L11].SubmitResultVO— the uniform response shape for all submission endpoints: acode,description,result(task ID), and an extensiblepropertiesmap with fluentsetProperty/getPropertyhelpers and static factoriesof(...)/fail(...)[src/main/java/com/github/novicezk/midjourney/result/SubmitResultVO.java:L12-L59].
Internally, midjourney-proxy also talks to Discord's gateway over WebSocket to drive Midjourney bot interactions — e.g. SpringWebSocketHandler builds Discord IDENTIFY payloads with a fake browser/user-agent fingerprint (createAuthData) and manages heartbeat timers [src/main/java/com/github/novicezk/midjourney/wss/user/SpringWebSocketHandler.java:L194-L227], and SpringUserWebSocketStarter coordinates connect/reconnect and lock-based async notification of success/failure codes [src/main/java/com/github/novicezk/midjourney/wss/user/SpringUserWebSocketStarter.java:L145-L184]. That's not a public API for consumers — it's the internal mechanism the proxy uses to submit tasks to Midjourney
Want to ask your own question?
Open chat for binarywang/wxjavaPublic Q&A. Generated by RepoPilot from the actual source of binarywang/wxjava. AI answers can be incomplete or stale — verify before relying on them.