- Key verification: checks an Akismet API key and gets a value indicating whether it is valid.
- Comment check: checks a comment and gets a value indicating whether it is spam.
- Submit spam: submits a comment that was not marked as spam but should have been.
- Submit ham: submits a comment that was incorrectly marked as spam but should not have been.
Installing via Pub
1. Depend on it
Add this to your package's
dependencies: akismet: any
2. Install it
If you're using the Dart Editor, choose:
Menu > Tools > Pub Get
Or if you want to install from the command line, run:
$ pub get
3. Import it
Now in your Dart code, you can use:
import 'package:akismet/html.dart'; // In browser applications. import 'package:akismet/io.dart'; // In console applications.
var client = new Client('123YourAPIKey', Uri.parse('http://your.blog.url')); client.verifyKey().then((isValid) => print(isValid ? 'Your API key is valid.' : 'Your API key is invalid.') );
var comment = new Comment('A comment.', new Author('An author.')); client.checkComment(comment).then((isSpam) => print(isSpam ? 'The comment is marked as spam.' : 'The comment is marked as ham.') );
client.submitSpam(comment).then((_) => print('Spam submitted.')); client.submitHam(comment).then((_) => print('Ham submitted.'));
Akismet.dart is distributed under the MIT License.
Prevent comment spam using Akismet service.
dart:htmlimplementation of the package. Import this library in console applications.
dart:ioimplementation of the package. Import this library in console applications.