You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't look like any of these requests support caller-defined contexts. @KnutZuidema would you support it if I opened a PR that adds ...WithContext functions for all existing API requests?
For example, I'd add GetByAccountIDWithContext(ctx context.Context, ...), GetByPUUIDWithContext(ctx context.Context, ...) etc etc for summoner routes.
I'm thinking I'd bubble that context down to a duplicateClient.DoRequestWithContext(ctx context.Context, ...) that adds a context to the request with request.WithContext
The text was updated successfully, but these errors were encountered:
@harmonherring makes sense to add these. However, instead of creating new methods next to the existing ones, I would bump the major version of the library instead and replace/update the existing methods.
@KnutZuidema in regards to moving to a v2 API, is that something you feel like you want to do or could we help with this? Having a request context can be very good since this library is interacting with third party. Don't want to waste resources/potential rate limiting.
Just wanted to ask since I feel that it will be a pretty big bump in the library and maybe you'd like control of that
Adding to this. Maybe it would be possible to add the option pattern to solve this as well without breaking the backwards compatability of the library.
It doesn't look like any of these requests support caller-defined contexts. @KnutZuidema would you support it if I opened a PR that adds
...WithContext
functions for all existing API requests?For example, I'd add
GetByAccountIDWithContext(ctx context.Context, ...)
,GetByPUUIDWithContext(ctx context.Context, ...)
etc etc for summoner routes.I'm thinking I'd bubble that context down to a duplicate
Client.DoRequestWithContext(ctx context.Context, ...)
that adds a context to the request withrequest.WithContext
The text was updated successfully, but these errors were encountered: