3333from builtins import *
3434
3535from past .builtins import basestring
36- from requests_toolbelt import MultipartEncoder
3736
38- from ..generator_containers import generator_container
37+ from ..models . immutable import AttachmentAction
3938from ..restsession import RestSession
40- from ..utils import (
41- check_type , dict_from_items_with_values , is_local_file , is_web_url ,
42- open_local_file ,
43- )
39+ from ..utils import check_type , dict_from_items_with_values
4440
4541
4642API_ENDPOINT = 'attachment/actions'
@@ -56,7 +52,7 @@ class AttachmentActionsAPI(object):
5652 """
5753
5854 def __init__ (self , session , object_factory ):
59- """Init a new AttachmentActionsAPI object with the provided RestSession .
55+ """Initialize a new AttachmentActionsAPI object.
6056
6157 Args:
6258 session(RestSession): The RESTful session object to be used for
@@ -71,21 +67,20 @@ def __init__(self, session, object_factory):
7167 self ._session = session
7268 self ._object_factory = object_factory
7369
74- def create (self , type = None , messageId = None , inputs = None ,
75- ** request_parameters ):
76- """Create an attachment action.
70+ def create (self , type , messageId , inputs , ** request_parameters ):
71+ """Create a new attachment action.
7772
7873 Args:
79- type(attachment action enum ): The type of attachment action.
80- messageId(basestring): The ID of parent message the attachment
81- action is to be performed on .
82- inputs(dict): inputs to attachment fields
74+ type(basestring ): The type of action to perform .
75+ messageId(basestring): The ID of the message which contains the
76+ attachment .
77+ inputs(dict): The attachment action's inputs.
8378 **request_parameters: Additional request parameters (provides
8479 support for parameters that may be added in the future).
8580
8681 Returns:
87- Attachment action : A attachment action object with the details
88- of the created attachment action.
82+ AttachmentAction : A attachment action object with the details of
83+ the created attachment action.
8984
9085 Raises:
9186 TypeError: If the parameter types are incorrect.
@@ -95,7 +90,6 @@ def create(self, type=None, messageId=None, inputs=None,
9590 contain a valid URL or path to a local file.
9691
9792 """
98-
9993 check_type (type , basestring )
10094 check_type (messageId , basestring )
10195 check_type (inputs , dict )
0 commit comments