<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<title>Test Roles Index</title>
</head>

<body>
<?php 
require_once 'test-util.php';
require_once dirname(__FILE__) . '/../lib/ca-main.php';
echo '<div class="apitest">';
echo '<h1>roles_index()</h1>';
$ca = new CityApi();
$ca->debug = true;
$ca->json = true;
//$args = array('group_types' => 'Band', 'titles' => 'Leader,Manager'); // find leaders and managers of band groups
$args = array('group_types' => 'CG', 'titles' => 'Leader');
// find all leaders of small groups
$results = $ca->roles_index($args);
//$results = $ca->roles_index(); // find all roles!
echo '<h2>Formatted JSON results: </h2>';
echo '<pre>';
echo format_json($results);
echo '</pre>';
echo '</div>';
?>

</body>
</html>