Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions individual-reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,48 @@ Answer the following comprehension questions **within this file.** Write your an
### `GET` Request Review

1. Describe a GET request that your project makes, and the high-level description of what it does
- Answer:
- Answer: A GET request calls for information from the Slack website.
1. What is the verb of this request?
- Answer:
- Answer: get
1. What is the path (or the URL, or endpoint) of this request?
- Answer:
- Answer: users.list and channels.list
1. What are the query params (the additional data sent with the request, besides the verb and the path)?
- Answer:
- Answer: Token
1. What is the syntax used to make this request? (Copy and paste a code snippet here)
- Answer:
- Answer:
```ruby
# Copy and paste your answer below this comment

HTTParty.get(url, query: {token: ENV["SLACK_API_TOKEN"]})
# Copy and paste your answer above this comment
```
1. What does the program do if the response comes back with a status code of 200?
- Answer:
- Answer: It displays the response, the user list or the channel list.
1. What does the program do if the response does not come back with a status code of 200?
- Answer:
- Answer: Error is raised - SlackAPIError with text from error

### `POST` Request Review

If your project does not make a POST request, read through Wave 3 on the original Slack CLI, and research and answer questions 1, 2, 3, 4, 6, and 7.

1. Describe a POST request that your project makes, and the high-level description of what it does
- Answer:
- Answer: It will post a message to Slack.
1. What is the verb of this request?
- Answer:
- Answer: Post
1. What is the path (or the URL, or endpoint) of this request?
- Answer:
- Answer: chat.postMessage
1. What are the query params (the additional data sent with the request, besides the verb and the path)?
- Answer:
- Answer: Token, channel, text
1. What is the syntax used to make this request? (Copy and paste a code snippet here)
- Answer:
```ruby
# Copy and paste your answer below this comment

HTTParty.post("https://slack.com/api/chat.postMessage", query: {token: ENV["BOT_API_TOKEN"], channel: self.slack_id, text: message})
# Copy and paste your answer above this comment
```
1. What does the program do if the response comes back with a status code of 200?
- Answer:
- Answer: It will post the message and give the user confirmation the message was posted.
1. What does the program do if the response does not come back with a status code of 200?
- Answer:
- Answer: It will return SlackAPIError with text from error.

## Request & Response Cycle

Expand All @@ -62,11 +62,11 @@ There are two actors:

Based on the project requirements, when Grace enters "list channels,"
1. What is the request being made in the program?
- Answer:
- Answer: A GET request is being made
1. Who is the client?
- Answer:
- Answer: Grace's computer
1. Who is the server?
- Answer:
- Answer: Slack

## Part 2: Optional Refactoring

Expand Down