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

Support Twitter's API 1.1 , v1 goes away in March 2013 #15

Open
akrherz opened this issue Feb 6, 2013 · 7 comments
Open

Support Twitter's API 1.1 , v1 goes away in March 2013 #15

akrherz opened this issue Feb 6, 2013 · 7 comments

Comments

@akrherz
Copy link

akrherz commented Feb 6, 2013

Looks like version 1 is depreciated in early March!

https://dev.twitter.com/blog/planning-for-api-v1-retirement

Not sure if this breaks any of the code or not. Just investigating myself. Thanks again for this library

@akrherz
Copy link
Author

akrherz commented Feb 11, 2013

Yeah, this breaks things. For example, statuses/update.xml is no longer supported.

@ralphm
Copy link
Collaborator

ralphm commented Feb 11, 2013

I looked into it today. Changing over the API version isn't that hard. However, all API requests now have to be authenticated, with OAuth. Most of the examples have to be redone for this. And indeed XML is now no longer supported. Fortunately, the streaming API implementation is already parsing JSON, so I think we can change around some things so that those object classes can be used for the 'normal' API as well.

@akrherz
Copy link
Author

akrherz commented Feb 24, 2013

Attempting to research this some more and am hitting this issue

https://dev.twitter.com/discussions/11280

The symptom was for statuses/update.json requests that worked in version 1 failed in 1.1 with http error 401 and twitter error code 32. Figured I would dump something here as perhaps it may help somebody else. I'm still boggling how to fix it.

update , looks like the problem is with messages with a '/' in them
twitter.update( 'test test') works
twitter.update( 'test / test') fails

urllib.quote does not convert / , maybe it should be urllib.quote_plus ?

@akrherz
Copy link
Author

akrherz commented Mar 30, 2013

7 May 2013 is the last day for v1
https://dev.twitter.com/blog/api-v1-retirement-final-dates

ralphm added a commit to ralphm/twitty-twister that referenced this issue May 27, 2013
Twitter has harmonised the version numbers of the Streaming API
endpoints so that they are all numbered 1.1. All previous endpoints have
been deprecated and will stop working Real Soon Now™.

This partially addresses dustin#15.
ralphm added a commit to ralphm/twitty-twister that referenced this issue May 27, 2013
@ralphm
Copy link
Collaborator

ralphm commented May 27, 2013

As the retirement date for the v1 API has been extended to June 11, I took some time to look at this again.

  • I moved the abstraction objects to their own module twittytwisted.platform.
  • As all requests must be authenticated now, using OAuth, I removed all non-OAuth authentication code, raising a warning when you try to use the old user/passwd and raising an exception when you didn't provide OAuth credentials. The examples still need to be adjusted.
  • I started using Treq for rewriting the request code. This is a nice request API on top of the newer Twisted Web Agents code, and allows for removing a bulk of custom request code currently in twitty-twister. Also, it supports HTTP 1.1, unlike the existing code that still uses HTTP 1.0, which is now deprecated.

It turns out that a bunch of the methods use API endpoints that were either deprecated or removed in API v1, and no longer exist in v1.1. Also, the way paging is done has changed and the old way doesn't work anymore. I'm wondering if it is worthwhile to convert these methods or just drop them.

To whoever is reading this, which methods of twittytwisted.twitter.Twitter do you use? Also, what do you think of the current way it works, with delegate functions that are called for each item for API calls that return a list of things?

@mmichie
Copy link

mmichie commented Aug 10, 2013

Hey just started playing with this library yesterday and just now realized the update method doesn't work with twittytwisted.twitter.Twitter. I can get streaming updates with the TwitterFeed, but I need to be able to write out status to the timeline.

What can I do to help?

@ralphm
Copy link
Collaborator

ralphm commented Aug 11, 2013

@mmichie: basically Twitter deprecated and shutdown the old API endpoints. This library supports v1.1 for the Streaming API, but the other APIs, like the update one you mention, require a whole bunch of non-trivial changes as outlined above. So far, nobody has expressed enough interest to work on this, and I personally only use the Streaming API stuff.

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

3 participants