TwitterSharp icon indicating copy to clipboard operation
TwitterSharp copied to clipboard

implemented NextTweetsAsync for GetTweetsFromUserId

Open bmclane opened this issue 2 years ago • 12 comments

bmclane avatar Dec 14 '22 18:12 bmclane

The PR itself looks good to me but the main issue is that it would break the compatibility with the previous version What do you think of it, @marcogruhl ?

Xwilarg avatar Dec 14 '22 18:12 Xwilarg

if breaking compatibility is a big issue here, could add this, but was attempting to keep the next token functionality the same for User and Tweet Lists: public Func<Task<Tweet[]>> LoadNextTweetsAsync; and set the function inside GetTweetsFromUserIdAsync,

LoadNextTweetsAsync = data.Meta.NextToken == null ? null : async () => await NextTweetsAsync(query, data.Meta.NextToken, Endpoint.UserTweetTimeline);

bmclane avatar Dec 14 '22 22:12 bmclane

The PR itself looks good to me but the main issue is that it would break the compatibility with the previous version What do you think of it, @marcogruhl ?

It looks good to me too. It extends the functionality and make it more consistent with the other functions. That said, i dont like, that only one function is "updated". If there are breaking changes we should do it for all functions with next_token consistently. Maybe also do it more general. E.g. Combine NextTweetsAsync and NextUsersAsync into one function with generic return. But this can be done later without breaking changes ...

marcogruhl avatar Dec 14 '22 23:12 marcogruhl

I just came across the idea to use an optional out parameter for the next token to avoid breaking changes. not completely aware if this works. i remember similar discussions for the rateLimits. That said, this PR could be the start of a new major release and i will refactor the rateLimit functionality!? So every answer had data, ratelimit and data (array or object) @bmclane sorry for the unconviniances @Xwilarg what do you think about the major release idea?

marcogruhl avatar Dec 16 '22 07:12 marcogruhl

We could use that to make a new major, it would be interesting to see if there is any other breaking change we want to push with it tho

Xwilarg avatar Dec 16 '22 11:12 Xwilarg

No worries @marcogruhl, I added the previous token to finish the next/previous token handling.

bmclane avatar Dec 16 '22 17:12 bmclane

@Xwilarg where to go from here? 3.0 branch for breaking PRs?

marcogruhl avatar Dec 27 '22 23:12 marcogruhl

I guess we can make a new branch for the 3.0 and merge it there instead of master

Xwilarg avatar Dec 27 '22 23:12 Xwilarg

Happy new year!

between the days i found some time to try some ideas for V3. you can look at it under my branch (based on @bmclane #46 ): GeneralRequest

My intention for this is to make a "general request" like GetEndpoint(id) => Request(id, Endpoint) so we can implement every endpoint with mostly one line of code.

I would define the primary goals for V3:

  • Full App-Scope implementation
  • RateLimit response with every request

secondary goals:

  • Full User-Scope implementation
  • 3-legged OAuth

so far:

  • Full tweet endpoints implementation
  • working general requests
  • less breaking implementation of @bmclane PR (inherit from List for Page/Response (RArray) object
  • problems with user scope (auth)
  • remove RateLimit eventhandler or keep it in parallel?

Any thoughts about this?

marcogruhl avatar Jan 01 '23 14:01 marcogruhl

Happy New Year, I think it's a good idea

I'm also using this topic to ask you if you would like to speak directly about that on some others platform such as Discord, I think it would help to move things quicker especially on a topic such as this one that goes over the scope of the current PR

Xwilarg avatar Jan 01 '23 14:01 Xwilarg

Happy New Year, I think it's a good idea

I'm also using this topic to ask you if you would like to speak directly about that on some others platform such as Discord, I think it would help to move things quicker especially on a topic such as this one that goes over the scope of the current PR

send you a friend request. maybe we can open a channel with @bmclane and others (later hopefully 😅)

marcogruhl avatar Jan 01 '23 15:01 marcogruhl

Looking forward to having usage of the next_time for my use case. If there is a branch for this I'm happy to trial this in my own app.

jamescarter-le avatar Mar 16 '23 20:03 jamescarter-le