Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

6.6 KB
Raw Blame
{
    "result": {
        "responses": [
            {
                "call": "POST /tracked-content",
                "status": 400,
                "body": "{\"success\":false,\"code\":\"VALIDATION_ERROR\",\"message\":\"url is required\",\"requestId\":\"req-test\"}"
            },
            {
                "call": "POST /tracked-content",
                "status": 400,
                "body": "{\"success\":false,\"code\":\"VALIDATION_ERROR\",\"message\":\"Only YouTube video links can be tracked. Paste a youtube.com or youtu.be link.\",\"requestId\":\"req-test\"}"
            },
            {
                "call": "POST /tracked-content",
                "status": 400,
                "body": "{\"success\":false,\"code\":\"VALIDATION_ERROR\",\"message\":\"Only YouTube video links can be tracked. Paste a youtube.com or youtu.be link.\",\"requestId\":\"req-test\"}"
            },
            {
                "call": "POST /tracked-content",
                "status": 201,
                "body": "{\"id\":\"00000000-0000-4000-8000-000000000001\",\"url\":\"https://www.youtube.com/watch?v=abc\",\"label\":\"Video\",\"category\":\"Music\",\"contentType\":\"youtube\",\"title\":\"Watch\",\"channelTitle\":\"Ribbon\",\"channelId\":\"UC1\",\"thumbnail\":\"m\",\"publishedAt\":\"2026-08-01T10:00:00Z\",\"viewCount\":1500,\"likeCount\":40,\"commentCount\":3,\"isShort\":false,\"permalink\":\"https://www.youtube.com/watch?v=abc\",\"lastFetchedAt\":\"2026-09-01T12:00:00.000Z\"}"
            },
            {
                "call": "POST /tracked-content",
                "status": 201,
                "body": "{\"id\":\"00000000-0000-4000-8000-000000000002\",\"url\":\"https://youtu.be/abc\",\"label\":\"Mine\",\"category\":\"\",\"contentType\":\"youtube\",\"title\":\"Watch\",\"channelTitle\":\"Ribbon\",\"channelId\":\"UC1\",\"thumbnail\":\"m\",\"publishedAt\":\"2026-08-01T10:00:00Z\",\"viewCount\":1500,\"likeCount\":40,\"commentCount\":3,\"isShort\":false,\"permalink\":\"https://www.youtube.com/watch?v=abc\",\"lastFetchedAt\":\"2026-09-01T12:00:00.000Z\"}"
            }
        ],
        "queries": [
            {
                "type": "insert",
                "table": "tracked_posts",
                "values": {
                    "id": "00000000-0000-4000-8000-000000000001",
                    "user_id": "user-1",
                    "url": "https://www.youtube.com/watch?v=abc",
                    "label": "Video",
                    "category": "Music",
                    "content_type": "youtube",
                    "data": {
                        "contentType": "youtube",
                        "title": "Watch",
                        "channelTitle": "Ribbon",
                        "channelId": "UC1",
                        "thumbnail": "m",
                        "publishedAt": "2026-08-01T10:00:00Z",
                        "viewCount": 1500,
                        "likeCount": 40,
                        "commentCount": 3,
                        "isShort": false,
                        "permalink": "https://www.youtube.com/watch?v=abc",
                        "lastFetchedAt": "2026-09-01T12:00:00.000Z"
                    }
                },
                "filters": []
            },
            {
                "type": "select",
                "table": "tracked_posts",
                "columns": "id, url, label, category, content_type, created_at, updated_at, data",
                "filters": [
                    [
                        "id",
                        "00000000-0000-4000-8000-000000000001"
                    ],
                    [
                        "user_id",
                        "user-1"
                    ],
                    [
                        "content_type",
                        "youtube"
                    ]
                ]
            },
            {
                "type": "insert",
                "table": "tracked_posts",
                "values": {
                    "id": "00000000-0000-4000-8000-000000000002",
                    "user_id": "user-1",
                    "url": "https://youtu.be/abc",
                    "label": "Mine",
                    "category": "",
                    "content_type": "youtube",
                    "data": {
                        "contentType": "youtube",
                        "title": "Watch",
                        "channelTitle": "Ribbon",
                        "channelId": "UC1",
                        "thumbnail": "m",
                        "publishedAt": "2026-08-01T10:00:00Z",
                        "viewCount": 1500,
                        "likeCount": 40,
                        "commentCount": 3,
                        "isShort": false,
                        "permalink": "https://www.youtube.com/watch?v=abc",
                        "lastFetchedAt": "2026-09-01T12:00:00.000Z"
                    }
                },
                "filters": []
            },
            {
                "type": "select",
                "table": "tracked_posts",
                "columns": "id, url, label, category, content_type, created_at, updated_at, data",
                "filters": [
                    [
                        "id",
                        "00000000-0000-4000-8000-000000000002"
                    ],
                    [
                        "user_id",
                        "user-1"
                    ],
                    [
                        "content_type",
                        "youtube"
                    ]
                ]
            }
        ],
        "requests": [
            {
                "url": "https://www.googleapis.com/youtube/v3/videos?part=snippet%2Cstatistics&id=abc&key=YTKEY",
                "method": "GET"
            },
            {
                "url": "https://www.googleapis.com/youtube/v3/videos?part=snippet%2Cstatistics&id=abc&key=YTKEY",
                "method": "GET"
            }
        ],
        "logLines": []
    },
    "withoutKey": {
        "responses": [
            {
                "call": "POST /tracked-content",
                "status": 503,
                "body": "{\"success\":false,\"code\":\"NOT_CONFIGURED\",\"message\":\"YouTube API key not configured on this server\",\"requestId\":\"req-test\"}"
            }
        ],
        "queries": [],
        "requests": [],
        "logLines": [
            [
                "error",
                "{\"level\":\"error\",\"message\":\"request failed\",\"requestId\":\"req-test\",\"userId\":\"user-1\",\"code\":\"NOT_CONFIGURED\",\"status\":503,\"error\":\"YouTube API key not configured on this server\",\"errorName\":\"NotConfiguredError\"}"
            ]
        ]
    }
}