-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrapper functions for endpoint calls #73
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #73 +/- ##
============================================
- Coverage 44.68% 41.42% -3.26%
+ Complexity 169 167 -2
============================================
Files 62 62
Lines 1410 1376 -34
Branches 82 82
============================================
- Hits 630 570 -60
- Misses 762 785 +23
- Partials 18 21 +3
|
Replace direct use of DELETE/GET/PATCH/POST functions with getMastodonRequest() and related functions where possible, reducing exposure of Gson serializer. Some special cases remain: - Media.kt - Streaming.kt - postUserNameAndPassword() in sample apps After cleanup of those and related tests, Gson instance no longer needs to be exposed via MastodonClient.getSerializer, and andregasser#51 can be closed.
cd54706
to
d41c652
Compare
Sorry, had to tune CodeCov first, as their annotations polluted the diffs way too much. I am still not 100% happy with the CodeCov tool yet, but its less annoying than before. I still do not get how they calculate their metrics. But maybe it is because it is not configured correctly yet. Found some more info about it. Maybe will take another approach fixing it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great work! Highly appreciated. Looks much cleaner now. Just realized I need to dive into reified inline functions a bit more :-)
Yeah. The newly introduced functions in MastodonClient.kt are not being tested - but they are also just inlined wrappers around the functions that were previously called directly, so I think most of that "reduced coverage" is just an artifact of that. I have some doubts about the testing that is currently going on, anyway, so increasing test coverage while we deal with individual entities and methods seems to be the best approach here. Thanks for the review, merged and done! :) |
Replace direct use of DELETE/GET/PATCH/POST functions with getMastodonRequest() and related functions where possible, reducing exposure of Gson serializer.
Some special cases remain:
After cleanup of those and related tests, Gson instance no longer needs to be exposed via MastodonClient.getSerializer, and #51 can be closed.