- Notifications
You must be signed in to change notification settings - Fork673
Commit61fba84

Gauvain Pocentek
Add laziness to get()
The goal is to create empty objects (no API called) but give access tothe managers. Using this users can reduce the number of API calls butstill use the same API to access children objects.For example the following will only make one API call but will still getthe 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 parent197ffd7 commit61fba84
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
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
Comments
(0)