This commit is contained in:
parent
29e064cdbb
commit
9454b89d8e
@ -1,4 +1,5 @@
|
|||||||
//! This deals with accessing RIS data.
|
//! This deals with accessing RIS data.
|
||||||
|
|
||||||
pub mod overview;
|
pub mod overview;
|
||||||
|
pub mod paragraphs;
|
||||||
mod parser;
|
mod parser;
|
||||||
|
@ -24,6 +24,14 @@ use super::parser::OgdSearchResult;
|
|||||||
///
|
///
|
||||||
/// - `Ok(Vec<String>)`: A vector of XML file links representing paragraphs from the given law text.
|
/// - `Ok(Vec<String>)`: A vector of XML file links representing paragraphs from the given law text.
|
||||||
/// - `Err(Error)`: An error if there was an issue fetching or parsing the law text.
|
/// - `Err(Error)`: An error if there was an issue fetching or parsing the law text.
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
/// ```
|
||||||
|
/// use risp::risparser::overview::parse;
|
||||||
|
///
|
||||||
|
/// let list_with_xml_links_to_paragraphs = parse(10001905).unwrap();
|
||||||
|
/// assert_eq!(list_with_xml_links_to_paragraphs.len(), 31); // TEG has 31 paragraphs
|
||||||
|
/// assert_eq!(list_with_xml_links_to_paragraphs[0], "https://www.ris.bka.gv.at/Dokumente/Bundesnormen/NOR12025190/NOR12025190.xml"); // Link to first paragraph
|
||||||
/// ```
|
/// ```
|
||||||
pub fn parse(law_id: usize) -> Result<Vec<String>, Error> {
|
pub fn parse(law_id: usize) -> Result<Vec<String>, Error> {
|
||||||
let mut page = 1;
|
let mut page = 1;
|
||||||
|
1
src/risparser/paragraphs.rs
Normal file
1
src/risparser/paragraphs.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
//! Deals with getting all paragraphs for a given law text
|
Loading…
Reference in New Issue
Block a user