getWorkflow method

Future<Response> getWorkflow(
  1. String id, {
  2. bool? excludePinnedData,
})

Retrieve a workflow by ID

Implementation

Future<Response> getWorkflow(String id, {bool? excludePinnedData}) async {
  try {
    final response = await _dio.get(
      '/workflows/$id',
      queryParameters: {
        if (excludePinnedData != null) 'excludePinnedData': excludePinnedData,
      },
    );
    return response;
  } on DioException catch (e) {
    throw Exception('Failed to retrieve workflow: ${e.message}');
  }
}