CXuesong / WikiClientLibrary

/*🌻*/ Wiki Client Library is an asynchronous MediaWiki API client library targeting modern .NET platforms
https://github.com/CXuesong/WikiClientLibrary/wiki
Apache License 2.0
80 stars 16 forks source link

Make WikibaseRequestHelper public #96

Closed miloush closed 1 year ago

miloush commented 1 year ago

So that multiple entities can be refreshed at once (and ids resolved from site links).

The BuildQueryOptions method would also be useful for WikiSite.InvokeMediaWikiApiAsync users,

CXuesong commented 1 year ago

So that multiple entities can be refreshed at once

Did you mean EntityExtensions.RefreshAsync extension methods? You can refresh a batch of entities with this method.

The BuildQueryOptions method would also be useful for WikiSite.InvokeMediaWikiApiAsync users,

I'd recommend you to write your own logic for building such query parameters as I don't want to make guarantee that the behavior of BuildQueryOptions will keep consistent throughout the updates.

Or could you please explain a bit more why you may reuse most of the logic in BuildQueryOptions? Are you trying to fetch properties that does not (yet) exist in EntityQueryOptions?

miloush commented 1 year ago

Did you mean EntityExtensions.RefreshAsync extension methods

Exactly like that.

As for BuildQueryOptions, I was trying to recreate RefreshAsync to get access to actual server responses.

CXuesong commented 1 year ago

As for BuildQueryOptions, I was trying to recreate RefreshAsync to get access to actual server responses.

If you are re-creating RefreshAsync, you'd better re-write all the logic by yourself.

If by "actual server responses" you meant there is some network fiddling needed, probably you'd want to intercept WikiClient in order to achieve this.