Closed ignacio-chiazzo closed 8 months ago
What do you think about creating the ruby_whatsapp_sdk_rails gem where https://rubygems.org/gems/railties can be used to create an initializer to set this value?
My suggestion is for projects where Ruby on Rails is used.
This is an basic example -> https://github.com/paulomcnally/ruby_whatsapp_sdk_rails (This repository is an example, I do not plan to release the gem)
I would like to update the library so that it is framework agnostic (not rails required). I think the setup is easy enough that devs can include it on their repo.
What's the goal of the gem?
I have seen that it is common practice to create a gem for use in rails where it gives you the benefit of generators, initializer logic through rails, etc.
It would definitely be enough to implement it in the library as you do for access_token.
Hey there @ignacio-chiazzo 👋🏻
Can you assign this issue to me?
I would love to work on it. Cheers!
Sure! Thanks
I think you accidentally assigned it to yourself 😄
Oh haha sorry, fixed!
Shall we close this issue now? 🙂
Currently, the Whatsapp API version is hardcoded here. We should expose a way for apps to set up the API version during initialization.
For example, we could provide a config method
api_version
which sets the version for all API requests.Hints
The configuration lives in
configuration.rb
. We could accept anapi_version
argument which is used across the API.If the argument isn't passed, we'd use the hardcoded version.