go-twitter icon indicating copy to clipboard operation
go-twitter copied to clipboard

Add `Retweeters` support for retweeters ids

Open keaising opened this issue 5 years ago • 8 comments

Hi Dalton,

I have added a Retweeters to support Statuses.Retweeters. It contains Retweeters function in statuses.go to get user_ids which retweet specific tweet. I have also added unit tests in the style of exist tests to test the functions.

It's my pleasure for your pulling.

Shuxiao.

keaising avatar Aug 28 '19 04:08 keaising

I would be really great to have this merged, needed this functionality for my Twitter bot.

tomasnorre avatar May 24 '20 16:05 tomasnorre

I can, by the way, verify that this works like a charm.

tomasnorre avatar May 24 '20 18:05 tomasnorre

Surprised this has not been merged

Vanclief avatar Oct 25 '20 18:10 Vanclief

I know it's been ages since you created this, but can I pull it into drswork/go-twitter?

drswork avatar Jun 15 '22 07:06 drswork

I know it's been ages since you created this, but can I pull it into drswork/go-twitter?

Of course, I hope you like it.

keaising avatar Jun 15 '22 08:06 keaising

I know it's been ages since you created this, but can I pull it into drswork/go-twitter?

Just as an information I have used this fix, cherry-picked, for quite some time and never seen any issues with it.

tomasnorre avatar Jun 15 '22 10:06 tomasnorre

Excellent! I'll patch this in over the weekend with a few more of the pending updates i have on my todo list. Thanks!

drswork avatar Jun 16 '22 12:06 drswork

In and done, thanks.

drswork avatar Jun 18 '22 14:06 drswork

I've updated this:

  • Fix endpoint from retweeter/id.json to retweeters/id.json
  • Rename Retweeters to RetweeterIDs to be consistent with similar endpoint types (e.g. FriendIDs)
  • Remove StringifyIDs field from StatusRetweeterParams. Users don't get to choose underlying types and when you don't set it, the ids are int64's not strings. Also its a boolean field, not a string
  • Fix RetweeterIDs IDs type to be []int64 to align with Twitter default id type

dghubble avatar Aug 15 '22 16:08 dghubble