-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Beginnings of integration with Wikipedia client library. #2642
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
Beginnings of integration with Wikipedia client library. #2642
Conversation
Event logging is no longer used in this app.
Codecov Report
@@ Coverage Diff @@
## backend-overhaul #2642 +/- ##
===================================================
- Coverage 2.75% 2.38% -0.37%
===================================================
Files 260 240 -20
Lines 12437 12052 -385
Branches 1125 1106 -19
===================================================
- Hits 343 288 -55
+ Misses 12067 11740 -327
+ Partials 27 24 -3
Continue to review full report at Codecov.
|
| import okhttp3.Response; | ||
| import okhttp3.logging.HttpLoggingInterceptor; | ||
|
|
||
| public final class OkHttpConnectionFactory { |
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.
We do have a provider for getting http client in NetworkingModule:provideOkHttpClient. It could be modified to add additional interceptors.
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.
Cool, I will de-duplicate things as I go along.
|
@dbrant Thanks for helping with the initial library integration. It would be great if you could include one MediaWiki API usage so that we can easily take it forward. :) |
|
@maskaravivek I'm very far from done. Stay tuned. |
|
Should we use a separate development branch for this, and merge periodically into master? |
|
Sure, can it be this branch? Or is there a different procedure for that? |
|
I just made https://github.com/commons-app/apps-android-commons/tree/backend-overhaul from master. If you could rebase and resubmit the PR to that branch, that would be great. :) |
This was being used in some slightly incorrect/unexpected ways.
|
I've changed the base of this PR to be the |
|
Thanks @dbrant . Do let us know when it's ready for review. :) |
|
@vanshikaarora The |
OK thanks :). I'll wait till then 👍 |
|
@misaochan Actually this can be reviewable now. It would probably be good to perform the overhaul as a series of small(er) PRs, and also keep merging the latest updates from master into this branch, as well. |
maskaravivek
left a comment
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.
Looks good to me.
|
Looks good to me, thanks @dbrant ! |
* Beginnings of integration with Wikipedia client library. (#2642) * Remove remaining unnecessary API version check. * Roll up sleeves. * Add and integrate the beginnings of app adapter. * Remove vestigial event logging logic. Event logging is no longer used in this app. * Beginnings: remove StringUtils and associated redundancies. * Remove redundant capitalize() method. * Remove redundant urlEncode() method. * Remove redundant (and incomplete) language lists. * Remove redundant usages of SimpleDateFormat. * Remove redundant json type adapter. * Remove redundant MW error model classes. * Rip out redundant MW model classes. * Pass SessionManager into AppAdapter instead of injecting. * Wire up more of the AppAdapter. * Remove redundant Gson initialization and type adapters. * Rip out PageTitle. This was being used in some slightly incorrect/unexpected ways. * Don't need static WikiSite. * Bump data client library version * Bump library version and fix build * Fix tests * Fix build * Fix media of the day * With fixes in recently modified APIs
This kicks off the process of integrating with our new Library that contains common code between the Wikipedia and Commons apps.
This set of commits does not yet integrate the networking layer of the library, but rather with the utility methods included with the library, and removes the redundant utilities found in the Commons app code.