-
Notifications
You must be signed in to change notification settings - Fork 26
Branches - Diana & Linnea #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
slack.rbWhat We're Looking For
|
lib/workspace.rb
Outdated
| def get_channels | ||
| response = self.get(BASE_URL + "channels.list", query: QUERY) | ||
|
|
||
| channels = response["channels"].map do |channel| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where you could check the code from the API and raise a SlackApiError (from the design scaffolding) if the code is not 200.
lib/workspace.rb
Outdated
| channel: @selected[0].id, | ||
| text: message | ||
| } | ||
| HTTParty.post(BASE_URL + "chat.postMessage", query: post_query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another place where API error codes could be handled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be more explicit, anywhere an api call is made is somewhere api error codes ought to be handled.
slack.rb
Congratulations! You're submitting your assignment!
You and your partner should collaborate on the answers to these questions.
Comprehension Questions