-
Notifications
You must be signed in to change notification settings - Fork 26
Leaves -- Janice and Emily #10
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
…unctionality out of slack.rb
…toring made it so previously passing tests are now failing. need to refactor tests.
…d puts statements to driver code
|
|
||
| def initialize | ||
| @users = SlackCLI::User.json_parse(SlackCLI::User.get(USER_URL, query: GET_PARAMETERS)) | ||
| @channels = SlackCLI::Channel.json_parse(SlackCLI::Channel.get(CHANNEL_URL, query: GET_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.
What if these come back with errors? You don't give any useful error messaging so I know what needs to be fixed!
| end | ||
|
|
||
| def select_user(user_chosen) | ||
| selected_user = @users.find { |user| user.slack_id == user_chosen || user.name == user_chosen } |
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.
/Users/devin/Documents/Ada/c12/slack-cli/lib/workspace.rb:58: warning: assigned but unused variable - selected_user
selected_user doesn't actually do anything here.
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.
If this is a return value, be explicit about that, and don't instantiate a var that won't be used.
| attr_accessor :users, :channels, :selected | ||
|
|
||
| CHANNEL_URL = 'https://slack.com/api/channels.list' | ||
| USER_URL = 'https://slack.com/api/users.list' |
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.
I'd put these urls in the respective classes, but that is just me being picky.
slack.rbWhat We're Looking For
|
slack.rb
Congratulations! You're submitting your assignment!
You and your partner should collaborate on the answers to these questions.
Comprehension Questions