First time here? Check out the FAQ!
answered 2016-05-13 09:33:58 -0600
I posted an example of how to do this on Gist at GitHub
Have a look and see if this helps you.