WebService::DataDog::Comment - Interface to Comment functions in DataDog's API.
Version 1.0.0
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
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:
message
Text of the comment.
handle
Handle of the user making the comment.
related_event_id
The id of another comment or event to reply to.
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', );
comment_id
ID of existing comment.
Delete an existing comment.
my $comment = $datadog->build('Comment'); $comment->delete( comment_id => $existing_comment );
ID of existing comment to be deleted.
To install WebService::DataDog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::DataDog
CPAN shell
perl -MCPAN -e shell install WebService::DataDog
For more information on module installation, please visit the detailed CPAN module installation guide.