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

Reduce GetTokensAsync to GetTokenAsync #23

Closed CXuesong closed 6 years ago

CXuesong commented 6 years ago

When I first wrote Site.GetTokensAsync, I had assumed that a user might want to retrieve different tokens in one MW API request. But this assumption led to too much complexity. On the other hand, its overload in singular form GetTokenAsync is used much more often compared with GetTokensAsync.

To reduce the complexity and make it easier to maintain, I'm going to remove GetTokensAsync. If, in the rare case, I assume, you want to retrieve multiple tokens, you will need to call GetTokenAsync multiple times.