jailbase 0.0.2 copy "jailbase: ^0.0.2" to clipboard
jailbase: ^0.0.2 copied to clipboard

A wrapper for the jailbase API

JailBase #

A simple lightweight wrapper for the JailBase API

GitHub #

Please feel free to contribute

Usage #

Please add jailbase as a dependency in your pubspec.yaml file

Get Arrests From a Jail #

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

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);
	}
}

TODO: #

  • Finish the wrapper whenever JailBase fixes their API
  • Better documentation
2
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A wrapper for the jailbase API

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, http

More

Packages that depend on jailbase