Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt

Use this file to discover all available pages before exploring further.

Methods

// List frameworks (paginated)
client.frameworks.list(page: Option<u32>, per_page: Option<u32>)
    -> Result<Page<Framework>, Law4DevsError>

// Get a framework by slug
client.frameworks.get(slug: &str)
    -> Result<FrameworkDetail, Law4DevsError>

// Auto-paginate all frameworks
client.frameworks.iter(per_page: u32)
    -> impl Stream<Item = Result<Framework, Law4DevsError>>

List Frameworks

let page = client.frameworks.list(None, None).await?;
println!("{} frameworks", page.meta.total);

for fw in &page.data {
    println!("{} — {}", fw.slug, fw.name);
}
With pagination:
let page = client.frameworks.list(Some(1), Some(10)).await?;

Get a Framework

let gdpr = client.frameworks.get("gdpr").await?;
println!("{}: {} articles", gdpr.name, gdpr.article_count);

Auto-Paginate

use futures::StreamExt;

let mut stream = Box::pin(client.frameworks.iter(20));
while let Some(result) = stream.next().await {
    let fw = result?;
    println!("{}", fw.name);
}

Framework Fields

FieldTypeDescription
idu32Internal ID
slugStringURL-safe identifier (e.g. gdpr)
nameStringFull name
short_nameStringAbbreviated name
celex_numberStringEUR-Lex CELEX number
descriptionOption<String>Short description
is_activeboolWhether actively maintained
statusStringactive or superseded
article_countu32Number of scraped articles
recital_countu32Number of scraped recitals

FrameworkDetail Additional Fields

FieldTypeDescription
eurlex_urlStringLink to original EUR-Lex source
requirement_countu32Total requirements
annex_countu32Total annexes
tag_countu32Number of associated tags
coverageOption<Value>Scrape coverage statistics