API Documentation - cc-y-zhao/Slack-ish GitHub Wiki
API Routes
This web app uses the following API routes to dynamically update the page to create a single-page-app-like feel for the user for specific features.
Channels
- Logged in users may access their own channels
- GET api/channels/:channel_id
- Logged in users may create their own channels
- POST api/channels
- Logged in users may edit their own channels
- PUT api/channels/:channel_id
- Logged in users may delete their own channels
- DELETE api/channels/:channel_id
Direct Message
- Logged in users may access their own direct messages
- GET api/channels/:channel_id (messages are rendered on each channel's page)
- Logged in users may create their own direct messages
- POST api/messages/:channel_id (posting a message to a specific channel)
- Logged in users may edit their own direct messages
- PUT api/messages/:message_id
- Logged in users may delete their own direct messages
- DELETE api/messages/:message_id
Search
- Logged in users may search for a user to start a direct message exchange
- GET api/search/users
- Logged in users may search for a user to add to a channel (search results exclude users who are already in the channel)
- GET api/search/users-in-channel