Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Case helper #37
I’ve added a helper class for interacting with cases as a higher level. It wraps the existing get_case and create_case methods and in both cases returns a Case instance rather than a requests Response instance. These methods have not been touched to backwards compatibility should not be affected.
There is a sample file included (test-case-create__case-helper.py) which can be compared with test-case-create.py to show how the usage changes.
The next step would be to wrap some of the other methods, e.g. to make it easier to work with case tasks, but I’ll wait for some feedback on this approach before going further.
It looks like there are some duplicated commits - I originally forked from master, and then realised I should have forked from develop, and when I tried to rebase against develop I messed something up. Sorry about that.
This is a great job, I like the idea and the implementation.
We all know that returning the Responses from the API Client is not the best way, and we were thinking of a new API class without breaking the compatibility.
What you suggest is really good, and solves what we want:
I'm personally ok with what you started. Let's wait for other's opinion ;)
Hi @nadouani , the goal is to create a higher-level interface but to be honest I’m not really sure what that should look like, so I wanted to submit a small change rather than biting off too much. That’s probably it for the case helper class for now while I figure out what to do next.
I commented on #12 that I can take that over to track the overall work (or create a new issue if it’s not quite the same thing?).