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

Overload classes for both platforms #2

Open
iamtraction opened this issue Sep 4, 2018 · 0 comments
Open

Overload classes for both platforms #2

iamtraction opened this issue Sep 4, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@iamtraction
Copy link
Owner

Export a class from cleverbot.js that'll allow to use cleverbot.com & cleverbot.io without any changes. It'll be seamless on the side of the developer using the library.

How can this be done?
Current idea is to check if APIUser is passed with the option. If it is, then it's cleverbot.io otherwise, cleverbot.com, because cleverbot.com doesn't need APIUser.
Another idea is to pass a new property with the option that'll distinguish if cleverbot.io or cleverbot.com should be used, but this won't be as seamless as the previous one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant