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.
Overview
Articles are the core legal text units of each framework. Each article has a number, title, content, paragraphs, and associated tags.
Methods
list()
Future<Page<ArticleSummary>> list(String frameworkSlug, {int? page, int? perPage})
get()
Future<Article> get(String frameworkSlug, String articleNumber)
Future<Page<ArticleSummary>> related(String frameworkSlug, String articleNumber, {int? page, int? perPage})
iter()
Stream<ArticleSummary> iter(String frameworkSlug, {int perPage = 20})
Models
ArticleSummary
| Field | Type | Description |
|---|
id | int | Internal ID |
frameworkSlug | String | Parent framework (e.g. gdpr) |
number | String | Article number (e.g. 5) |
title | String | Article title |
position | int | Ordering position |
paragraphCount | int | Number of paragraphs |
tags | List<Tag> | Semantic tags |
Article
Extends ArticleSummary with:
| Field | Type | Description |
|---|
content | String | Full text content |
paragraphs | List<ArticleParagraph> | Structured paragraphs |
ArticleParagraph
| Field | Type | Description |
|---|
paragraphRef | String | Paragraph reference (e.g. 1, 1a) |
content | String | Paragraph text |
position | int | Ordering position |
Examples
List articles for a framework
final page = await client.articles.list('gdpr');
print('${page.meta.total} GDPR articles');
for (final a in page.data) {
print('Art. ${a.number}: ${a.title}');
}
Get a specific article
final art5 = await client.articles.get('gdpr', '5');
print(art5.content);
for (final p in art5.paragraphs) {
print('[${p.paragraphRef}] ${p.content}');
}
Get related articles
final related = await client.articles.related('gdpr', '5');
for (final a in related.data) {
print('Related: Art. ${a.number} — ${a.title}');
}
Auto-paginate all articles
await for (final a in client.articles.iter('cra')) {
print('Art. ${a.number}: ${a.title} (${a.paragraphCount} paragraphs)');
}