We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Today, there are different objects for each different domain:
medias_api = WhatsappSdk::Api::Medias.new messages_api = WhatsappSdk::Api::Messages.new phone_numbers_api = WhatsappSdk::Api::PhoneNumbers.new business_profile_api = WhatsappSdk::Api::BusinessProfile.new templates_api = WhatsappSdk::Api::Templates.new
We could simplify this by creating a singleton object Client that contains a link to the different APIs, like the following example:
Client
client.messages # => returns an instance of WhatsappSdk::Api::Messages client.medias # => returns an instance of WhatsappSdk::Api::Medias #...
That would let the API much more clear like the followiong
client = Client.new # Messages client.messages.send_text( client.messages.send_reaction( client.messages.send_image( client.messages.send_audio # Medias client.media.upload client.media.get client.media.download
attr_readers
media
messages
business_profile
phone_numbers
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Today, there are different objects for each different domain:
We could simplify this by creating a singleton object
Client
that contains a link to the different APIs, like the following example:That would let the API much more clear like the followiong
Tasks
attr_readers
:media
,messages
,business_profile
andphone_numbers
here.The text was updated successfully, but these errors were encountered: