Created
March 1, 2016 20:39
-
-
Save clintonb/ed7237a5d308bb80c58c to your computer and use it in GitHub Desktop.
Delete Otto baskets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from edx_rest_api_client.client import EdxRestApiClient | |
ACCESS_TOKEN = '' | |
basket_ids = [] | |
api_client = EdxRestApiClient('https://ecommerce.stage.edx.org/api/v2/', oauth_access_token=ACCESS_TOKEN) | |
for basket_id in basket_ids: | |
if not api_client.baskets(basket_id).delete(): | |
print('Failed to delete basket [{}].'.format(basket_id)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment