NewPipeExtractor icon indicating copy to clipboard operation
NewPipeExtractor copied to clipboard

Suggestion: Use Retrofit for HTTP requests.

Open Isira-Seneviratne opened this issue 2 years ago • 4 comments

Retrofit is a HTTP client where REST APIs can be declared as interfaces, and has support for type converters such as Moshi (JSON) and jspoon (HTML). Using it would allow the code for making the requests to be simplified.

@AudricV @Stypox What do you think?

Edit: I've created a sample pull request here.

Isira-Seneviratne avatar Aug 15 '22 03:08 Isira-Seneviratne

ccc.moneymaster-salvador-jose-sanchez.08-15-1982.http.txt.inc.template.delete.htnp.template-delete-data-api.txt.inc.htnp.template-delete

plotomea0 avatar Aug 15 '22 05:08 plotomea0

ccc.moneymaster-salvador-jose-sanchez.08-15-1982.http.txt.inc.template.delete.htnp.template-delete-data-api.txt.inc.htnp.template-delete

Has worked

plotomea0 avatar Aug 15 '22 05:08 plotomea0

But the downloader has to be specified by clients using NPE, not by NPE itself

Stypox avatar Aug 16 '22 08:08 Stypox

Also, Retrofit requires at least API level 21, as it relies on OkHttp. Will that be a deal-breaker for this particular proposed change?

Isira-Seneviratne avatar Aug 17 '22 14:08 Isira-Seneviratne

Also, Retrofit requires at least API level 21, as it relies on OkHttp. Will that be a deal-breaker for this particular proposed change?

Not since the app version 0.24.0 made it the new minSDKVersion, but who knows?

SC1040-TS2 avatar Oct 30 '22 15:10 SC1040-TS2

Also, Retrofit requires at least API level 21, as it relies on OkHttp. Will that be a deal-breaker for this particular proposed change?

Not since the app version 0.24.0 made it the new minSDKVersion, but who knows?

Since some apps using the extractor are targeting Android versions below 5.0, I downgraded the required dependency versions in the PR I created.

Isira-Seneviratne avatar Oct 30 '22 23:10 Isira-Seneviratne

Suggestion rejected: see https://github.com/TeamNewPipe/NewPipeExtractor/pull/972#issuecomment-1320991487. Closing.

AudricV avatar Nov 24 '22 19:11 AudricV