项目作者: annypatel

项目描述 :
Annotation based Retrofit converter for HTML.
高级语言: Java
项目地址: git://github.com/annypatel/RetroCrawler.git
创建时间: 2018-05-14T10:44:23Z
项目社区:https://github.com/annypatel/RetroCrawler

开源协议:MIT License

下载


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

  1. 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.

  1. Retrofit retrofit = new Retrofit.Builder()
  2. .baseUrl("https://api.example.com")
  3. .addConverterFactory(RetroCrawlerJSpoonConverterFactory.create())
  4. .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

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

Usage

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

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