@@ -15,7 +15,7 @@ class Config(object):
1515
1616 def __getitem__ (self , key ):
1717 url = self .API_URL [0 :]
18- if key != 'Send ' :
18+ if key . lower () != 'send ' :
1919 url = urljoin (url , 'REST/' )
2020 elif key == 'Contactslist_csvdata' :
2121 url = urljoin (url , 'DATA/' )
@@ -46,6 +46,7 @@ def create(self, data, filters=None, action_id=None, **kwargs):
4646 return api_call (self ._auth , 'post' , self ._url , data = data , action = self .action , action_id = action_id , filters = filters , ** kwargs )
4747
4848 new = create
49+ post = create
4950
5051 def update (self , id , data , filters = None , action_id = None , ** kwargs ):
5152 return api_call (self ._auth , 'put' , self ._url , resource_id = id , data = data , action = self .action , action_id = action_id , filters = filters , ** kwargs )
@@ -75,7 +76,7 @@ def api_call(auth, method, url, data=None, filters=None, resource_id=None, extra
7576 headers = build_headers (extra_headers )
7677 req_method = getattr (requests , method )
7778
78- # url = 'http://requestb.in/1emzll91 '
79+ # url = 'http://requestb.in/1fuplcz1 '
7980
8081 try :
8182 response = req_method (url , data = json .dumps (data ), params = filters , headers = headers , auth = auth ,
0 commit comments