Red Hat Bugzilla – Bug 1259293
Missing documentation of the Python "API"
Last modified: 2016-01-27 08:17:44 EST
If I did not miss something, the Python "API" is currently documented just using some incomplete examples. Or what else do you consider a documentation? I believe it is not possible to speak about API until it is properly documented.
Let me provide some examples of what I think that is missing:
* It is not clear what type of strings the interface expect. Looking into the code, it seems that in Python 2, the Unicode strings are expected.
* It is not clear whether I can reliably use stuff like "project.data['detail']['yum_repos']".
* It is not clear whether I can reliably configure the "Instructions", "Homepage", "Contact" and "External Repositories" using the "cl.create_project" method.
* It is not clear what happens if I pass wrong credentials or if an Internet connection is not available or if a project or build cannot be created.
* It is not clear that I can pass local paths to "cl.create_new_build".
* It is not clear whether I can reliably use "build.handle.get_build_details().results".
* It is not clear whether I can reliably use "cl.get_project_details(name)".
Valentin, can you please address that during APIv2 work?
You probably could find a bit more in the autodoc section:
Some of your questions is answered there.
Thank you. I apologize that I've missed the autodoc section.
I'll just add some other examples I hit during writing my scripts in case it is useful (don't worry, I'm not going to add more):
* It is not clear what happens if:
- the configuration file is not readable or if it is not valid
- if I call `cl.create_project` on an existing project
- if I call `cl.delete_project` on a non-existent project
- if I call `cl.get_project_details` on a non-existent project