fandom 1.0.1 copy "fandom: ^1.0.1" to clipboard
fandom: ^1.0.1 copied to clipboard

discontinued

A library for Fandom APIv1 interaction, which makes it easy to access data from specified fandom URL

example/example.dart

import 'dart:convert';

import 'package:dio/dio.dart';
import 'package:fandom/fandom.dart';
import 'package:fandom/src/fandom.dart';
import 'package:http/http.dart' as http;

Future<void> main() async {
  LocalWikiSearchResultSet resultSet =
      await usingHttp().search.list('Wolverine');
  print('result: ${resultSet.items.first.snippet}');
}

Fandom usingHttp() {
  return Fandom('https://marvel.fandom.com',
      (path) => http.get(path).then((value) => json.decode(value.body)));
}

Fandom usingDio() {
  return Fandom('https://marvel.fandom.com',
      (path) => Dio().get(path).then((value) => value.data));
}
3
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A library for Fandom APIv1 interaction, which makes it easy to access data from specified fandom URL

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

json_annotation

More

Packages that depend on fandom