Private
_internalIDa place to store the internalID so that it does not change if the contents of the object changes
the aliases of the item
the descriptions of the item
the Q-id of the item
the labels of the item
the id of the last revision of the item
the date of last modified
the namespace the item is located in
the id used by wikibase
the sitelinks of the item
the statements of the item
the title of the item. Usually the Q-id of the item
the type of the entity. always 'item'
create a unique id for the Item
the id
finds the difference between two items
the other item
the changes between the two items
const itemA = Item.fromNothing()
const itemB = Item.fromNothing()
itemA.addLabel(new Label({language: "nl", value: "Douglas Adams"}))
const changes = itemA.diff(itemB)
console.log(changes)
this function checks if two items are equal
the other item
true if the items are equal
const itemA = Item.fromNothing()
const itemB = Item.fromNothing()
if(itemA.equals(itemB)){
alert('the items are the same');
}
tries to find a label int the requested language. if non can be found, it will return undefined
the language of the label
the labelA label if it found one or undefined
const label = item.findLabel("nl")
console.log(label.value)
// Douglas Adams
removes a statement from the item
the statement to remove
removeStatements
const statement = item.statements[0]
item.removeStatement(statement)
removes multiple statements from the item
the statements to remove
removeStatement
const statements = item.statements
item.removeStatements(statements)
Static
fromGenerated using TypeDoc
the item in json format