Skip to content

Conversation

@seaweeddol
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? I mainly used the links provided in the project instructions, and read through that documentation. For the optional enhancements, I had to dig into the Slack API more to look for a method that would work for the ask. It wasn't always clear exactly what I should search for, but I was able to find what I wanted using the search box and the "Methods" page. I still had to do some digging into the error messages I received when trying to make a call though - not everything was listed plainly on the Slack API documentation.
Give a short summary of the request/response cycle. Where does your program fit into that scheme? A user makes a request which is sent to a server, and then the user receives a response. My program makes requests to the Slack API and receives responses which I use in my program to provide feedback or update data.
How does your program check for and handle errors when using the Slack API? It checks the code and the "ok" response. If the code is 200 and "ok" is true, the call is successful. Otherwise, I need to raise an error or provide some sort of feedback to the user.
How did the design and organization of your project change over time? I did not really stray from the design provided by Ada. I used the method and class structure from the design activity and just changed a couple of parameters and added some helper methods.
Did you use any of the inheritance idioms we've talked about in class? How? Yes, I used an abstract class and template methods. The Recipient class was an abstract class with template methods that the User and Channel classes inherited from. This reduced some repetition as both of those classes share variables and methods with slight differences.
How does VCR aid in testing a program that uses an API? The VCR allows you to store API calls in files called "cassettes". This reduces the amount of API calls you make, which can help keep you from making too many calls which can cost you time and money, and also potentially get you blocked from making calls. It also provides a fallback in case you lose internet connection, you can continue to run tests if you already have data from an API call saved.

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