Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated API calls #405

Closed
mackuba opened this issue Jun 1, 2013 · 4 comments
Closed

deprecated API calls #405

mackuba opened this issue Jun 1, 2013 · 4 comments

Comments

@mackuba
Copy link

mackuba commented Jun 1, 2013

I'm using the undocumented statuses_activity call in my program, and I got this error once a few days ago:

.../lib/ruby/1.9.1/json/common.rb:148:in `parse': 781: unexpected token at 'The Twitter REST API v1 will soon stop functioning. Please migrate to API v1.1. (Twitter::Error::DecodeError)
https://dev.twitter.com/docs/api/1.1/overview
'
  from .../json/common.rb:148:in `parse'
  from .../multi_json-1.5.0/lib/multi_json/adapters/json_common.rb:7:in `load'
  from .../multi_json-1.5.0/lib/multi_json.rb:96:in `load'
  from .../twitter-4.4.2/lib/twitter/response/parse_json.rb:13:in `parse'
  from .../twitter-4.4.2/lib/twitter/response/parse_json.rb:19:in `on_complete'
  from .../faraday-0.8.4/lib/faraday/response.rb:9:in `block in call'
  from .../faraday-0.8.4/lib/faraday/response.rb:63:in `on_complete'
  from .../faraday-0.8.4/lib/faraday/response.rb:8:in `call'
  from .../faraday-0.8.4/lib/faraday/response.rb:8:in `call'
  from .../faraday-0.8.4/lib/faraday/request/url_encoded.rb:14:in `call'
  from .../faraday-0.8.4/lib/faraday/request/multipart.rb:13:in `call'
  from .../twitter-4.4.2/lib/twitter/request/multipart_with_file.rb:14:in `call'
  from .../faraday-0.8.4/lib/faraday/connection.rb:226:in `run_request'
  from .../faraday-0.8.4/lib/faraday/connection.rb:87:in `get'
  from .../twitter-4.4.2/lib/twitter/client.rb:81:in `request'
  from .../twitter-4.4.2/lib/twitter/client.rb:64:in `get'
  from .../twitter-4.4.2/lib/twitter/api/undocumented.rb:87:in `status_activity'
  from .../twitter-4.4.2/lib/twitter/api/undocumented.rb:110:in `block in statuses_activity'
  from .../twitter-4.4.2/lib/twitter/core_ext/enumerable.rb:5:in `block (2 levels) in threaded_map'

It looks like you can now extract the favorites count from the standard Tweet items from the timeline (there was no such field there before). It would be probably a good idea to remove the deprecated calls from the gem. (I don't know which exactly are going away, I suppose probably all from Undocumented, but you'll only know after 11th June when the 1.0 API is supposed to be disabled - for now this was a one-time warning.)

@mackuba
Copy link
Author

mackuba commented Jun 1, 2013

Also, the methods in Tweet that return @attrs[:favoriters_count] are probably not needed anymore.

@sferik
Copy link
Owner

sferik commented Jun 11, 2013

It appears this resource survived today’s APIpocalypse. Are you still having issues with it?

@mackuba
Copy link
Author

mackuba commented Jun 13, 2013

I've migrated to the new version before that (i.e. I used the favorite count field that comes in the main tweet json), which actually simplified everything a lot, because I don't need to do any extra calls now or handle two kinds of fields etc. But you're right, the old version seems to be still working.

@sferik
Copy link
Owner

sferik commented Jun 30, 2013

…or not. See #419.

@sferik sferik closed this as completed Jun 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants