deleteFeedSubscription method

Future<void> deleteFeedSubscription({
  1. required String projectId,
  2. required String feedId,
  3. required String subscriptionId,
})

Implementation

Future<void> deleteFeedSubscription({required String projectId, required String feedId, required String subscriptionId}) async {
  final encodedProjectId = Uri.encodeComponent(projectId);
  final encodedFeedId = Uri.encodeComponent(feedId);
  final encodedSubscriptionId = Uri.encodeComponent(subscriptionId);
  final uri = Uri.parse('$baseUrl/accounts/projects/$encodedProjectId/feeds/$encodedFeedId/subscriptions/$encodedSubscriptionId');
  final response = await httpClient.delete(uri);

  if (response.statusCode >= 400) {
    throw MeshagentException(
      'Failed to delete feed subscription. '
      'Status code: ${response.statusCode}, body: ${response.body}',
    );
  }
}