Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A puppet used to encapsulate OpenAPI. #27

Open
atorber opened this issue May 13, 2022 · 1 comment
Open

A puppet used to encapsulate OpenAPI. #27

atorber opened this issue May 13, 2022 · 1 comment

Comments

@atorber
Copy link

atorber commented May 13, 2022

Is your feature request related to a problem? Please describe.

Recently, I learned wechaty openapi, which is a very exciting feature. When I saw it, I was thinking about how to use it.

As a serious SDK dependency, I suggest that we encapsulate the API call method into a puppet, such as puppet-http or puppet-api, so that we can fully use Wechaty instances in another stateless service to call all the above APIs instead of a separate SDK.

Like this, when I want to call the API request GET /contacts, I will use const contactList = await bot.Contact.findAll() .

@huan
Copy link
Member

huan commented May 17, 2022

Thanks for proposing this idea!

I suggest that we encapsulate the API call method into a puppet

Indeed I have the same idea, and I definitely agree with you: we should have a Puppet for OpenAPI.

such as puppet-http or puppet-api

How about wechaty-puppet-openapi? It's very clear and straightforward.

The Puppet implementation can use the Swagger OpenAPI generator; most code can be generated automatically.

@huan huan transferred this issue from wechaty/wechaty May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants