Skip to content

Conversation

@dnguye2
Copy link

@dnguye2 dnguye2 commented Mar 16, 2020

Assignment Submission: Slack CLI

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

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? I used Postman to test and explore the different methods of Slack API. For future projects, I will definitely be using Postman.
Give a short summary of the request/response cycle. Where does your program fit into that scheme? A client generates a request (a text string) that is sent to a server. In turn, the server gives back a response to fulfill the request. The Slack CLI serves as the client to interact with the server, in this case the Slack API.
How does your program check for and handle errors when using the Slack API? Errors are handled based off of the response code. For Slack API, it will give a 200 code if a request is valid, so you have to go within the response ["ok"] to see if the response is valid.
How did the design and organization of your project change over time? Initially had less classes (just workspace, channel, and user) but realized the importance of having an abstract class , Recipient to simplify my channel and user classes.
Did you use any of the inheritance idioms we've talked about in class? How? Yes, abstract classes, template methods, and polymorphisms. Abstract class: Recipient, template methods: self.get in the Recipient class, polymorphisms: table printing the different attributes of channel and user
How does VCR aid in testing a program that uses an API? After running the tests once, the request and responses are stored in cassettes. This allows for the test to run offline and faster. In addition, you can avoid publicly displaying your token through its filter features.

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.

1 participant