Jennifer Pinkham > WebService-DataDog-0.9.0 > WebService::DataDog::Comment

Download:
WebService-DataDog-0.9.0.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: v0.9.0   Source   Latest Release: WebService-DataDog-1.0.0

NAME ^

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

VERSION ^

Version 0.9.0

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
                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:

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:

delete()

Delete an existing comment.

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

Parameters:

syntax highlighting: