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

ProductVideos cannot create, delete, or delete_all #77

Open
joegarcia opened this issue Jan 22, 2019 · 2 comments
Open

ProductVideos cannot create, delete, or delete_all #77

joegarcia opened this issue Jan 22, 2019 · 2 comments

Comments

@joegarcia
Copy link

joegarcia commented Jan 22, 2019

From the documentation in the following URL, you would think you can create, delete, and delete_all videos for a product:

https://developer.bigcommerce.com/legacy/v2-catalog-products/v2-product-videos

newer documentation:

https://developer.bigcommerce.com/api-reference/catalog/catalog-api/product-videos/

Expected behavior

I expected that you would be able to something like this and it create a video:
video = api.ProductVideos.create(parentid=product_id, url=video_url)

Actual behavior

If I try to create a video I get the following error:
AttributeError: type object 'ProductVideos' has no attribute 'create'

Steps to reproduce behavior

product_id = "id of product"
video_url = "some youtube video url"
video = api.ProductVideos.create(parentid=product_id, url=video_url)

@karen-white
Copy link
Contributor

Thanks for raising the issue @joegarcia ! It looks like the video resource is missing the create and delete methods, even though those methods are allowed:

class ProductVideos(ListableApiSubResource, CountableApiSubResource):

Opened #78 to update methods.

@karen-white
Copy link
Contributor

Hi @joegarcia , the change has merged and should be included if you pull down the latest version of the library. Would you mind testing and closing out this issue if that fixed the problem? Thanks!

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

No branches or pull requests

2 participants