diffbot 0.1.1

  • README.md
  • Installing
  • Versions
  • 24

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

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

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
81 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
24

Platforms

Detected platforms: web

Platform components identified in package: html, io, js, mirrors.

Suggestions

  • Fix lib/src/browser/client.dart.

    Strong-mode analysis of lib/src/browser/client.dart failed with the following error:

    line: 21 col: 16
    The setter 'handler' isn't defined for the class 'Proxy<Proxy>'.

  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 1 error(s) and 0 warning(s).

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use diffbot.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=0.8.10+6 <2.0.0
js >=0.2.0 <0.3.0 0.2.2 0.6.1
Transitive dependencies
browser 0.10.0+2
Dev dependencies
unittest >=0.9.0 <0.10.0