-
Notifications
You must be signed in to change notification settings - Fork 26
Leaves - Elizabeth & Nicky #5
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
…d SlackApiError class
…space_test.rb to recipient_test. Wrote test to test that error is raised when invalid input is given to recipient.send_message.
slack.rbWhat We're Looking For
|
| # Ignore cassette files | ||
| /specs/cassettes/ | ||
|
|
||
| .DS_Store |
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.
.env should be in .gitignore.
| @selected = nil | ||
| end | ||
|
|
||
| def select_channel(identifier) |
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 code is very similar to the code for select_user below. Could you DRY this up somehow?
| query_parameters = { | ||
| token: ENV["SLACK_TOKEN"], | ||
| } | ||
| response = Channel.get(url, query: query_parameters) |
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.
We do not have the tools yet to test a bad get request in this instance, but it is good to think about and build in functionality to deal with bad requests.
slack.rb
Congratulations! You're submitting your assignment!
You and your partner should collaborate on the answers to these questions.
Comprehension Questions
self.listanddetailswhich were implemented in both the User and Channel classes. Both User and Channel used polymorphism as they used the same methods but are different objects.