Skip to content

Commit

Permalink
fix(breadbox): Add optional params to breadbox client interface (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
snwessel authored Jan 24, 2025
1 parent d9bdfdc commit aa7815e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion breadbox-client/breadbox_facade/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,21 @@ def get_dataset(

def get_datasets(
self,
feature_id: Optional[str] = None,
feature_type: Optional[str] = None,
sample_id: Optional[str] = None,
sample_type: Optional[str] = None,
value_type: Optional[str] = None,
) -> list[Union[MatrixDatasetResponse, TabularDatasetResponse]]:
"""Get metadata for all datasets available to current user."""
breadbox_response = get_datasets_client.sync_detailed(client=self.client)
breadbox_response = get_datasets_client.sync_detailed(
client=self.client,
feature_id=feature_id if feature_id else UNSET,
feature_type=feature_type if feature_type else UNSET,
sample_id=sample_id if sample_id else UNSET,
sample_type=sample_type if sample_type else UNSET,
value_type=ValueType(value_type) if value_type else UNSET,
)
return self._parse_client_response(breadbox_response)

def remove_dataset(self, dataset_id: str):
Expand Down

0 comments on commit aa7815e

Please sign in to comment.