Skip to content

annypatel/retro-crawler

Repository files navigation

RetroCrawler

RetroCrawler provides Retrofit converters for deserializing Html using jspoon and jsoup-annotations. Both of them internally uses Jsoup.

Jspoon Converter

A default Jspoon instance will be created or one can be configured and passed to the RetroCrawlerJSpoonConverterFactory to further control the deserialization. For more information on how to use Jspoon annotations refer this.

Download

implementation 'com.github.annypatel.retrocrawler:converter-jspoon:1.0.0-alpha1'

Usage

To use RetroCrawler Jspoon converter, just add converter when building your Retrofit instance.

Retrofit retrofit = new Retrofit.Builder()
	.baseUrl("https://api.example.com")
	.addConverterFactory(RetroCrawlerJSpoonConverterFactory.create())
	.build();

Jsoup-Annotations Converter

JsoupProcessor class from jsoup-annotations will be used by RetroCrawlerJSoupAnnotationConverterFactory for Html deserialization. For more information on how to use jsoup-annotations refer this.

Download

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    implementation 'com.github.annypatel.retrocrawler:converter-jsoup-annotations:1.0.0-alpha1'
}

Usage

To use RetroCrawler Jsoup-Annotations converter, just add converter when building your Retrofit instance.

Retrofit retrofit = new Retrofit.Builder()
	.baseUrl("https://api.example.com")
	.addConverterFactory(RetroCrawlerJSoupAnnotationConverterFactory.create())
	.build();