The following guide explains how you can Add or Remove Videos and TV Series to / from a users My List via the REST API.
Make sure you have requested a valid Access Token for the user making changes to their My List videos.
See our guide on User Access Tokens
Add Video or TV Series to My List
Once have a users access token you can make a POST request to the /mylist endpoint.
{your-domain}/wp-json/wpvsuser/v1/mylist
You need to include the following parameters in the Body of your POST request:
wpvstoken={access-token} videoid={id of Video or Series} videotype={video or show} wpvsaction={add or remove}
Notes:
- If you are adding a single Video (ie: a Movie), the videoid parameter should be set to the ID of the Video you want to add to the users My List. The videotype parameter should be set to "video".
- If you are adding a TV Series. the videoid parameter should be set to the ID of the Video Category (TV Series) you want to add to the users My List. The videotype parameter should be set to "show".
On a successful request, you will receive a JSON response with the following variables:
{ updated: true | false }
Notes:
- If you send a request to add a Video or TV Series that already exists in the users My List, the updated response will be false.
Remove Video or TV Series to My List
- If you are adding an item to the users My List, the wpvsaction parameter should be set to "add".
- If you are removing an item from the users My List, the wpvsaction parameter should be set to "remove".
Comments
0 comments
Article is closed for comments.