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