TeamNewPipe / NewPipeExtractor

NewPipe's core library for extracting data from streaming sites
GNU General Public License v3.0
1.4k stars 422 forks source link

Suggestion: Use Retrofit for HTTP requests. #896

Closed Isira-Seneviratne closed 2 years ago

Isira-Seneviratne commented 2 years ago

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.

plotomea0 commented 2 years ago

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

plotomea0 commented 2 years ago

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

Stypox commented 2 years ago

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

Isira-Seneviratne commented 2 years ago

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

SC1040-TS2 commented 2 years ago

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?

Isira-Seneviratne commented 2 years ago

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.

AudricV commented 2 years ago

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