GitHawkApp / GitHawk

The (second) best iOS app for GitHub.
http://githawk.com
MIT License
2.88k stars 382 forks source link

Refactor networking into its own library #1544

Open rnystrom opened 6 years ago

rnystrom commented 6 years ago

I want to put everything:

Into a single library, call it "GithubAPI" or w/e. I want to prepare to allow things like a watch app or extension, but all of this needs to get moved out.

While we're at it, I really like the networking API design in this article. We can make requests + responses all typed and use enums to reduce all of the request options into a single API on GithubClient. That should reduce a lot of complexity and greatly decouple requests, responses, and parsing.

Also I want to remove the FlatCache from the network client. That's cheating.

Phase 2 will be to migrate and use shared app storage for sessions, bookmarks, etc. But we can do that later.

BasThomas commented 6 years ago

Any idea as to when you want to tackle this? Might get a bit hairy when working on enterprise support at the same time.

rnystrom commented 6 years ago

I’m still not sold that enterprise support will ever truly work given the GraphQL version issues.

Very least after 1.18 ships. Not a huge rush, but I’d like to clean this stuff up plus pave the way for someone to hack freely on a watch app or extension (I’ll basically ship whatever anyone wants to build).

Sent with GitHawk

BasThomas commented 6 years ago

Yep, fair! Will update on my findings regarding Enterprise. 👍

BasThomas commented 6 years ago

After #1549 the Request type can probably be pulled out of the GithubClient by the way.

Sent with GitHawk