public static function info($address_id) { $address_id = (int) $address_id; if ($address_id) { $url = MASTER_ADDRESS . '/addresses/viewAddress.php?format=json;address_id=' . urlencode($address_id); $json = WebService::loadJsonResponse($url); self::createPurposeVariables($json); return $json; } }
public static function members($master_address_district) { if (!self::$json) { $url = CIVIC_LEGISLATION . '/committees/members?format=json;committee_id=' . self::COUNCIL_ID; self::$json = WebService::loadJsonResponse($url); } $members = []; foreach (self::$json['seats'] as $seat) { if ($seat['name'] === self::$councilDistricts[$master_address_district]) { $members[] = $seat['currentMember']; } } return $members; }