rvk icon indicating copy to clipboard operation
rvk copied to clipboard

Allow using a custom API client in `rvk_methods`

Open awaitlink opened this issue 2 years ago • 0 comments

Summary

Allow using a custom API client in rvk_methods instead of just rvk::APIClient.

Suggested solution

This will likely involve creating a trait that has the necessary function, call_method, and implementing that trait for rvk::APIClient.

Avoiding rvk_methods depending on rvk

A possible solution for this may be to add a new crate like rvk_traits for this purpose (and also move the Params type alias there, although it might be unnecessary and should rather be entirely removed).

Additionally, rvk_methods::supported_api_client would need to be removed.

Both rvk_methods and rvk would depend on rvk_traits (the former—to use it, the latter—to implement the trait).

Unresolved questions

  • [ ] Is the rvk_traits name good enough or should a better one be used (e.g. rvk_core)?
  • [ ] Name of the trait.

awaitlink avatar Jun 11 '22 19:06 awaitlink