Split into admin and regular client. Minor doc fixes. Lock lang to 9.0 #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Splits the stateful client into two classes. The methods requiring the service_key have been moved to a new AdminClient class.
Also some minor documentation tweaks/fixes, and also sets the language level to 9.0 instead of latest to help keep language level compatibility (useful e.g. if using the sources in Unity).
What is the current behavior?
Right now the stateful client includes service_key methods. This doesn't really make a lot of sense, as the stateful client includes several features that don't make sense in a server environment (e.g. background refresh threads).
What is the new behavior?
The only state the AdminClient really includes is the ServiceKey. It's a bit higher level than just using the StatelessClient directly.
This is a breaking change, as the interfaces and implementation have changed. The AdminClient methods do not take the service key JWT as parameters - typically that would be set in the constructor.
I suspect this doesn't really affect the top-level client all that much, as I hope that most, say, Xamarin users are not compiling in their service keys into their client apps. A user can use the AdminClient directly in their server-side code - this is probably more of a documentation thing.