getAction method

Future<ActionModel> getAction(
  1. String formId,
  2. String actionId
)

Gets a specific action by ID.

Makes a GET /form/:formId/action/:actionId request.

formId is the unique ID of the form. actionId is the unique ID of the action.

Returns the ActionModel.

Throws DioError on failure.

Implementation

Future<ActionModel> getAction(String formId, String actionId) async {
  final response = await client.dio.get(
    ApiEndpoints.getAction(formId, actionId),
  );
  return ActionModel.fromJson(response.data as Map<String, dynamic>);
}