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