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

[Change suggestion] Refactor client connector code #53

Open
whatvn opened this issue Nov 12, 2020 · 0 comments
Open

[Change suggestion] Refactor client connector code #53

whatvn opened this issue Nov 12, 2020 · 0 comments

Comments

@whatvn
Copy link

whatvn commented Nov 12, 2020

Current code base relies on client connection interface to send request to Microsoft Bot API which is limit in only 2 methods:

// Client provides interface to send requests to the connector service.
type Client interface {
	Post(url url.URL, activity schema.Activity) error
	Delete(url url.URL, activity schema.Activity) error
}

Although it's enough to interact with activity, but it makes the code limit to activity usage only, we can only send and delete activity where provider API provides many other API for the bot itself.

Suggestion:

  1. Client interface can be extended/modified so that it can include response in return values, client can then send request based on active activities, while still can reuse response from Microsoft to process response themself
  2. Add full request method to client interface (GET, PUT), as Microsoft provides api with these method also.

Any input? I would love to submit a PR if necessary.

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

No branches or pull requests

1 participant