Skip to content

Commit

Permalink
get activity params
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-r-kulkarni committed Jan 25, 2024
1 parent 2abed0d commit 26e9789
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/aerie_cli/aerie_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,27 @@ def get_all_activity_types(self, model_id: int) -> List[str]:
activity_types = [o["name"] for o in data]
return activity_types

def get_activity_parameters(self, activity_name:str, model_id:int):
query = """
query GetActivityParameters(
$model_id: Int!
$activity_name: String!
) {
activity_type(where: { model_id: { _eq: $model_id },
name : {_eq : $activity_name}}) {
name
model_id
parameters
}
}
"""
resp = self.host_session.post_to_graphql(
query,
activity_name=activity_name
model_id=model_id,
)
return resp

def list_command_dictionaries(self) -> List[CommandDictionaryInfo]:
"""List all command dictionaries on an Aerie host
Expand Down Expand Up @@ -1577,7 +1598,7 @@ def __expand_activity_arguments(self, plan: ActivityPlanRead, full_args: str = N
activity.parameters = ApiEffectiveActivityArguments.from_dict(
resp).arguments
return plan

def upload_constraint(self, constraint):
upload_constraint_query = """
mutation CreateConstraint($constraint: constraint_insert_input!) {
Expand Down

0 comments on commit 26e9789

Please sign in to comment.