#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tampilkan akun Repliz yang terkait TSC (nama, username, platform)."""
import sys, json
sys.path.insert(0, "/home/mantapman/.hermes/profiles/atun/workspace")
from repliz_client import get_client

c = get_client()
d = c.list_accounts() if hasattr(c, "list_accounts") else None
if d is None:
    d = c._request("GET", "/public/account?page=1&limit=100") if hasattr(c, "_request") else {}
items = d.get("docs") or d.get("data") or d.get("items") or d
for a in items:
    if not isinstance(a, dict):
        continue
    teks = json.dumps(a, ensure_ascii=False).lower()
    if "skin" in teks or "tsc" in teks:
        print(json.dumps({k: a.get(k) for k in ("_id", "id", "name", "username", "platform", "type", "socialId")},
                         ensure_ascii=False))
