Why class is used in API call implementation, and what are the benefits of it? #2146
-
Why class is used in API call implementation, and what are the benefits of it? |
Beta Was this translation helpful? Give feedback.
Answered by
jamonholmgren
Sep 10, 2022
Replies: 1 comment 3 replies
-
It’s on my list to revisit later, but the primary benefits are that it can hold an apisauce instance and organize the api calls accordingly. Additionally, it’s easier to mock and test. But I’m looking at some alternate patterns too. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
jamonholmgren
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It’s on my list to revisit later, but the primary benefits are that it can hold an apisauce instance and organize the api calls accordingly. Additionally, it’s easier to mock and test. But I’m looking at some alternate patterns too.