Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle nested query parameters in ApiClient.do() (#249)
## Changes The Query History list API filter_by query parameter is modeled by a dictionary, rather than a primitive type, defining the allowed filters including `query_start_time_range`, `statuses`, `user_ids`, and `warehouse_ids`. To be compatible with gRPC transcoding, query parameters modeled by message types as opposed to primitives need to be separated into one query parameter per nested field, where the key is the path to that query parameter. For example: ``` {'filter_by': {'user_ids': [123, 456]}} ``` becomes ``` filter_by.user_ids=123&filter_by.user_ids=456 ``` For this to be compatible with the requests library we use today, we need to convert the first dictionary to ``` {'filter_by.user_ids': [123, 456]} ``` This resolves one of the problems from #99. The issue with the conflict between filter_by and next_page_token will be resolved by the backend service. ## Tests Added an integration test that covers query history listing with a filter_by parameter. - [x] `make test` run locally - [x] `make fmt` applied - [x] relevant integration tests applied
- Loading branch information