Skip to content

Conversation

@kristyh32
Copy link

slack.rb

Congratulations! You're submitting your assignment!

You and your partner should collaborate on the answers to these questions.

Comprehension Questions

Question Answer
How did you go about exploring the Slack API? Did you learn anything that would be useful for your next project involving an API? We used postman to test GET and POST requests to the slack API. We learned how to dig into the API requirements in order to fix issues we were having with posting messages.
Give a short summary of the request/response cycle. Where does your program fit into that scheme? We were the user requesting to get data/send data, and we received a response back from the API.
How does your program check for and handle errors when using the Slack API? We set up our methods to return false if there was an API error that came up.
Did you need to make any changes to the design work we did in class? If so, what were they? We modified the send message method in recipient to take TWO parameters instead of one. Otherwise, we stuck to the design.
Did you use any of the inheritance idioms we've talked about in class? How? We did have an abstract class(Recipient), it also had template methods that were meant to be invoked in child classes (details and self.list). We also used polymorphism in workspace, when it treated users and channels in the same way.
How does VCR aid in testing a program that uses an API? VCR aides in limiting your API calls by 'recording' the response that comes from a particular request to an API and it uses that data that it already knows to 'replay' to run the test.

@tildeee
Copy link

tildeee commented Sep 21, 2019

slack.rb

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene (no slack tokens) yes
Comprehension questions yes
Functionality
List users/channels yes
Select user/channel yes
Show details yes
Send message yes
Program runs without crashing yes
Implementation
API errors are handled appropriately yes!!!!! GREAT WORK!
Inheritance model matches in-class activity yes
Inheritance idioms (abstract class, template methods, polymorphism) used appropriately yes
Methods are used to break work down into simpler tasks yes
Class and instance methods are used appropriately yes
Tests written for User functionality yes
Tests written for Channel Functionality yes
Tests written for sending a message yes
Overall

GREAT WORK ON THIS PROJECT, Brianna and Kristy! Your project is so so so clean, readable, logical, detailed, thorough, and thoughtful! From the detail that your tests cover, to the edge cases you considered in your tests and implementation code, and to the care that you two put into the slack.rb file, you two did a great job on this project! Also, your work flowed very well with testing, APIs, making custom errors, etc! Great work!

I really only have a few comments for minor ways I could imagine this improve. The most interesting one is to think about how your code could have greater separate the files responsible for formatting/displaying things to the user (slack.rb) versus code that is about constructing data structures (our classes)

I also want to call out that you two did a great job with thinking about and anticipating and testing for API responses that give back error codes (and also confirming and checking that the "good" responses have status codes of 200 OK)!!!! That was very clever. Keep thinking about things like that and it'll set you up for the Rails unit really well!

Again, keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants