kean / Get

Web API client built using async/await
MIT License
937 stars 74 forks source link

Protocol for APIClient Methods #48

Closed LePips closed 2 years ago

LePips commented 2 years ago

I'm remaking our new API with CreateAPI and you've left generous comment in our thread https://github.com/jellyfin/jellyfin-sdk-swift/issues/5. Instead of directly using APIClient, I'm making a wrapper JellyfinClient actor that handles the APIClientDelegate creation to inject required headers for the Jellyfin server, among other things for convenience.

Working with this wrapper would just manually require re-declaring the main APIClient interface methods however can cause issues in the future over the evolution of the package. Would creating a protocol for these methods be appropriate for easier implementation of wrappers?

LePips commented 2 years ago

Apologies, I don't know why I made an issue if I could just make the protocol and have the discussion there.