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.

5.1 KB
Raw Blame
{
    "responses": [
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Account not found\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Account not found\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 404,
            "body": "{\"success\":false,\"code\":\"NOT_FOUND\",\"message\":\"Account not found\",\"requestId\":\"req-test\"}"
        },
        {
            "status": 200,
            "body": "{\"success\":true}"
        },
        {
            "status": 200,
            "body": "[{\"id\":\"yt1\",\"platform\":\"youtube\",\"channelId\":\"UCaaaaaaaaaaaaaaaaaaaaaa\",\"title\":\"Old title\",\"subscriberCount\":1},{\"id\":\"ig1\",\"platform\":\"instagram\",\"igUserId\":\"1789\",\"username\":\"ribbon\",\"tokenExpiresAt\":\"2026-09-05T00:00:00.000Z\",\"followersCount\":1},{\"id\":\"ig2\",\"platform\":\"instagram\",\"igUserId\":\"2000\",\"username\":\"notoken\"}]"
        }
    ],
    "requests": [],
    "calls": [
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "nope"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "other"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "old1"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "id",
                    "yt2"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "select",
            "table": "youtube_connections",
            "columns": "id, user_id, account_id, channel_id, channel_title, scopes, status, refresh_token_enc, access_token_enc, access_token_expires_at, created_at",
            "filters": [
                [
                    "channel_id",
                    "UCmissingmissingmissing0"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "delete",
            "table": "accounts",
            "filters": [
                [
                    "id",
                    "yt2"
                ],
                [
                    "user_id",
                    "user-1"
                ]
            ]
        },
        {
            "type": "insert",
            "table": "audit_events",
            "values": {
                "id": "00000000-0000-4000-8000-000000000001",
                "user_id": "user-1",
                "action": "account.removed",
                "subject_type": "account",
                "subject_id": "yt2",
                "details": {
                    "platform": "youtube"
                }
            },
            "filters": []
        },
        {
            "type": "select",
            "table": "accounts",
            "columns": "id, platform, data",
            "filters": [
                [
                    "user_id",
                    "user-1"
                ],
                [
                    "platform",
                    [
                        "youtube",
                        "instagram"
                    ],
                    "in"
                ]
            ]
        }
    ],
    "redis": [
        "videos:user-1:yt2",
        "ig:user-1:yt2"
    ],
    "logs": []
}