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
Exported API has no available client #81
Comments
Once connected you can access the start response which contains a lot of the things previously Using the api is currently kind of standalone. You can use reqwest for the api client or impl your own. It was the same before i thought. |
Docs.rs isn't linking to the type for some reason but it's here https://docs.rs/slack_api/0.16.1/slack_api/rtm/struct.StartResponse.html |
Ah yes, I did see and then forget about that. Thanks. That solves my particular issue, but I am still at a bit of a loss as to how to access API functions without rolling my own client. Is that possible? |
@squidpickles |
Oh i did have the same problem with versions. If slack api re-exported its one rather than relying on versions matching it would work better i think |
Oh yeah... version mismatch + traits... I have run into that several times before. I don't know why I still don't think to check that. An exported client would help a ton, yes. |
Made a PR: slack-rs/slack-rs-api#42. |
And another one with an example: #82. |
I've been refactoring my code with recent changes to the library.
One change is that we no longer get our user's name or ID on
on_connect()
, so I'm trying to callslack::api::users::list
to find that information.The problem is the API calls all require a client implementing the
SlackWebRequestSender
trait. No such client is exposed either byslack
orslack_api
. The authentication token also needs to be passed to any function that might want to make an API call.Would it make sense to have something analogous to the
RtmClient
that essentially wraps thereqwest::Client
and an API token? It's what I would likely implement, but I guess my question is whether there's some other way to access aSlackWebRequestSender
that I'm missing.The text was updated successfully, but these errors were encountered: