-
Notifications
You must be signed in to change notification settings - Fork 2
Metadata query params #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6f1c0a1
8cf4dfd
bd9c101
2d2b24c
eb8fb5e
99da46d
dd1260b
120a79c
38080fb
ae1bfcc
3d146f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. | |
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.9.0] - 2021-08-17 | ||
|
||
### Added | ||
|
||
- Fixed ability to create Orders with `metadata` | ||
- Add support for querying Orders by `metadata` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add the new ETH parameter here as well? |
||
- Added `transaction_value_eth_gwei` as an alternative way to compute transaction level emissions for ethereum | ||
|
||
## [1.8.0] - 2021-07-20 | ||
|
||
### Added | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,8 +148,15 @@ def create_bitcoin_estimate_with_http_info( | |
path_params = {} | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -294,8 +301,15 @@ def create_ethereum_estimate_with_http_info( | |
path_params = {} | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -440,8 +454,15 @@ def create_flight_estimate_with_http_info( | |
path_params = {} | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -586,8 +607,15 @@ def create_mass_estimate_with_http_info( | |
path_params = {} | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -732,8 +760,15 @@ def create_shipping_estimate_with_http_info( | |
path_params = {} | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -878,8 +913,15 @@ def create_vehicle_estimate_with_http_info( | |
path_params = {} | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -1017,8 +1059,15 @@ def retrieve_estimate_with_http_info(self, id, **kwargs): # noqa: E501 | |
path_params["id"] = local_var_params["id"] # noqa: E501 | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
Comment on lines
+1062
to
+1070
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll probably want to address the fact that this is duplicated several times over? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose but this logic does seem useful to have in each case so there aren't duplicate params in the list |
||
|
||
header_params = {} | ||
|
||
|
@@ -1140,11 +1189,18 @@ def retrieve_estimates_with_http_info(self, **kwargs): # noqa: E501 | |
path_params = {} | ||
|
||
query_params = [] | ||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if "page" in local_var_params: | ||
query_params.append(("page", local_var_params["page"])) # noqa: E501 | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
form_params = [] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,8 +141,15 @@ def cancel_order_with_http_info(self, id, **kwargs): # noqa: E501 | |
path_params["id"] = local_var_params["id"] # noqa: E501 | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -274,8 +281,15 @@ def create_order_with_http_info(self, create_order_request, **kwargs): # noqa: | |
path_params = {} | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -413,8 +427,15 @@ def place_order_with_http_info(self, id, **kwargs): # noqa: E501 | |
path_params["id"] = local_var_params["id"] # noqa: E501 | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -543,8 +564,15 @@ def retrieve_order_with_http_info(self, id, **kwargs): # noqa: E501 | |
path_params["id"] = local_var_params["id"] # noqa: E501 | ||
|
||
query_params = [] | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
|
||
header_params = {} | ||
|
||
|
@@ -591,6 +619,9 @@ def retrieve_orders(self, **kwargs): # noqa: E501 | |
|
||
:param async_req bool: execute request asynchronously | ||
:param int page: | ||
:param str metadata: | ||
:param str metadata_example1: | ||
:param str metadata_example2: | ||
:param _preload_content: if False, the urllib3.HTTPResponse object will | ||
be returned without reading/decoding response | ||
data. Default is True. | ||
|
@@ -616,6 +647,9 @@ def retrieve_orders_with_http_info(self, **kwargs): # noqa: E501 | |
|
||
:param async_req bool: execute request asynchronously | ||
:param int page: | ||
:param str metadata: | ||
:param str metadata_example1: | ||
:param str metadata_example2: | ||
:param _return_http_data_only: response data without head status code | ||
and headers | ||
:param _preload_content: if False, the urllib3.HTTPResponse object will | ||
|
@@ -632,7 +666,12 @@ def retrieve_orders_with_http_info(self, **kwargs): # noqa: E501 | |
|
||
local_var_params = locals() | ||
|
||
all_params = ["page"] # noqa: E501 | ||
all_params = [ | ||
"page", | ||
"metadata", | ||
"metadata_example1", | ||
"metadata_example2", | ||
] # noqa: E501 | ||
all_params.append("async_req") | ||
all_params.append("_return_http_data_only") | ||
all_params.append("_preload_content") | ||
|
@@ -666,10 +705,29 @@ def retrieve_orders_with_http_info(self, **kwargs): # noqa: E501 | |
path_params = {} | ||
|
||
query_params = [] | ||
for key in kwargs: | ||
query_params.append([key, kwargs.get(key)]) | ||
if "page" in local_var_params: | ||
query_params.append(("page", local_var_params["page"])) # noqa: E501 | ||
if "metadata" in local_var_params: | ||
query_params.append( | ||
("metadata", local_var_params["metadata"]) | ||
) # noqa: E501 | ||
if "metadata_example1" in local_var_params: | ||
query_params.append( | ||
("metadata[example1]", local_var_params["metadata_example1"]) | ||
) # noqa: E501 | ||
if "metadata_example2" in local_var_params: | ||
query_params.append( | ||
("metadata[example2]", local_var_params["metadata_example2"]) | ||
) # noqa: E501 | ||
|
||
# do not add duplicate keys to query_params list | ||
existing_keys = [] | ||
for param in query_params: | ||
existing_keys.append(param[0]) | ||
|
||
for key in kwargs: | ||
if key not in existing_keys: | ||
query_params.append([key, kwargs.get(key)]) | ||
Comment on lines
+723
to
+730
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the place in which this new logic is most relevant. Previously, a named query param would appear twice because all args were added to the params list even if they already matched one of the conditionals above |
||
|
||
header_params = {} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍