| 123456789101112131415161718192021222324252627282930313233343536373839 |
- import pathlib
- current = pathlib.Path(__file__).parent
- root = current.parent
- import sys
- sys.path.append(str(root))
- import assets
- """ Make sure You have API key and CX in config file. """
- """ https://programmablesearchengine.google.com/ """
- location = root / pathlib.Path("config.json")
- resources = assets.config_loader(assets.app_config).load(location).resources
- autoadder = resources.autoadder
- print("Questing 9788382752656...")
- print(autoadder.find("9788382752656"))
- print()
- print("Testing app:")
- factory = assets.user_factory()
- factory.nick = "sample"
- factory.password = "password"
- user = factory.result
- collection = assets.users_collection()
- collection.add(user)
- app = assets.autoadder_app(collection, resources.autoadder)
- print("Questing 9788382752656...")
- print(app.find({
- "apikey": user.apikey,
- "barcode": "9788382752656"
- }))
- print()
|