pub struct Article {Show 25 fields
pub identifier: u64,
pub name: String,
pub url: String,
pub abstract_text: Option<String>,
pub description: Option<String>,
pub date_modified: DateTime<Utc>,
pub date_previously_modified: Option<DateTime<Utc>>,
pub in_language: Language,
pub is_part_of: ProjectRef,
pub namespace: Option<Namespace>,
pub main_entity: Option<WikidataEntity>,
pub additional_entities: Option<Vec<WikidataEntityUsage>>,
pub categories: Option<Vec<Category>>,
pub templates: Option<Vec<Template>>,
pub redirects: Option<Vec<Redirect>>,
pub version: Version,
pub previous_version: OptionalPreviousVersion,
pub watchers_count: Option<u64>,
pub protection: Option<Vec<Protection>>,
pub visibility: Option<Visibility>,
pub image: Option<Image>,
pub license: Vec<License>,
pub article_body: Option<ArticleBody>,
pub event: Option<EventMetadata>,
pub has_parts: Option<Vec<Section>>,
}Expand description
Complete article from Enterprise API.
This is the primary data structure returned by all Enterprise APIs. The same schema is used across On-demand, Snapshot, and Realtime endpoints.
§Example
use wme_models::Article;
use serde_json;
let json = r#"{
"name": "Squirrel",
"identifier": 28492,
"url": "https://en.wikipedia.org/wiki/Squirrel",
"date_created": "2001-01-15T00:00:00Z",
"date_modified": "2024-01-15T12:00:00Z",
"in_language": {"identifier": "en", "name": "English"},
"is_part_of": {"identifier": "enwiki"},
"namespace": {"identifier": 0, "name": ""},
"license": [{"name": "CC BY-SA 4.0", "url": "https://creativecommons.org/licenses/by-sa/4.0/"}],
"version": {
"identifier": 1182847293,
"editor": {"identifier": 12345, "name": "SomeUser"}
}
}"#;
let article: Article = serde_json::from_str(json).unwrap();
assert_eq!(article.name, "Squirrel");
assert_eq!(article.identifier, 28492);Fields§
§identifier: u64Article ID (MediaWiki page ID)
name: StringArticle name/title
url: StringArticle URL
abstract_text: Option<String>Article abstract/summary
description: Option<String>Short description (e.g., “Family of rodents”)
date_modified: DateTime<Utc>Last modification timestamp
date_previously_modified: Option<DateTime<Utc>>Before-last modification timestamp
in_language: LanguageLanguage information
is_part_of: ProjectRefProject this article belongs to (simplified reference)
namespace: Option<Namespace>Namespace information
main_entity: Option<WikidataEntity>Main Wikidata entity (primary topic)
additional_entities: Option<Vec<WikidataEntityUsage>>Additional Wikidata entities used
categories: Option<Vec<Category>>Categories this article belongs to
templates: Option<Vec<Template>>Templates used in this article
redirects: Option<Vec<Redirect>>Redirects to this article (alternative names)
version: VersionCurrent version information with credibility signals
previous_version: OptionalPreviousVersionPrevious version information
watchers_count: Option<u64>Number of editors watching this page
protection: Option<Vec<Protection>>Protection settings (edit/move restrictions)
visibility: Option<Visibility>Visibility flags (for visibility-change events)
image: Option<Image>Main image for the article
license: Vec<License>License(s) for this article (usually CC-BY-SA)
article_body: Option<ArticleBody>Article body content (HTML and wikitext)
event: Option<EventMetadata>Event metadata (present in Realtime API responses)
has_parts: Option<Vec<Section>>Has parts - structured content sections (when using fields filter)