diff --git a/.DS_Store b/.DS_Store index 2b47517..cc4b9c6 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/week4/.DS_Store b/week4/.DS_Store new file mode 100644 index 0000000..788926d Binary files /dev/null and b/week4/.DS_Store differ diff --git a/week4/homework/.DS_Store b/week4/homework/.DS_Store new file mode 100644 index 0000000..d499add Binary files /dev/null and b/week4/homework/.DS_Store differ diff --git a/week4/homework/responses/.DS_Store b/week4/homework/responses/.DS_Store new file mode 100644 index 0000000..bdc2c59 Binary files /dev/null and b/week4/homework/responses/.DS_Store differ diff --git a/week4/homework/responses/4.1-express.md b/week4/homework/responses/4.1-express.md new file mode 100644 index 0000000..ba0408d --- /dev/null +++ b/week4/homework/responses/4.1-express.md @@ -0,0 +1,19 @@ +# ⚡️Express + +This week will involve using a popular JavaScript framework called Express. Frameworks essentially give you a fundamental structure that you can build on without starting completely from scratch. For example, Bolt is also a framework! + + + +## 📚Reading Up + +Express is a pretty large framework, so you will need to do a little reading to understand its basic functions. Look at the Express-related sections in [this article](https://codeforgeek.com/express-nodejs-tutorial/) for some general information. + +After you are done, read [this article](https://codeforgeek.com/handle-get-post-request-express-4/) on POST and GET requests. Comment one idea for a Slack app using Express and a couple of things that stood out to you or you had questions on while researching the framework. + + + +## 🔨Challenge + +Create a post request that prints a hello message to your local host server. Create another post request that takes parameters for a book and author, then prints out a sentence using the information. + +Refer to the articles above and feel free to reach out to your mentors with any questions! \ No newline at end of file diff --git a/week4/homework/responses/4.2-webhooks.md b/week4/homework/responses/4.2-webhooks.md new file mode 100644 index 0000000..5aedc4f --- /dev/null +++ b/week4/homework/responses/4.2-webhooks.md @@ -0,0 +1,34 @@ +# Webhooks + +Webhooks are applications that send other apps useful information. They are extremely useful and can expand your Slack apps to a new level! + +## 🧠Reading + +Read [this article](https://sendgrid.com/blog/whats-webhook/). When you're done, research a couple webhooks and comment some ideas for a Slack app using some of them. Refer to [this site](https://www.programmableweb.com/news/33-webhook-apis-assembla-mailchimp-and-podio/2013/09/04) following sites for some webhooks. + +## 🔨Creating Your Own Webhook + +Now it is time to create a webhook yourself! We will be using GitHub in this camp. Github is a verison control site that lets you maintain repositories of code across several iterations. It is extremely useful for both personal and proffessional projects. + +If you don't have an account already, create one at www.github.com. You will need a repository, which can be created by pressing the 'create repository' button at the top left of your dashboard: + +![](./Gifs:Images/4.1-creating-repo.gif) + +Once you have created a repository, navigate to the settings page from the dashboard and select 'secrets'. You will need a secret in order to access the repository. Create an arbitrary secret name and value. + +![](./Gifs:Images/4.2-secret.gif) + +Next, start your Slack app and create an ExpressReceiver object. Call the post message for the receiver with a parameter of '/github-stars'. Run the app, making sure to connect it to an ngrok server. Then, navigate to 'webhooks' in your Github repository settings. Create a webhook and set the payload URL to be the ngrok server URL with the parameter of the ExpressReceiver at the end. Copy and paste the secret value you create into the 'Secret' field. Lastly, select individual events and choose 'starred', then press 'update'. Check the ngrok server in your terminal to see if the webhook connected successfully. + + + +## 🏁Challenge + +Your challenge for today is to implement the payload from the Github webhook to send a message in your Slack app. The payload will include whether a user deleted, starred, or unstarred the repository. Look for these datapoint, find which event occurred, and post it in a channel. + +Good luck! If you need any help, feel free to reach out to either of your mentors. + + + + + diff --git a/week4/homework/responses/4.3-final-project.md b/week4/homework/responses/4.3-final-project.md new file mode 100644 index 0000000..6b87441 --- /dev/null +++ b/week4/homework/responses/4.3-final-project.md @@ -0,0 +1,21 @@ +# ✔️Final Project + +Congratulations, you are about to complete your final homework assignment! It's time for you to apply the concepts from this week into a project. + +## 📃Specifications + +1. Create an app that listens for Github issues and posts in the app's chat whenever an event occurs. +2. Listen for an app home opened event, and publish a view with all of the issues in a github repository + +## 🤔Hints + +- use ExpressReceiver, both the body-parser and axios +- enable App Home within your configurations +- Refer to [this link](https://slack.dev/bolt-js/concepts#publishing-views) on help with creating a view. + +![](https://media.giphy.com/media/4JVTF9zR9BicshFAb7/giphy.gif) + + + +This project is pretty challenging, so make sure to reach out to your mentors with any questions! + diff --git a/week4/homework/responses/Gifs:Images/.DS_Store b/week4/homework/responses/Gifs:Images/.DS_Store new file mode 100644 index 0000000..125c0ff Binary files /dev/null and b/week4/homework/responses/Gifs:Images/.DS_Store differ diff --git a/week4/homework/responses/Gifs:Images/4.1-creating-repo.gif b/week4/homework/responses/Gifs:Images/4.1-creating-repo.gif new file mode 100644 index 0000000..1de8b13 Binary files /dev/null and b/week4/homework/responses/Gifs:Images/4.1-creating-repo.gif differ diff --git a/week4/homework/responses/Gifs:Images/4.2-secret.gif b/week4/homework/responses/Gifs:Images/4.2-secret.gif new file mode 100644 index 0000000..b80c44a Binary files /dev/null and b/week4/homework/responses/Gifs:Images/4.2-secret.gif differ