A simple lightweight wrapper for the JailBase API
Please feel free to contribute
Please add jailbase
as a dependency in your pubspec.yaml file
Currently you can only get the recent arrests as the JailBase API is broken and their pagination system does not work. You can get recent arrests from a jail by just passing the jail ID
import 'package:jailbase/jailbase.dart';
void main() async {
List<Arrest> arrests = await JailBase.getArrests('az-mcso');
for (Arrest arrest in arrests) {
print(arrest.name);
}
}
Get the list of all the jails you can gather arrest data from.
import 'package:jailbase/jailbase.dart';
void main() async {
List<Jail> jails = await JailBase.getJails();
for (Jail jail in jails) {
print(jail.name);
print(jail.id);
}
}
- Finish the wrapper whenever JailBase fixes their API
- Better documentation