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

client.tags.list(page: Option<u32>, per_page: Option<u32>)
    -> Result<Page<Tag>, Law4DevsError>

client.tags.get(slug: &str)
    -> Result<Tag, Law4DevsError>

client.tags.iter(per_page: u32)
    -> impl Stream<Item = Result<Tag, Law4DevsError>>

List Tags

let page = client.tags.list(None, None).await?;
for tag in &page.data {
    println!("{} — {} articles", tag.name, tag.article_count);
}

Get a Tag

let tag = client.tags.get("data-protection").await?;
println!("{}: {} frameworks", tag.name, tag.framework_count);

Auto-Paginate

use futures::StreamExt;

let mut stream = Box::pin(client.tags.iter(50));
while let Some(result) = stream.next().await {
    let t = result?;
    println!("{}", t.slug);
}

Tag Fields

FieldTypeDescription
idu32Internal ID
slugStringURL-safe identifier
nameStringDisplay name
descriptionOption<String>Tag description
framework_countu32Frameworks using this tag
article_countu32Articles with this tag