create a unique id for the site link
the id
if the private property _url is set then we know the url already exists else we look it up with wikidata-properties package
the url of the site link
this function checks if SiteLinks are equal
the other SiteLink
true if the SiteLink are equal
const siteLink1 = new SiteLink({ site: 'enwiki', title: 'foo' });
const siteLink2 = new SiteLink({ site: 'enwiki', title: 'bar' });
siteLink1.equals(siteLink2); // false
Static
fromcreate a SiteLink from a language and a value
to what wiki is the site link
the title of the page
Optional
badges: string[]the badges of the site link like featured article
Optional
url: stringthe url of the page with domain
the SiteLink object
const SiteLink = SiteLink.fromString('enwiki', 'Berlin');
// or
const SiteLink = SiteLink.fromString('enwiki', 'Berlin', ['Q17437796']);
// or
const SiteLink = SiteLink.fromString(
'enwiki',
'Berlin',
['Q17437796'],
'https://en.wikipedia.org/wiki/Berlin'
);
Generated using TypeDoc
the class for a site link