getVariables method

Future<Response> getVariables({
  1. int? limit,
  2. String? cursor,
})

Retrieve all variables

Implementation

Future<Response> getVariables({int? limit, String? cursor}) async {
  try {
    final response = await _dio.get(
      '/variables',
      queryParameters: {
        if (limit != null) 'limit': limit,
        if (cursor != null) 'cursor': cursor,
      },
    );
    return response;
  } on DioException catch (e) {
    throw Exception('Failed to retrieve variables: ${e.message}');
  }
}