Represents the author of a comment.

Constructors

  • Creates a new author.

    Parameters

    • options: Partial<AuthorOptions> = {}

      An object providing values to initialize this instance.

    Returns Author

Properties

email: string

The author's mail address. If you set it to "akismet-guaranteed-spam@example.com", Akismet will always return true.

ipAddress: string

The author's IP address.

name: string

The author's name. If you set it to "viagra-test-123", Akismet will always return true.

role: string

The author's role. If you set it to "administrator", Akismet will always return false.

url: null | URL

The URL of the author's website.

userAgent: string

The author's user agent, that is the string identifying the Web browser used to submit comments.

Methods

  • Converts this object to a map in JSON format.

    Returns Record<string, any>

    The map in JSON format corresponding to this object.

  • Creates a new author from the specified JSON object.

    Parameters

    • json: Record<string, any>

      A JSON object representing an author.

    Returns Author

    The instance corresponding to the specified JSON object.