I've tried putting an API config property in both config/application.rb and config/initializers/koala.rb
Koala.config.api_version = "v2.2"
How can i tell if it's using v2.2? the POST url isn't giving me any clues and the logs are giving any post params (i'm using put_connections so I don't think i can control that)
Trust the initializer
Open a $ rails console
and check the attributes of the class Koala that has already been instantiated at run time by running $ Koala.config.version
you should see the value and that is what Rails will use.
When you start a rails console, it will load the environment in the same way as the rails server. Giving you a true representation in this case.
This would be enough proof for me, it is the only place defining a version unless you are defining it per request like the docs example:
@graph.get_object("me", {}, api_version: "v2.0")
Do some debugging
If you really just want to see the number in use, use a gem called pry and add binding.pry
just before you call the api. Try to run the code again but this time check your server logs and you now have an interactive shell for investigation.
Run your version of the following:
@graph.inspect
@graph.put_connections(...).inspect
This should give you a more detailed view of the request. Somewhere inside will hopefully be the version number.