diffbot 0.1.1

#Diffbot A Dart client library for Diffbot APIs.

Q: What is Diffbot?
A: Diffbot is "a visual learning robot that identifies and extracts the important parts of any web page"

Supported APIs:

See Diffbot documentation

  • Article API: The Article API is used to extract clean article text from news article web pages.
  • Frontpage API: The Frontpage API takes in a multifaceted “homepage” and returns individual page elements.
  • Product API: The Product API analyzes a shopping or e-commerce product page and returns information on the product.

Usage

It works both in the browser and in the console.
Browser usage:

import 'package:diffbot/diffbot_browser.dart';
main() {
  var client = new Client('YOUR_TOKEN');
  client.getArticle('http://www.aweso.me/blog/post').then((Article article) {
    doSomethingWith(article);
    // you can use article's title, date, author, metadata, etc:
    // article.title
    // article.date
  });
}

Console usage:

import 'package:diffbot/diffbot_console.dart';
main() {
  var client = new Client('YOUR_TOKEN');
  client.getFrontpage('http://yourfavorite.newspaper.com').then((Frontpage fp) {
    // see documentation
  });
}

Status

Build Status

Examples

See example/ directory.

Documentation

Official Diffbot APIs documentation can be found at http://diffbot.com/products/automatic/

Dart documentation can be found at http://claudiodangelis.com/docs/diffbot.

License

BSD 2-Clause License. See LICENSE.

Reporting bugs

You can file bugs at diffbot/issues.

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  diffbot: "^0.1.1"

2. Install it

You can install packages from the command line:

$ pub get

Alternatively, your editor might support 'pub get'. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:diffbot/diffbot_browser.dart';
import 'package:diffbot/diffbot_console.dart';

Platforms

About

A Dart client library for Diffbot APIs.

Author

Email claudiodangelis@gmail.com Claudio d'Angelis

Homepage

github.com/claudiodangelis/diffbot

Documentation

www.dartdocs.org/documentation/diffbot/0.1.1/

Uploader

claudiodangelis@gmail.com

License

BSD

Published

Nov 13, 2013

Share