Workitem

class rtcclient.workitem.Workitem(url, rtc_obj, workitem_id=None, raw_data=None)[source]

A wrapped class for managing all related resources of the workitem

Parameters:
  • url – the workitem url
  • rtc_obj – a reference to the rtcclient.client.RTCClient object
  • (default is None) (workitem_id) – the id of the workitem, which will be retrieved if not specified
  • raw_data – the raw data ( OrderedDict ) of the request response
addComment(msg=None)[source]

Add a comment to this workitem

Parameters:msg – comment message
Returns:the rtcclient.models.Comment object
Return type:rtcclient.models.Comment
addSubscriber(email)[source]

Add a subscriber to this workitem

If the subscriber has already been added, no more actions will be performed.

Parameters:email – the subscriber’s email
addSubscribers(emails_list)[source]

Add subscribers to this workitem

If the subscribers have already been added, no more actions will be performed.

Parameters:emails_list – a list/tuple/set contains the the subscribers’ emails
getAction(action_name)[source]

Get the rtcclient.models.Action object by its name

Parameters:action_name – the name/title of the action
Returns:the rtcclient.models.Action object
Return type:rtcclient.models.Action
getActions()[source]

Get all rtcclient.models.Action objects of this workitem

Returns:a list contains all the rtcclient.models.Action objects
Return type:list
getCommentByID(comment_id)[source]

Get the rtcclient.models.Comment object by its id

Note: the comment id starts from 0

Parameters:comment_id – the comment id (integer or equivalent string)
Returns:the rtcclient.models.Comment object
Return type:rtcclient.models.Comment
getComments()[source]

Get all rtcclient.models.Comment objects in this workitem

Returns:a list contains all the rtcclient.models.Comment objects
Return type:list
getStates()[source]

Get all rtcclient.models.State objects of this workitem

Returns:a list contains all the rtcclient.models.State objects
Return type:list
getSubscribers()[source]

Get subscribers of this workitem

Returns:a list contains all the rtcclient.models.Member objects
Return type:list
removeSubscriber(email)[source]

Remove a subscriber from this workitem

If the subscriber has not been added, no more actions will be performed.

Parameters:email – the subscriber’s email
removeSubscribers(emails_list)[source]

Remove subscribers from this workitem

If the subscribers have not been added, no more actions will be performed.

Parameters:emails_list – a list/tuple/set contains the the subscribers’ emails