Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

gquarles/jailbase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A wrapper for the JailBase API in pure dart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages