diffbot 0.1.1

  • README.md
  • Installing
  • Versions
  • 0

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

Use this package as a library

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:

with pub:


$ 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';
  
Version Uploaded Documentation Archive
0.1.1 Nov 13, 2013 Go to the documentation of diffbot 0.1.1 Download diffbot 0.1.1 archive
0.1.0 Oct 14, 2013 Go to the documentation of diffbot 0.1.0 Download diffbot 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=0.8.10+6 <2.0.0