"""Example: WeChat-Channels-API
SDK attribute: ``client.wechat_channels``
Endpoints: 10
Usage::
python examples/wechat_channels.py
AUTO-GENERATED by scripts/generate_examples.py.
"""
import asyncio
import json
from tikhub import AsyncTikHub
API_KEY = "YOUR_API_KEY"
async def main():
async with AsyncTikHub(api_key=API_KEY) as client:
result = await client.wechat_channels.fetch_default_search(keywords='美食', session_buffer='')
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_search_latest(keywords='美食')
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_search_ordinary(keywords='美食')
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_user_search(keywords='美食博主', page=1)
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_user_search_v2(keywords='美食博主', page=0)
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_video_detail(id='14396973035218999573', exportId='')
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_home_page(username='v2_060000231003b20faec8c4ea8a1ac7d5c80ce434b077535b622489f476b63209b6886fc4a16f@finder', last_buffer='')
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_comments(id='14145780330774202411', lastBuffer='')
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_live_history(username='v2_060000231003b20faec8c5eb811dc1d2cc0cee34b0779397527ceff87326eefb309aac785aa8@finder')
print(json.dumps(result, indent=2, ensure_ascii=False))
result = await client.wechat_channels.fetch_hot_words()
print(json.dumps(result, indent=2, ensure_ascii=False))
if __name__ == "__main__":
asyncio.run(main())