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
Version 1.1 of Twitter API, migration #31
Comments
If anyone is using the branch api_v1.1 can they tell me if upgrading the libraries caused any problems. If you can help me with the syntax changes I will be very grateful. |
That branch is for the person who offered to help work on it - I have not It's very much a work in progress with nothing committed yet. On Sun, Feb 17, 2013 at 11:37 AM, QuotesUK notifications@github.com wrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
Thank you bear. Are you able to tell me whether v0.8.7 of twitter.py has been tweaked to work with the new JSON syntax of API v1.1... should I be upgrading twitter.py at this stage or should I wait for a while? |
I have not yet updated it to v1.1 of the API - I was giving one contributor It will probably be a week or so before I have anything even for testing. On Tue, Mar 5, 2013 at 11:54 AM, QuotesUK notifications@github.com wrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
Thank you for the quick reply... I will keep an eye open for the update. And another thank you for all the work you do to keep twitter.py running for us. It is very much appreciated. |
your welcome! I'm glad that the tech/problem itch DeWitte and myself needed to scratch oh On Tue, Mar 5, 2013 at 12:10 PM, QuotesUK notifications@github.com wrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
It seems twitter dropped support for 1.0 api today. |
they are "testing" the dropping of support by having planned outages - they I'm tracking the tests and working on the v1.1 api code for python-twitter On Tue, Mar 5, 2013 at 12:39 PM, Domen Kožar notifications@github.comwrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
So as time runs out, how should we do this? Do you need help? |
oh yea, do I ! my thought is that we need to move to a more modern requests library to pick up a lot of other features, but for sure we need the first step of going thru the current code and finding out what the v1.1 API method would be. that way we can find out if we need new code or not or what the heck is required. there is a v1.1 branch, please do just start working on that to start making any parts of it work. i'll add you as a contributor now to make that part easier |
I'm a newcomer to Python. I would be very grateful if someone could help me understand how to adapt to the new structure of JSON responses. I understand this is more of an implementation issue rather than API development but I'm stuck because of a lack of documentation and examples, and don't know whether the new syntax requires me to: What I would like to see is a worked example that shows me how to work with https://stream.twitter.com/1.1/statuses/filter.json and grab selected fields to be inserted into a mysql database. I already have this working in api v1. |
this is why I added you as a contributor :) in the v1.1 branch, make a copy of twitter.py and then start hacking on one of the methods and add as many print's debug stuff or whatever then we can all see the code example and start commenting on the checking or just making changes but yea, the core issue will be translating the result to the internal structures that we already have. we need to maintain the same class structure we have, so most will be changing the json-to-dict methods |
I updated the GetSearch() function. I already committed it to avoid duplicate work. I would suggest we commit every function as a commit so that we keep up-to-date with each other as complete as possible. What do you think? |
That sounds like a great idea. We may need to create a list of APIs that need working on - then we can make note on who is working on what. |
I made a page in the Wiki with all twitter.Api function that use an URL. We can mark a function when we start working on it. https://github.com/bear/python-twitter/wiki/ApiUpdate |
Hi, at @theneeds we're using the python-twitter library and we'll be happy to contribute to v1.1 as May 7th is approaching :) Is the above list still maintained? Can we sync with you guys to avoid duplicated work? Unless you stop us, we will start with GetFollowers and PostDirectMessage. We expect to send you some code in the next few days. |
That page is current - i've been adding to it as I fix issues and convert items. I welcome any help you can give - work and life has been busy so my focus has not been steady on python-twitter. should I enabled your account for access or another one on your team? |
Me and @git-matrix will work on this |
ok, you both have been added to the contributors list. thanks! |
Yes, I've been unable to work on it the last few days, also busy. :( I hope I can add a few things again soon but every help is appreciated. |
i'm assuming this is still open because you still aren't on the v1.1 api? suddenly started getting errors while testing today and twitter says they're doing another blackout test so... :P i might take a look at this and see if i can't help move it to the new api when i have time. |
I think all the API calls that were in there are done now. There are a hand full of new ones that are missing and the json data structures for the objects are not all checked/updated. But the basic functionality should be there with 1.1. |
yeah - discovered that i just needed to switch to the v1.1 branch. i did that and rebuild/reinstalled and everything stopped breaking. what's the timeline on moving the v1.1 branch to master? |
sometime this weekend (it's a long holiday weekend and I tend to "catch up" then I will take the current trunk and make that a branch for safety and I will probably do some heavy testing before then, but yea, expect it to be On Wed, May 22, 2013 at 5:17 PM, dunvi notifications@github.com wrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
Has it been four months since my original post? Wow, how time flies! I am still using v1 of the API for my site and looking forward to the upgrade when it is ready. If it's not too much trouble to ask, when the new trunk is ready, please could someone give me a pointer on comparing how to reference the old JSON structure with the new v1.1 JSON structure... I'm pretty good at figuring things out if I'm given a nudge in the right direction but working with Python is new for me and I welcome any help that is offered. |
the old to new json documentation/translation will be the hardest part IMO so yea, we should offer something On Wed, May 22, 2013 at 6:04 PM, QuotesUK notifications@github.com wrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
I'm also a bit scared of updating the whole json structure. Perhaps just store the decoded json dict and only translate certain values into objects? I'm thinking about utilizing getattr to get all the standard values out of the json by default and make exceptions for the values we want to handle in a special way (e.g. making objects out of them). What do you think? That would also take care of the eq comparison, we could probably just compare the original json dicts. |
Storing the original and exposing it as a source property makes a lot of Could we hash the json and use that for comparison? I guess I'm worried On Wed, May 22, 2013 at 6:18 PM, Sebastian Wiesinger <
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
Yeah, we could hash it, sounds good. I was talking about the dictionary but your idea sounds better. :) |
cool! On Wed, May 22, 2013 at 6:32 PM, Sebastian Wiesinger <
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
I'm wondering is if the JSON is actually stable or if it's structure changes between requests. |
over time the JSON is not stable, Twitter will add/remove items at will but is it stable across a session - that is where the "use for comparison" On Thu, May 23, 2013 at 2:47 PM, Sebastian Wiesinger <
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
When is new release scheduled? |
very soon - I am torn between waiting as long as possible to get more bug On Mon, Jun 3, 2013 at 7:37 AM, Domen Kožar notifications@github.comwrote:
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
Release early, release often :) |
Hi guys, So, since yesterday I'm not able to use push tweets on Twitter via the librarie:
@bear, can we have the status of the api_v1.1 branch ? |
I pushed out v1.0 of Python-Twitter to PyPI and it's now the version that https://pypi.python.org/pypi/python-twitter/1.0 so status is "please use it and let me know what broke" :) one thing we do know is that a lot of the GetFollower() and GetFriends() On Thu, Jun 13, 2013 at 3:18 AM, Julien Dubreuil
Bear bear@xmpp.org (email) PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29 |
I'm going to close this issue so people won't think that 1.1 is still pending. |
Apologies if I am asking this in the wrong place but I am looking for a helping hand in upgrading a couple of python scripts to use the new Twitter API v1.1. The scripts that I have are working with v1 but they were developed by someone else that is no longer able to work on them because they are unwell.
In a nutshell what the scripts are designed to do is connect to https://stream.twitter.com/1/statuses/filter.json and check for tweets sent to specific @usernames, retrieve the tweet data and insert them into a MySQL database. Afterwards another script does some post-processing to move desired data into other tables and then clean up. There are a couple of other non-Twitter scripts that do some general MySQL housekeeping for stats etc.
I am sure this is quite trivial for some people but I'm stumbling around in the dark because I can't find a working example of doing something similar that uses v1.1. What I need to do is go through the scripts and replace the old JSON syntax with the new one.
For example v1...
messagelog = "tweet_id=%s:screen_name=%s:time_created=%s in twitter stream (tweet.py)" % (content['id_str'],content['user']['screen_name'],msgtime)
The scripts are only needed to fetch public tweets. I don't have to worry about any user logins or authentication issues. The original author has created a working method that ensures the scripts don't make too many API connections. Everything works fine and dandy in API v1 but needs minor tweaks for v1.1.
Please point me towards somewhere else to ask for help if this is the wrong place. I've already tried dev-twitter. Any help you can offer would be appreciated. Thank you.
regards James (QuotesUK)
The text was updated successfully, but these errors were encountered: