Class CommonsMediaSnak

class for the CommonsMediaSnak

most used property of this type P18 (image)

Hierarchy (view full)

  • Snak
    • CommonsMediaSnak

Constructors

Properties

datatype: string = 'commonsMedia'
fileName: null | string

the file name as used in the wiki commons url

hash: undefined | string
property: `P${number}`
snaktype: SnakType

Accessors

  • gets the link to the wiki commons page

    Returns string

    the link to the wiki commons page

  • get hasValue(): boolean
  • Returns boolean

    true if the snak has a value

  • gets the link to the image. uses the special:redirect function of wiki commons to find the right url

    Returns string

    the link to the image

  • get internalID(): string
  • create a unique id for the Snak

    Returns string

    the id

Methods

  • this function checks if two snaks are equal

    Parameters

    Returns boolean

    true if the snaks are equal

    Example

    if (snak.equals(other)) {
    // do something
    }

Generated using TypeDoc