I'd love some feedback on the lib api especially. this is the first REST
wrapper I wrote using cpp, so it feels all a bit clunky to me.
- new internal lib wrapping the REST API
- some testing on the lib, should probably be a bit more comprehensive
- xmlrpc use gone
- BugzillaManager continues to be a singleton manager for the API
- ancient cookie system for login is entirely gone, this has been deprecated (or perhaps even removed?) for years
this is functional, but still requires todo cleanups at the very least.
also duplicate querying is pretty inefficient, needs porting to pagination
some of the files are also overloaded with stuff (connection.cpp brrr)
the lib api is split in three pieces:
- the connection containing protocol logic
- the clients containing routing logic
- the models modeling the json blobs into cpp
the clients especially feel a bit awkward, but I think separating endpoint
handling from the models is a worthwhile thing.
clients get a request, give back a job and the intended use is for
the consumer to then connect to the finished signal of the job to then
ask the clients for the final return value of the job.
this is a bit 'meh'. what I really wanted was a Future to be returned
and the caller to connect to the future. unfortunately qfuture is fairly
limited and since qtbase has no Promise implementation I'm rather opting
for the double-function-approach than doing it like we did in the previous
decade and have a gazillion signals.
this way the handling of the job is always uniform and all specific
"handling code" is inside the connected slot rather than the actual
error handling has been put entirely into exceptions which get raised
when trying to access a finished job. in BugzillaManager they get rescued
and turned into the already existing signals. this simplifies error
handling a fair amount and also makes the error handling code
look uniform across the various API calls we have.