I've written a short Ruby script which creates a nice export of ASANA tasks into csv, however it takes a while to run because I have to do a GET for every task within each project. I found a way of using opt_expand to get all task data at once for each project which make then number a "Get"s a fraction of what it is at the moment. However the opt_expand code which works in curl does not work in Ruby, it just ignores the expand command.
Any help would be greatly appreciated,
Normal curl code[snippet1]:
curl -u <token>: https://app.asana.com/api/1.0/projects/<project_id>/tasks
Working opt_expand curl code[snippet2]:
curl -u <token>: https://app.asana.com/api/1.0/projects/<project_id>/tasks?opt_expand=.
Normal Ruby code[snippet3]:
uri = URI.parse("https://app.asana.com/api/1.0/projects/<project_id>")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
...
Broken Ruby code which returns the same as snippet 3 despite using opt_expand
uri = URI.parse"(https://app.asana.com/api/1.0/projects/<project_id>/tasks?opt_expand=.
")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
...