The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::DataDog::Comment - Interface to Comment functions in DataDog's API.

VERSION

Version 1.0.3

SYNOPSIS

This module allows you interact with the Comment endpoint of the DataDog API.

Per DataDog: "Comments are how discussion happens on Datadog. You can create, edit, delete and reply to comments. Comments are essentially special forms of events that appear in the stream. They can start a new discussion thread or optionally, reply in another thread."

NOTE: the 'handle' parameter must specify a user on the "team" (https://app.datadoghq.com/account/team) associated with your account, otherwise your update will fail with a 400 or 404 error

METHODS

create()

Create a new comment. This includes both starting a new thread as well as replying to an existing comment (specified with the 'related_event_id' parameter).

        my $comment = $datadog->build('Comment');
        $comment->create(
                message          => $message,  # the comment text
                handle           => $handle,   # optional - handle of the user making the comment
FIXTHIS!                related_event_id => $event_id, # optional - the id of another comment or event to reply to
        );
        
        Example:
        $comment->create(
                message => 'My message goes here',
                handle  => 'user@example.com',
        );
        

Parameters:

  • message

    Text of the comment.

  • handle

    Handle of the user making the comment.

  • related_event_id FIXTHIS!

    The id of another comment or event to reply to.

update()

Modify an existing comment.

        my $comment = $datadog->build('Comment');
        $comment->update(
                comment_id => $comment_id # id of existing comment
                message    => $message,   # comment text
                handle     => $handle,    # optional - handle of the user making the comment
        );
        
        Example:
        $comment->update(
                comment_id => $existing_comment,
                message    => 'My message goes here',
                handle     => 'user@example.com',
        );
        

Parameters:

  • comment_id

    ID of existing comment.

  • message

    Text of the comment.

  • handle

    Handle of the user making the comment.

delete()

Delete an existing comment.

        my $comment = $datadog->build('Comment');
        $comment->delete( comment_id => $existing_comment );
        

Parameters:

  • comment_id

    ID of existing comment to be deleted.