I'm going through the Rust book and while at it, trying to build an SDK for a JSON web API. I'm looking for general advice or anything I could improve and make more idiomatic. Anything that comes to mind would be really helpful!
The "how to properly wrap an HTTP API" question comes up from time to time.
I don't recommend mashing all endpoints together in one gigantic enum as they haven't got much to do with one another, and you will end up writing a lot of boilerplate code too.
You should probably start with the design I outlined here, ie., use generics and Request/Response traits instead of concrete types. Then each concrete request/response type can deal with defining its own endpoint, method, query string, headers, etc. Furthermore, your wrapper methods will be correctly typed (every request will have an associated response type).