927 B
927 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
- Not sure about the name
jobsandrun_job. Requests is an existing package dependency though.tasksseems to broard. I'm sure there's probably an already existing name that I can't articulate how to find. - Should these
jobbe called with dot notation? Or with slashes? Or something else? Is it okay to have these as strings? - Should we do validation in the
jobsor let the server do that all? wrappedis an awkward name. What's more proper? But also obvious?
ToDo:
- Make more jobs
- Make wrappers to make it less cumbersome when posting etc
- Publish to PyPi or whatever