View a Visual Diff

Retrieves the details of one or more Visual Diffs

Arguments

  • visualdiff - Optional
    The visual diff to list. If not specified, all visual diffs that the user has permission to view are returned.

  • screenshot - Optional
    Only list the visual diffs linked to this screenshot. This argument is ignored if visualdiff is specified.

  • service - Optional
    Only list the visual diffs for this service. This argument is ignored if screenshot or visualdiff are specified.

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

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

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

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

  • data - Optional
    Fetch the visual diff image data with the metadata. This value can be a boolean or a string. If it is one of before, after, or diff, only the corresponding image is returned. If it is true, or a string other than a known image, all three images are returned. Default: false

  • crop - Optional
    When true, the visual diffs 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 visual diff widths are scaled to this value in pixels.

Example

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

Output

Default

{
    "_id": "5cb78cbafd2894ca0f74a966",
    "after": "5cb78ca8fd2894ca0f74a869",
    "before": "5cb6356efd2894ca0f6f4a88",
    "createdAt": "2019-04-17T20:29:46.851Z",
    "differences": 1376883,
    "dimension": 1470000,
    "height": 1050,
    "size": 280545,
    "stale": false,
    "updatedAt": "2019-04-17T20:29:46.851Z",
    "width": 1400,
    "id": "5cb78cbafd2894ca0f74a966",
    "type": "visualdiff",
    "visualdiff": "5cb78cbafd2894ca0f74a966",
    "screenshot": "5cb78ca8fd2894ca0f74a869",
    "service": "5cb78c7197568d8f5aff1b89",
    "preview": "5cb78c6f97568d379cff1b86",
    "repo": "5cb78c6597568dfefaff1b83",
    "project": "5cad02084e25464fadde4aa8"
}

With Image Data

{
    "_id": "5cb78cbafd2894ca0f74a966",
    "after": "5cb78ca8fd2894ca0f74a869",
    "before": "5cb6356efd2894ca0f6f4a88",
    "createdAt": "2019-04-17T20:29:46.851Z",
    "differences": 1376883,
    "dimension": 1470000,
    "height": 1050,
    "size": 280545,
    "stale": false,
    "updatedAt": "2019-04-17T20:29:46.851Z",
    "width": 1400,
    "id": "5cb78cbafd2894ca0f74a966",
    "type": "visualdiff",
    "visualdiff": "5cb78cbafd2894ca0f74a966",
    "screenshot": "5cb78ca8fd2894ca0f74a869",
    "service": "5cb78c7197568d8f5aff1b89",
    "preview": "5cb78c6f97568d379cff1b86",
    "repo": "5cb78c6597568dfefaff1b83",
    "project": "5cad02084e25464fadde4aa8",
    "data": {
        "before": "iVBORw0KGgoAAAAN...",
        "after": "iVBORw0KGgoAAAAN...",
        "diff": "iVBORw0KGgoAAAAN..."
    }
}

With Scaled Image Data

{
    "_id": "5cb78cbafd2894ca0f74a966",
    "after": "5cb78ca8fd2894ca0f74a869",
    "before": "5cb6356efd2894ca0f6f4a88",
    "createdAt": "2019-04-17T20:29:46.851Z",
    "differences": 1376883,
    "dimension": 1470000,
    "height": 1050,
    "size": 280545,
    "stale": false,
    "updatedAt": "2019-04-17T20:29:46.851Z",
    "width": 1400,
    "id": "5cb78cbafd2894ca0f74a966",
    "type": "visualdiff",
    "visualdiff": "5cb78cbafd2894ca0f74a966",
    "screenshot": "5cb78ca8fd2894ca0f74a869",
    "service": "5cb78c7197568d8f5aff1b89",
    "preview": "5cb78c6f97568d379cff1b86",
    "repo": "5cb78c6597568dfefaff1b83",
    "project": "5cad02084e25464fadde4aa8",
    "data": {
        "before": "iVBORw0KGgoAAAAN...",
        "after": "iVBORw0KGgoAAAAN...",
        "diff": "iVBORw0KGgoAAAAN..."
    },
    "scale": 200
}

With Cropped Image Data

{
    "_id": "5cb78cbafd2894ca0f74a966",
    "after": "5cb78ca8fd2894ca0f74a869",
    "before": "5cb6356efd2894ca0f6f4a88",
    "createdAt": "2019-04-17T20:29:46.851Z",
    "differences": 1376883,
    "dimension": 1470000,
    "height": 1050,
    "size": 280545,
    "stale": false,
    "updatedAt": "2019-04-17T20:29:46.851Z",
    "width": 1400,
    "id": "5cb78cbafd2894ca0f74a966",
    "type": "visualdiff",
    "visualdiff": "5cb78cbafd2894ca0f74a966",
    "screenshot": "5cb78ca8fd2894ca0f74a869",
    "service": "5cb78c7197568d8f5aff1b89",
    "preview": "5cb78c6f97568d379cff1b86",
    "repo": "5cb78c6597568dfefaff1b83",
    "project": "5cad02084e25464fadde4aa8",
    "data": {
        "before": "iVBORw0KGgoAAAAN...",
        "after": "iVBORw0KGgoAAAAN...",
        "diff": "iVBORw0KGgoAAAAN..."
    },
    "crop": true
}

With Scaled & Cropped Image Data

{
    "_id": "5cb78cbafd2894ca0f74a966",
    "after": "5cb78ca8fd2894ca0f74a869",
    "before": "5cb6356efd2894ca0f6f4a88",
    "createdAt": "2019-04-17T20:29:46.851Z",
    "differences": 1376883,
    "dimension": 1470000,
    "height": 1050,
    "size": 280545,
    "stale": false,
    "updatedAt": "2019-04-17T20:29:46.851Z",
    "width": 1400,
    "id": "5cb78cbafd2894ca0f74a966",
    "type": "visualdiff",
    "visualdiff": "5cb78cbafd2894ca0f74a966",
    "screenshot": "5cb78ca8fd2894ca0f74a869",
    "service": "5cb78c7197568d8f5aff1b89",
    "preview": "5cb78c6f97568d379cff1b86",
    "repo": "5cb78c6597568dfefaff1b83",
    "project": "5cad02084e25464fadde4aa8",
    "data": {
        "before": "iVBORw0KGgoAAAAN...",
        "after": "iVBORw0KGgoAAAAN...",
        "diff": "iVBORw0KGgoAAAAN..."
    },
    "scale": 200,
    "crop": true
}

results matching ""

    No results matching ""