from .search import search
from .connection import setup


from pprint import pprint
import asyncio

API_KEY = "8brBRfojGz77s9BxevrTL9He1gsQkpWE7P8rNnNk"
JWT = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5USkNNVVEyUmpBd1JUQXdORFk0TURRelF6SkZRelV4TWpneU5qSTNNRFJGTkRZME0wSTNSQSJ9.eyJodHRwczovL3N0b2NreC5jb20vY3VzdG9tZXJfdXVpZCI6ImJmYTdhZTk5LTNjMDktMTFmMC1hNzlhLTEyNTY4ZTk4MTE2ZiIsImh0dHBzOi8vc3RvY2t4LmNvbS9nYV9ldmVudCI6IkxvZ2dlZCBJbiIsImh0dHBzOi8vc3RvY2t4LmNvbS9lbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5zdG9ja3guY29tLyIsInN1YiI6ImF1dGgwfDY4Mzc3ZTY0MzVkYTUyZjg1YzBhNWUxMyIsImF1ZCI6WyJnYXRld2F5LnN0b2NreC5jb20iLCJodHRwczovL3N0b2NreC1wcm9kLnN0b2NreC1wcm9kLmF1dGgwYXBwLmNvbS91c2VyaW5mbyJdLCJpYXQiOjE3NDg2OTM4NjAsImV4cCI6MTc0ODczNzA2MCwic2NvcGUiOiJvcGVuaWQgb2ZmbGluZV9hY2Nlc3MiLCJhenAiOiJoWk9OVkpYOXRSUlc3NGtiRmZackN6S0RkSWhSejE1ZCJ9.ZGGUsqccMwPY1Ce4KL4KL1qq9T-2NkVexpmjov3t7AaJuHqvswv5JA408vaJYO7GbZJn-XxOb-39KyKzcn1PMUUfeO0n3JoP_NlSiXHcfJ54aWgRRsQFy5XzGAyVVOah1OE20QThITB4v6xMiZwWuM28QH_W0gAoUTFrZB8FW6HdKIOAUeZCsopCGGnKFEVPaOl1aTPJKz7_bVwD9DdTRAA_iGCx6BbTMhp4-B_i1RVucoKS46YHKtxCAfm47A03JgUNlbpnh0lVF5YEkCf-WHOukkMSvz2sbDgLqewlids-ugRPZYa_cS8vbzejQi9N9TVLbzGoI5hNwc8RT7_zLA"

setup(API_KEY, JWT)


async def main():
    res = await search({"query": "CU9225-001", "pageSize": 4})
    pprint(res)


asyncio.run(main())
