Skip to content

labs13-trainingbot-3-0/Backend

Repository files navigation

Training Bot API

banner

standard-readme compliant

An Express + Node.js API for Training Bot

Table of Contents

Background

TODO: Write background section

Deploy

This project has an app.json file, which allows us to offer "one-click deployment" to Heroku. This will allow you to get your own version of Training Bot up and running both quickly and painlessly.

NOTE: Before clicking the button below you'll want to make sure you've completed the prerequisite setup steps in the complete documentation.

Deploy

API

Authentication

Most routes require authentication, and Training Bot handles authentication by looking for a valid JWT's on the Authorization header of a given request.

Valid JWTs are provided by the Auth0 integration with our React application. However -- for testing -- You can get a token programattically using the Auth0 Management API.


Resources

Heroku base URL https://trainingbot-3.herokuapp.com/

Auth

route methods description Docs
api/auth/ POST Takes a valid JWT provided by Auth0 and logs the user in JS Docs

Users

route methods description Docs
api/users/:id DELETE Deletes a specific user based on the ID parameter JS Doc

Team Members

route methods description Docs
api/team-members/ GET, POST Get all Team Members associated with an authenticated User and/or Create a new Team Member associated with an authenticated User JS Doc
api/team-members/:id GET, PUT, DELETE Read, Update, and Delete specific Team Members JS Doc
api/team-members/:id/unassign/:ts_id DELETE Unassign a specified Team Member from a Training Series JS Doc

Training Series

route methods description Docs
api/training-series/ GET, POST Get all the training series associated with an authenticated User and/or Create a new training series associated with an authenticated User JS Doc
api/training-series/:id GET, POST, DELETE Read, Update, and Delete specific training series JS Doc
api/training-series/:id/messages GET Get all the messages for a specific training series JS Doc
api/training-series/:id/assignees GET Get the team members for the specific training series JS Doc

Messages

route methods description Docs
api/messages/ GET, POST Get all Messages associated with an authenticated User and/or Create a new Message associated with an authenticated User JS Doc
api/messages/:id GET, PUT, DELETE Read, Update, and Delete specific Messages JS Doc

Stripe

route methods description Docs
api/stripe/ POST allows user to update/change their stripe plan. JS Doc
api/stripe/register POST register the user with stripe's API to get a stripe ID JS Doc
api/stripe/unsubscribe POST allows user to unsubscribe from their current plan. JS Doc
api/stripe/plans GET allows user to see available plans (basic, premium, pro) JS Doc
api/stripe/subscriptions GET Allows the user to access the three subscription that go with the three plans JS Doc
api/stripe/customer/plan GET Shows the user what their current plan is JS Doc
api/stripe/paymentintent POST required by the stripe API to be able to collect credit card payments. JS Doc

Slack

route methods description Docs
api/slack/oauth POST Creates authenticated Slack Token in the database after oauth validation JS Doc
api/slack/ GET Get all Slack users from the authenticated Slack workspace JS Doc
api/slack/:id/history GET Get all messages in specific DM chat history with specified Team Member JS Doc
api/slack/sendMessageNow POST Bypass Notification timer and immediately send specified Team Member a Slack Message, for testing purposes only JS Doc

Notifications

route methods description Docs
api/notifications/ GET, POST Get all Notifications associated with an authenticated User and/or Create a new Notification associated with an authenticated User JS Doc
api/notifications/:id GET Get specific Notifications JS Doc
api/notifications/:id/response GET Get all Responses associated with an authenticated User for specific Notification JS Doc
api/notifications/:id/delete DELETE Delete specific Notifications JS Doc

Responses

route methods description Docs
api/responses GET Get all Responses for authenticated User JS Doc
api/responses/:id GET, DELETE Get or delete specific Response JS Doc
api/responses/email POST Create a new email Response JS Doc
api/responses/sms POST Create a new text Response JS Doc
api/responses/slack POST Create a new Slack Response JS Doc

Maintainers

Divya Nair Thomas Folbecht Benjamin Chandler Joe Bugajski
@dsnair @tfolbrecht @chandlerben @JoeBugajski

License

MIT © 2019 Training Bot

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •