We would like to implement Just Watch on Creepy Catalog to provide affiliate links to streaming sources for movies and television. We have been in contact with them for the required credentials.
According to their documentation, their "widget" ( I use quotes because this isn't a widget in the WordPress sense of the word ) works by running a bit of JavaScript that looks for elements with specific data attributes to identify a movie or tv series and replaces them with an iframe containing the links to streaming sources.
Their WordPress integration expects that we will take responsibility for adding the JavaScript file to the appropriate pages and author the correct HTML that their JavaScript expects to find.
Acceptance Criteria
[ ] A block that accepts input to help identify the movie or TV series and outputs the HTML in the rendered content without the post author ever being responsible for editing or copypasting HTML.
[ ] A conditional check that enqueues the relevant JavaScript file if the block is present in the post content.
[ ] CSS for min-height on Just Watch iframes to minimize layout shift.
[ ] A settings page for the relevant user token, note that this token is included in the rendered HTML.
[ ] Rendered content must include a Just Watch logo underneath affiliate links iframe.
Known Limitations
When editing a post, the author will not know for certain if Just Watch has results for the movie or tv show they have entered, in fact they will not know if Just Watch was able to correctly identify what they entered. They can find the title in question through the Just Watch website, TMDB or IMDB to be more certain.
A future update might add a TMDB search in the editor to be sure we found the right title.
This doesn't have to scale yet. We expect that more than 2-3 movies on a page would be slow for users.
A future update might make server-side use of the Just Watch API to find streaming sources.
However the client-side version has the added benefit of knowing the user's country of origin.
This doesn't have work with RSS or newsletters yet.
A future update might use the server-side API to create static links we can include in newsletters and RSS.
We would like to implement Just Watch on Creepy Catalog to provide affiliate links to streaming sources for movies and television. We have been in contact with them for the required credentials.
According to their documentation, their "widget" ( I use quotes because this isn't a widget in the WordPress sense of the word ) works by running a bit of JavaScript that looks for elements with specific data attributes to identify a movie or tv series and replaces them with an iframe containing the links to streaming sources.
Their WordPress integration expects that we will take responsibility for adding the JavaScript file to the appropriate pages and author the correct HTML that their JavaScript expects to find.
Acceptance Criteria
Known Limitations