Skip to content

Conversation

@katemyer
Copy link

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? Drawing out several different UMl's to determine what exactly could go into this Slack Api helped tremendously. Then, taking time to understand the classes I would need and then fully understanding how they were organized. From there, learning how they would interact and which methods were appropriate for each class. If there's a next API, I would do UML's first and then let it marinate for a day or two before starting any kind of coding.
Give a short summary of the request/response cycle. Where does your program fit into that scheme? In the request part of the cycle, I am creating the request for users or channels which requires a URL and parameters which happens to be a token. Then, I wait for the response. My program fits into this schema by creating arequest to get a list of users, then sending this request, then waiting for a response, and finally evaluating the response by parsing out the information I need.
How does your program check for and handle errors when using the Slack API? Not much. In the future, I would check for response.code and response["ok"]
How did the design and organization of your project change over time? I stayed closed to my initial design. But, once I started writing code, I initially built a lot of it in slack main code but eventually migrated the logic over to workspace class.
Did you use any of the inheritance idioms we've talked about in class? How? Recipient is an abstract class. The load_all methods inside the recipient class is a template method.
How does VCR aid in testing a program that uses an API? It records API responses and saves it as cassettes. Then when you need to call it again, it references the cassettes rather than calling the API again.

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