The way that the quickstart demonstrates pin creation is through the copy_pin script. This diff allows the quickstart user to create a video pin using a new --media argument with the copy_pin.py script. This argument can be the file name of a video or an identifier returned by the Pinterest API as part of a media upload. If the media is valid, the script will create a video pin instead of an image pin. Note that the goal is to demonstrate how the API works.
In both v3 and v5, the Pin object is now a subclass of a new ApiMediaObject (which has the video functionality), which is a subclass of ApiObject. Board and User remain subclasses of ApiObject.
This diff includes unit tests for the new functionality and a new end-to-end (e2e) test for the copy_pin script.
There are also some whitespace-only changes to the README that are created by the automated documentation generation code. Running the generation code was necessary to pick up the new argument for the script.
The way that the quickstart demonstrates pin creation is through the copy_pin script. This diff allows the quickstart user to create a video pin using a new
--media
argument with the copy_pin.py script. This argument can be the file name of a video or an identifier returned by the Pinterest API as part of a media upload. If the media is valid, the script will create a video pin instead of an image pin. Note that the goal is to demonstrate how the API works.In both v3 and v5, the Pin object is now a subclass of a new ApiMediaObject (which has the video functionality), which is a subclass of ApiObject. Board and User remain subclasses of ApiObject.
This diff includes unit tests for the new functionality and a new end-to-end (e2e) test for the copy_pin script.
There are also some whitespace-only changes to the README that are created by the automated documentation generation code. Running the generation code was necessary to pick up the new argument for the script.