def __init__(self): self.appliers = { 'inline': InlineLayersApplier(), 'paragraph': ParagraphLayersApplier(), 'search_replace': SearchReplaceLayersApplier() } self.api = api_reader.ApiReader()
def get_regulation(regulation, version): """ Get the regulation JSON tree. Manipulate the label a bit for easier access in the templates.""" api = api_reader.ApiReader() reg = api.regulation(regulation, version) if reg: title = reg['title'] # up till the paren match = re.search('part \d+[^\w]*([^\(]*)', title, re.I) if match: reg['title_clean'] = match.group(1).strip() match = re.search('\(regulation (\w+)\)', title, re.I) if match: reg['reg_letter'] = match.group(1) return reg
def get_diff_json(regulation, older, newer): api = api_reader.ApiReader() return api.diff(regulation, older, newer)
def get_notice(part, document_number): """ Get a the data from a particular notice, given the Federal Register document number. """ api = api_reader.ApiReader() return api.notice(part, document_number)
def get_all_notices(part): api = api_reader.ApiReader() return notices.fetch_all(api, part)
def get_tree_paragraph(paragraph_id, version): """Get a single level of the regulation tree.""" api = api_reader.ApiReader() return api.regulation(paragraph_id, version)
def __init__(self): config = conf.ConfigurationHandler().get_configuration_section( 'ZILLOW') self._zwid = config['zwid'] self._api_base_url = config['api_url'] self._api = api.ApiReader()