connectapi icon indicating copy to clipboard operation
connectapi copied to clipboard

simplify `set_image_*()` functions

Open toph-allen opened this issue 5 months ago • 0 comments

There are three functions to update content images:

  • set_image_path(content, path) uploads a local image file to Connect for use as a content image;
  • set_image_url(content, url) downloads an image from a URL and calls set_image_path();
  • set_image_webshot(content, ...) uses webshot2 to take a screenshot of the content, and calls set_image_path() with that resulting image.

The first function should just become set_content_image(content, path) or something similar. The other two should become recipes in the cookbook.

The tests for set_image_webshot() are very flaky, so they have been disabled in CI.

toph-allen avatar Aug 30 '24 21:08 toph-allen