Skip to content

fix issues with catalog product create/detlete/update #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: magento2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added __init__.py
Empty file.
Binary file added __init__.pyc
Binary file not shown.
Binary file modified magento2/__init__.pyc
Binary file not shown.
12 changes: 6 additions & 6 deletions magento2/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,45 +201,45 @@ def __exit__(self, type, value, traceback):
self.client.service.endSession(self.session)
self.session = None

def get(self, resource_path, arguments):
def get(self, resource_path, arguments={}):
"""
Proxy for REST call API
"""
if self.protocol != 'rest':
raise NotImplementedError("Currently only supports REST API")
return self.client.get(resource_path, arguments)

def post(self, resource_path, arguments):
def post(self, resource_path, arguments={}):
"""
Proxy for REST call API
"""
if self.protocol != 'rest':
raise NotImplementedError("Currently only supports REST API")
return self.client.post(resource_path, arguments)

def put(self, resource_path, arguments):
def put(self, resource_path, arguments={}):
"""
Proxy for REST call API
"""
if self.protocol != 'rest':
raise NotImplementedError("Currently only supports REST API")
return self.client.put(resource_path, arguments)

def delete(self, resource_path, arguments):
def delete(self, resource_path, arguments={}):
"""
Proxy for REST call API
"""
if self.protocol != 'rest':
raise NotImplementedError("Currently only supports REST API")
return self.client.delete(resource_path, arguments)
return self.client.delete(resource_path, arguments={})

def patch(self, resource_path, arguments):
"""
Proxy for REST call API
"""
if self.protocol != 'rest':
raise NotImplementedError("Currently only supports REST API")
return self.client.patch(resource_path, arguments)
return self.client.patch(resource_path, arguments={})

def multiCall(self, calls):
"""
Expand Down
Binary file modified magento2/api.pyc
Binary file not shown.
Loading