Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using a custom API client in rvk_methods #27

Open
2 tasks
awaitlink opened this issue Jun 11, 2022 · 0 comments
Open
2 tasks

Allow using a custom API client in rvk_methods #27

awaitlink opened this issue Jun 11, 2022 · 0 comments
Labels
api This applies to the `rvk` crate (or to the `api`/`error` modules before the crate split) enhancement New feature or request good first issue Good for newcomers methods This applies to the `rvk_methods` crate (or to the `methods` module before the crate split)

Comments

@awaitlink
Copy link
Owner

awaitlink commented Jun 11, 2022

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 awaitlink added good first issue Good for newcomers api This applies to the `rvk` crate (or to the `api`/`error` modules before the crate split) methods This applies to the `rvk_methods` crate (or to the `methods` module before the crate split) labels Jun 11, 2022
@awaitlink awaitlink added the enhancement New feature or request label Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api This applies to the `rvk` crate (or to the `api`/`error` modules before the crate split) enhancement New feature or request good first issue Good for newcomers methods This applies to the `rvk_methods` crate (or to the `methods` module before the crate split)
Projects
None yet
Development

No branches or pull requests

1 participant