Skip to content
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

Add DELETE to allowed methods to enable management of WebHooks via the Subscriptions API #21

Open
ghost opened this issue Jan 17, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 17, 2021

    elif method == 'DELETE':
        request_params = {k:v for k,v in {
            "params": params,
            "headers": headers,
            "json": json,
            "data": body if json is None else None, }.items() if v != None}
        response = self.session.delete(url, **request_params)

this small patch to walmart.py in send_request can allow additional functionality

using it like this
r = w.send_request( 'DELETE',
'https://marketplace.walmartapis.com/v3/webhooks/subscriptions/{}'.format(subscription['subscriptionId']),
request_headers={"Content-type":"application/json","Accept":"application/json"})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

0 participants