Dart wrapper for Nookipedia API. It provides simple methods for retrieving Animal Crossing data.
Features
Contains wrapper methods for the following endpoints:
- Artwork
- Clothing
- Events
- Furniture
- Interiors
- Miscellaneous items available in the game
- Photos and Posters
- Recipes
- Tools
- Villagers
- Insects
- Fish
- Sea Creatures
- Fossils
Getting started
Import the package:
import 'package:nookipedia_flutter/nookipedia_flutter.dart';
Initialize NookipediaClient
before using it:
void main() {
NookipediaClient.initialize(
apiKey: NOOKIPEDIA_API_KEY,
version: API_VERSION_HERE
);
runApp(const MyApp());
}
apiKey
is mandatory. You will have to apply for one here.
version
is optional. It controls which version of the API you are calling.
Usage
Call the methods exposed by the API by using the client instance:
FutureBuilder(
future: NookipediaClient.instance.clothing
.fetchNames(category: ClothingCategory.dressUp),
builder: ((context, AsyncSnapshot<List<String>> snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: CircularProgressIndicator());
}
if (snapshot.hasError) {
return Text(snapshot.error?.toString() ?? "Something went wrong");
}
var data = snapshot.data!;
return ListView.builder(
itemCount: data.length,
itemBuilder: ((context, index) {
return ListTile(title: Text(data[index]));
}),
);
}),
)
Libraries
- nookipedia_flutter
- A dart wrapper for the Nookipedia API