| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e11d889 commit faa9d4f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,3 +31,13 @@ List iterations for a project's ancestor groups:: | |||
| 31 | 31 | List iterations for a group:: | |
| 32 | 32 | ||
| 33 | 33 | iterations = group.iterations.list() | |
| 34 | + | ||
| 35 | + Unavailable filters or filters conflicts:: | ||
| 36 | + | ||
| 37 | + In case you are trying to pass a parameter that is not supported or | ||
| 38 | + collides with a python keyword (i.e. `in`) you have to use the | ||
| 39 | + `query_parameters` argument: | ||
| 40 | + | ||
| 41 | + ``` | ||
| 42 | + group.iterations.list(query_parameters={"in": "title"}) | ||
| 43 | + ``` | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,11 +16,31 @@ class GroupIterationManager(ListMixin, RESTManager): | |||
| 16 | 16 | _path = "/groups/{group_id}/iterations" | |
| 17 | 17 | _obj_cls = GroupIteration | |
| 18 | 18 | _from_parent_attrs = {"group_id": "id"} | |
| 19 | - _list_filters = ("state", "search", "include_ancestors") | ||
| 19 | + # The "in" keyword collides with python's "in" keyword raising a SyntaxError. | ||
| 20 | + # For this reason, we have to use the query_parameters argument: | ||
| 21 | + # group.iterations.list(query_parameters={"in": "title"}) | ||
| 22 | + _list_filters = ( | ||
| 23 | + "include_ancestors", | ||
| 24 | + "include_descendants", | ||
| 25 | + "search", | ||
| 26 | + "state", | ||
| 27 | + "updated_after", | ||
| 28 | + "updated_before" | ||
| 29 | + ) | ||
| 20 | 30 | ||
| 21 | 31 | ||
| 22 | 32 | class ProjectIterationManager(ListMixin, RESTManager): | |
| 23 | 33 | _path = "/projects/{project_id}/iterations" | |
| 24 | 34 | _obj_cls = GroupIteration | |
| 25 | 35 | _from_parent_attrs = {"project_id": "id"} | |
| 26 | - _list_filters = ("state", "search", "include_ancestors") | ||
| 36 | + # The "in" keyword collides with python's "in" keyword raising a SyntaxError. | ||
| 37 | + # For this reason, we have to use the query_parameters argument: | ||
| 38 | + # group.iterations.list(query_parameters={"in": "title"}) | ||
| 39 | + _list_filters = ( | ||
| 40 | + "include_ancestors", | ||
| 41 | + "include_descendants", | ||
| 42 | + "search", | ||
| 43 | + "state", | ||
| 44 | + "updated_after", | ||
| 45 | + "updated_before" | ||
| 46 | + ) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments