trustcafe-api-wrapper/README.md
simonwt c5d074d178 Todo
Make comments
2026-03-31 20:04:08 +01:00

856 B

Trustcafe API Wrapper

Intended use (not working yet but testing.py does)

import trustcafeapiwrapper, os


API = trustcafeapiwrapper.APIClient(
    client_id=os.getenv("client_id"),
    client_secret=os.getenv("client_secret")
)

profile = API.run_job('userprofile.get', "simon-little")

Debates

  1. Not sure about the name jobs and run_job. Requests is an existing package dependency though. tasks seems to broard. I'm sure there's probably an already existing name that I can't articulate how to find.
  2. Should these job be called with dot notation? Or with slashes? Or something else? Is it okay to have these as strings?
  3. Should we do validation in the jobs or let the server do that all?

ToDo:

  1. Make more jobs
  2. Make wrappers to make it less cumbersome when posting etc
  3. Publish to PyPi or whatever