Commit 61fba84
Gauvain Pocentek
Add laziness to get()
The goal is to create empty objects (no API called) but give access to
the managers. Using this users can reduce the number of API calls but
still use the same API to access children objects.
For example the following will only make one API call but will still get
the result right:
gl.projects.get(49, lazy=True).issues.get(2, lazy=True).notes.list()
This removes the need for more complex managers attributes (e.g.
gl.project_issue_notes)1 parent 197ffd7 commit 61fba84
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
0 commit comments