Closed DanielHeath closed 10 years ago
A fork for this has already been started.
In the meantime you can already set the gem to use V2 by setting config.version = "v2"
in your initializer.
If you'd like to set it to be the default sooner, please fork the gem and submit a pull request, I'll gladly pull it in. I believe the V2 API is backwards compatible with V1, it just had new options. All that has to happen to switch the library to V2 by default should be changing https://github.com/zencoder/desk/blob/master/lib/desk/configuration.rb#L67.
Just so it's clear, there's a fair amount that needs to be changed.
FYI, partial compatibility can be established for v2 just by adding
request.headers['Content-Type'] = 'application/json'
into request.rb line 49. I'll try to keep working along these lines if I have time...
Unfortunately, some V1 stuff seems to be broken as well, for example, an update_customer_email request returns:
Faraday::Error::ParsingError: 757: unexpected token at '<!DOCTYPE html>...
<title>Desk.com - Page Not Found (404)</title>
Followed by a complete 404 html page. SO! Fun ahead :)
What's the status on this? @chriswarren you said a fork has been started, is this still accurate? If so is it available for testing anywhere? We need to upgrade soon - I'll dig in if nobody is working on it, but don't want to duplicate existing work...
We're still working on it, and are close to having something to release. Desk has pushed V1 EOL back to Feb 15, 2014. Current rewrite is at https://github.com/colinc/desk/tree/api-v2-rewrite, and will be merged in to this branch once we've finished doing some final testing.
@chriswarren things are getting scary out here in Ruby land! How's the rewrite coming?
@mbhnyc Thanks for reminding me, I just submitted a pull request for my rewrite. We're using it in production and haven't had any problems (with the Ruby code anyways). The Desk.com API v2 still has a number of bugs that I know of (a few annoying, two critical). I reported some of them 6+ months ago but hopefully they'll be fixed before the Feb 15th cutoff.
Oi, sounds like they need another delay!
I just published 1.0.0 to Rubygems, which includes all of @colinc's great work. Check it out, and if there are any issues let us know (or patch them and send a pull request).
:+1:
Fantastic! :) Great work!
http://dev.desk.com/ informs me the API this gem connects to is going away.