View a Service Screenshot

Retrieves the details of one or more Tugboat Service screenshots

Arguments

  • screenshot - Optional
    The screenshot to list. If not specified, all screenshots that the user has permission to view are returned.

  • service - Optional
    Only list the screenshots for this service. This argument is ignored if screenshot is specified.

  • preview - Optional
    Only list the screenshots for this preview. This argument is ignored if service or screenshot are specified.

  • repo - Optional
    Only list the screenshots for this repo. This argument is ignored if preview, service, or screenshot are specified.

  • project - Optional
    Only list the screenshots for this project. This argument is ignored if repo, preview, service, or screenshot are specified.

  • screen - Optional
    Filter the results by specific screen sizes. By default, all screens are included. This value should be an array including one or more of: mobile, tablet, desktop, and print. This argument is ignored if screenshot is specified.

  • url - Optional
    Filter the results by screenshots of this URL. This argument is ignored if screenshot is specified.

  • data - Optional
    Fetch the screenshot image data with the list of screenshots. Default: false

  • crop - Optional
    When true, the screenshots are cropped to square dimensions based on the original screenshot's width. Default is false, which returns a full-page image.

  • scale - Optional
    If specified, the screenshot widths are scaled to this value in pixels.

Example

socket.emit('tugboat', 'screenshots', 'list', args, callback);

Output

Default

{
    "_id": "5cb6356dfd2894ca0f6f4a28",
    "preview": "5ca6def1144c3009f1f56641",
    "screen": "mobile",
    "service": "5ca6def2144c30fd71f56644",
    "url": "/",
    "createdAt": "2019-04-16T20:05:01.798Z",
    "size": 311370,
    "updatedAt": "2019-04-16T20:05:01.798Z",
    "id": "5cb6356dfd2894ca0f6f4a28",
    "type": "screenshot",
    "screenshot": "5cb6356dfd2894ca0f6f4a28",
    "repo": "5ca6deec144c30f0d4f5663e",
    "project": "5ca41e19d0efa416e0b65b9d"
}

With Image Data

{
    "_id": "5cb6356dfd2894ca0f6f4a28",
    "preview": "5ca6def1144c3009f1f56641",
    "screen": "mobile",
    "service": "5ca6def2144c30fd71f56644",
    "url": "/",
    "createdAt": "2019-04-16T20:05:01.798Z",
    "size": 311370,
    "updatedAt": "2019-04-16T20:05:01.798Z",
    "id": "5cb6356dfd2894ca0f6f4a28",
    "type": "screenshot",
    "screenshot": "5cb6356dfd2894ca0f6f4a28",
    "repo": "5ca6deec144c30f0d4f5663e",
    "project": "5ca41e19d0efa416e0b65b9d",
    "data": "iVBORw0KGgoAAAAN..."
}

With Scaled Image Data

{
    "_id": "5cb6356dfd2894ca0f6f4a28",
    "preview": "5ca6def1144c3009f1f56641",
    "screen": "mobile",
    "service": "5ca6def2144c30fd71f56644",
    "url": "/",
    "createdAt": "2019-04-16T20:05:01.798Z",
    "size": 311370,
    "updatedAt": "2019-04-16T20:05:01.798Z",
    "id": "5cb6356dfd2894ca0f6f4a28",
    "type": "screenshot",
    "screenshot": "5cb6356dfd2894ca0f6f4a28",
    "repo": "5ca6deec144c30f0d4f5663e",
    "project": "5ca41e19d0efa416e0b65b9d",
    "data": "iVBORw0KGgoAAAAN...",
    "scale": 200
}

With Cropped Image Data

{
    "_id": "5cb6356dfd2894ca0f6f4a28",
    "preview": "5ca6def1144c3009f1f56641",
    "screen": "mobile",
    "service": "5ca6def2144c30fd71f56644",
    "url": "/",
    "createdAt": "2019-04-16T20:05:01.798Z",
    "size": 311370,
    "updatedAt": "2019-04-16T20:05:01.798Z",
    "id": "5cb6356dfd2894ca0f6f4a28",
    "type": "screenshot",
    "screenshot": "5cb6356dfd2894ca0f6f4a28",
    "repo": "5ca6deec144c30f0d4f5663e",
    "project": "5ca41e19d0efa416e0b65b9d",
    "data": "iVBORw0KGgoAAAAN...",
    "crop": true
}

With Scaled & Cropped Image Data

{
    "_id": "5cb6356dfd2894ca0f6f4a28",
    "preview": "5ca6def1144c3009f1f56641",
    "screen": "mobile",
    "service": "5ca6def2144c30fd71f56644",
    "url": "/",
    "createdAt": "2019-04-16T20:05:01.798Z",
    "size": 311370,
    "updatedAt": "2019-04-16T20:05:01.798Z",
    "id": "5cb6356dfd2894ca0f6f4a28",
    "type": "screenshot",
    "screenshot": "5cb6356dfd2894ca0f6f4a28",
    "repo": "5ca6deec144c30f0d4f5663e",
    "project": "5ca41e19d0efa416e0b65b9d",
    "data": "iVBORw0KGgoAAAAN...",
    "scale": 200,
    "crop": true
}

results matching ""

    No results matching ""