{"action":"opened","issue":{"url":"https://api.github.com/repos/BenTheElder/slack-rs/issues/14","labels_url":"https://api.github.com/repos/BenTheElder/slack-rs/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/BenTheElder/slack-rs/issues/14/comments","events_url":"https://api.github.com/repos/BenTheElder/slack-rs/issues/14/events","html_url":"https://github.com/BenTheElder/slack-rs/issues/14","id":109663404,"number":14,"title":"RFC: Modularization","user":{"login":"mthjones","id":45536,"avatar_url":"https://avatars.githubusercontent.com/u/45536?v=3","gravatar_id":"","url":"https://api.github.com/users/mthjones","html_url":"https://github.com/mthjones","followers_url":"https://api.github.com/users/mthjones/followers","following_url":"https://api.github.com/users/mthjones/following{/other_user}","gists_url":"https://api.github.com/users/mthjones/gists{/gist_id}","starred_url":"https://api.github.com/users/mthjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mthjones/subscriptions","organizations_url":"https://api.github.com/users/mthjones/orgs","repos_url":"https://api.github.com/users/mthjones/repos","events_url":"https://api.github.com/users/mthjones/events{/privacy}","received_events_url":"https://api.github.com/users/mthjones/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-04T05:05:53Z","updated_at":"2015-10-04T05:05:53Z","closed_at":null,"body":"**Note**: This would be a large breaking change – probably a `0.10.0` or later release.\r\n\r\nMy thinking is that there's really two concepts in this crate: the RTM API support and the web API support. They would do well to be split into two modules: `slack::web` and `slack::rtm`.\r\n\r\n`slack::web` would contain a module that would contain the low-level interface to the API. Essentially just wrapping a `hyper` call and returning a `hyper::Result`. This could be strictly internal or exposed publicly. It would also contain a higher-level interface that uses the low-level interface but actually parses the results, returns Slack errors (i.e. `SlackError::InvalidAuth` or `SlackError::ChannelNotFound`) where appropriate, and typed objects like the existing `User` and `Channel` for example.\r\n\r\n`slack::rtm` would be structured very similarly, but only dealing with the RTM side of things.\r\n\r\nThoughts?"}}