Skip to content

updates

GET /v4/updates

This method returns a list of updated records. For official documentation of the endpoint, please refer to the Swagger documentation.

Parameters

ParamsTypeRequiredDescription
queriesobjectYesSearch parameters to restrict the result
queries.sincestringYesThe timestamp to get updates in epoch Unix format in seconds
queries.typestringOptionalRestrict results to a specific type of entities
queries.actionstringOptionalRestrict results to a specific type of action
queries.pagestringOptionalRestrict results to a specific page

Examples

With required queries parameters

import { TheTVDB } from '@untidy/thetvdb';
const client = new TheTVDB('access token');
const data = await client.updates({ since: '1696118400' });
Successful response output
{
status: 'success',
data: [
{
recordType: '',
recordId: 9932019,
methodInt: 2,
method: 'update',
extraInfo: '',
userId: 0,
timeStamp: 1696118400,
entityType: 'episodes',
},
// ...
],
links: {
prev: null,
self: 'https://api4.thetvdb.com/v4/updates?since=1696118400&page=0',
next: 'https://api4.thetvdb.com/v4/updates?since=1696118400&page=1',
total_items: 1529588,
page_size: 500,
},
};

Restriction of results to page and action

import { TheTVDB } from '@untidy/thetvdb';
const client = new TheTVDB('access token');
const data = await client.updates({ since: '1696118400', action: 'delete', page: '2' });
Successful response output
{
status: 'success',
data: [
{
recordType: '',
recordId: 63673925,
methodInt: 3,
method: 'delete',
extraInfo: '',
userId: 0,
timeStamp: 1696337198,
entityType: 'artwork',
},
// ...
],
links: {
prev: 'https://api4.thetvdb.com/v4/updates?since=1696118400&action=delete&page=1',
self: 'https://api4.thetvdb.com/v4/updates?since=1696118400&action=delete&page=2',
next: 'https://api4.thetvdb.com/v4/updates?since=1696118400&action=delete&page=3',
total_items: 53306,
page_size: 500,
},
};