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

Concrete API implementations differ from one another #184

Closed
HQarroum opened this issue Nov 4, 2017 · 2 comments
Closed

Concrete API implementations differ from one another #184

HQarroum opened this issue Nov 4, 2017 · 2 comments

Comments

@HQarroum
Copy link

HQarroum commented Nov 4, 2017

Each implementations of a messaging API (e.g messaging-api-messenger and messaging-api-line) differ in their API which prevents polymorphic use-cases where I pass an instance of a messaging API to a component of my application without explicitely knowing what real API this is.

For instance, messaging-api-messenger implements the sendText method where messaging-api-line implements the pushText method for sending messages, where they could both implement the same method name.

Is there any reason behind this choice ?

@chentsulin
Copy link
Member

chentsulin commented Nov 5, 2017

It's intentional. We try to keep all of method names here to correspond with the original platform docs or API keys and do not have any hidden black magic. Accordingly, we can search keywords from official docs directly.

For example: (LINE APIs is so different from Messenger)
replyText - https://developers.line.me/en/docs/messaging-api/reference/#send-reply-message
pushText - https://developers.line.me/en/docs/messaging-api/reference/#send-push-message
multicastText - https://developers.line.me/en/docs/messaging-api/reference/#send-multicast-message

If you are looking for a framework to build your cross-platform bots, maybe you will like Bottender https://github.com/Yoctol/bottender. It is built on top of Messaging APIs.

@HQarroum
Copy link
Author

HQarroum commented Nov 5, 2017

Ok thanks for the response and the pointer!

@HQarroum HQarroum closed this as completed Nov 5, 2017
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

2 participants