diff --git a/src/routes/screenshot.ts b/src/routes/screenshot.ts index 7264d4d..ee3a7a4 100644 --- a/src/routes/screenshot.ts +++ b/src/routes/screenshot.ts @@ -117,6 +117,9 @@ export const screenshotRouter = Router(); * mobile: * summary: Mobile viewport * value: { "url": "https://example.com", "width": 375, "height": 812, "deviceScale": 2 } + * element: + * summary: Element screenshot + * value: { "url": "https://github.com", "selector": "#readme" } * responses: * 200: * description: Screenshot image binary @@ -263,6 +266,13 @@ export const screenshotRouter = Router(); * maxLength: 5000 * description: Custom JavaScript code to execute on the page before capture (max 5000 chars, 5-second timeout) * example: "document.querySelector('.modal').remove();" + * - name: selector + * in: query + * schema: + * type: string + * maxLength: 200 + * description: CSS selector for element to capture instead of full page/viewport (max 200 chars) + * example: "#main-content" * - name: darkMode * in: query * schema: