-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TwitterBridge] Migration to API V1.1 #2433
Conversation
Currently only search by username without filters is migrated. Also the PR currently contains garbage and debug elements. |
I hope V2 will have a way to filter out Pinned Tweet, Promo Tweet and any Reply to another user. I'm only want self-Reply from that user and old PR has done a great job from doing this. |
I will later add this filter again. It's currently commented out until i matched everything back to tweet structure from V1.1 Looks like for V2 authentication has to be changed again, based on some quick tests i made |
FWIW, I am running this branch for a few hours and it is way more "stable" than |
Added API call to fetch user object.
…added generic makeApiCall funtion
Also commented out some not anymore used functions
@anyone using this branch: It would be nice go get some feedback about whats broken or changed on the output side. For some cases I'm missing data to compare it with past behavior and I'm also missing old API documentation. So I'm currently trying my best to match everything from reading the old code against official API documentation. |
Disclaimer: Not trying to advocate for one behavior over another, just trying to list differences that I've noticed.
which Twitter then resolves to: https://twitter.com/Twitter/status/1484314336772321282 ("Twitter Retweeted foo") Previous behavior would have been to just link straight to: https://twitter.com/TwitterBlue/status/1484226494708662273 The current behavior also won't show replies when you open the URL unless you click on the tweet's time to go to the tweet itself. This behavior also impacts any feed reader that used URL to detect duplicate entries, for better or worse. Username behavior has also changed, and would have been "TwitterBlue (@\TwitterBlue) RT: @\Twitter"
I'm sleep deprived and that's everything that comes to mind at the moment. Thank you for picking up this torch and running hard with it from the get-go. Edit: corrected username behavior and attempted to remove account pinging. |
@linoth Thanks for the input
|
hm, doesn't seem to work for me at all. I get latest one just now from https://raw.githubusercontent.com/arnd-s/rss-bridge/migrate_to_api_1.1/bridges/TwitterBridge.php and replace original one from
UPDATE: Minor downtimes of few minutes and restarts didn't help. But after disabling rss-bridge twitter bridge for half a day, and enabling it again, now it seems to work ok! |
Yesterday evening deployed on https://feed.eugenemolotov.ru/pr2433/
My feed reader uses one feed on that deployment. 40 minutes between queries. |
@mnalis This looks like expired/invalid authentication information. I will rewrite some code today and try to catch this kind of error or at least return a more informative error message to solve this. @em92 Do you got also 403 errors ? @linoth the noimgscaling option has no use. This was also the case for old code before i started the rewrites. The parts for embedding images wasn't touched by me so far. |
getapikey will normaly now only called once and store all required data inside class object. When an API call fails with status code 403 the API keys will be renewed and the query will be tried a second time.
You can also edit report_limit under |
False alert here. |
I am almost ready to merge this. I have left comments that need to be resolved before merge: https://github.com/RSS-Bridge/rss-bridge/pull/2433/files |
@em92 if the thing holding us up are your reviews on the "instead of comment out, remove", we can just do that in github ui, merge the recommendations and be done with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all the commented out lines.
Pull request artifacts
|
There we go. I removed all commented lines that were not needed and updated the examplevalues. The "by hashtag" had a wrong syntax in it's examplevalue and the "by list" had no list name at all. "by list" now retrieves the same list id as the "by list id" one. @em92 you can merge this if it pleases you now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linting and fixing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line fixing
Okay... NOW its fine :) |
Thanks @Bockiii Sorry for not responding the last weeks. I was rather busy and occupied. I will adept the getContents call to the new exception based handling from lib/contents.php until tomorrow. If their are no further problems or blocking points, a merge would be good. New PRs can then be made for further fixes/tweaks. |
…m global lib instead own internal privat method
I removed the private method getContents and make use of the new exception class. |
Alright, I think we are fine. Thanks to everyone involved in writing and testing! |
[TwitterBridge] Migration to API V1.1
Migrate all API calls to V1.1 This is an intermediate PR, so the bridge will be working again.
Final goal should be a move to V2.0