Discussions#
For usage information and examples, see Discussions
- class dataikuapi.dss.discussion.DSSObjectDiscussions(client, project_key, object_type, object_id)#
A handle to manage discussions on a DSS object.
Important
Do not create this class directly, instead use
dataikuapi.DSSClient.get_object_discussions()
on any commentable DSS object.- list_discussions()#
Gets the list of discussions on the object.
- Returns:
list of discussions on the object
- Return type:
- create_discussion(topic, message)#
Creates a new discussion with one message.
- Parameters:
topic (str) – the discussion topic
message (str) – the markdown formatted first message
- Returns:
the newly created discussion
- Return type:
- get_discussion(discussion_id)#
Gets a specific discussion.
- Parameters:
discussion_id (str) – the discussion ID
- Returns:
the discussion
- Return type:
- class dataikuapi.dss.discussion.DSSDiscussion(client, project_key, object_type, object_id, discussion_id, discussion_data, discussion_data_has_replies)#
A handle to interact with a discussion.
Important
Do not call directly, use
dataikuapi.dss.discussion.DSSObjectDiscussions.get_discussion()
,dataikuapi.dss.discussion.DSSObjectDiscussions.create_discussion()
ordataikuapi.dss.discussion.DSSObjectDiscussions.list_discussions()
.- get_metadata()#
Gets the discussion metadata.
- Returns:
the discussion metadata
- Return type:
dict
- set_metadata(discussion_metadata)#
Updates the discussion metadata.
- Parameters:
discussion_metadata (dict) – the discussion metadata
- get_replies()#
Gets the list of replies in this discussion.
- Returns:
a list of replies
- Return type:
- add_reply(text)#
Adds a reply to a discussion.
- Parameters:
text (str) – the markdown formatted text to reply
- class dataikuapi.dss.discussion.DSSDiscussionReply(reply_data)#
A read-only handle to access a discussion reply.
Important
Do not create this class directly, use
dataikuapi.dss.discussion.DSSDiscussion.get_replies()
- get_raw_data()#
Gets the reply raw data.
- Returns:
the reply data
- Return type:
dict
- get_text()#
Gets the reply text.
- Returns:
the reply text
- Return type:
str
- get_author()#
Gets the reply author.
- Returns:
the author ID
- Return type:
str
- get_timestamp()#
Gets the reply timestamp.
- Returns:
the reply timestamp
- Return type:
long
- get_edited_timestamp()#
Gets the last edition timestamp.
- Returns:
the last edition timestamp
- Return type:
long