Module Entity.Item

Represents Wikidata Items.

Links to the corresponding Wikipedia articles for this item, closely following the representation of sitelinks in the original JSON as specified in the Wikibase JSON specifications.

Items

class t : id:string -> entity_type:string -> labels:(lang * string) list -> descriptions:(lang * string) list -> aliases:(lang * string list) list -> statements:(propertyid * Statement.t list) list -> sitelinks:(string * sitelink) list -> object ... end

Represents Wikidata Items.

Conversions

val of_string : string -> t

Turns a json string representing an Item (as described in the Wikibase JSON specification) into a t.

val of_entities_string : string -> t

Returns the first entity in a JSON string representing a group of entities as a t. This is provided as a convenience function, as this is the format that requests to https://wikidata.org/wiki/Special:EntityData/{ID}.json (where ID is a Wikidata Entity ID) are returned in.