ignacio-chiazzo / ruby_whatsapp_sdk

A lightweight, efficient Ruby gem for interacting with Whatsapp Cloud API.
https://ignacio-chiazzo.github.io/ruby_whatsapp_sdk/
MIT License
161 stars 36 forks source link

Allow users to optionally specify API version #126

Closed conr closed 8 months ago

conr commented 9 months ago

Curious to get some thoughts and opinions on this approach so far 🙂

Allow users to configure a specific version of the API. By default, fallback to the latest version of the API hardcoded in api_configuration.rb.

WhatsappSdk.configure do |config|
  config.access_token = ACCESS_TOKEN
  config.api_version = "v16.0"
end
conr commented 9 months ago

Could you add validations to the value passed? We could have a file that lists all the possible apis.

Yes, sounds good 👍🏻