Moves all data and about an API endpoint into an enum called APIEndpoint. This avoids lots of switch statements for each endpoint in APIService in addition to lots of scattered constants.
The only unfinished code is for authenticated requests. They still use a switch statement because the code was pretty tightly coupled with the request parameters. We'll have to abstract a lot of that out and make it a lot easier to use than it is now.
Moves all data and about an API endpoint into an enum called
APIEndpoint
. This avoids lots of switch statements for each endpoint inAPIService
in addition to lots of scattered constants.The only unfinished code is for authenticated requests. They still use a switch statement because the code was pretty tightly coupled with the request parameters. We'll have to abstract a lot of that out and make it a lot easier to use than it is now.