subscribeToChangelog method

Future<ChangelogSubscriptionResult> subscribeToChangelog(
  1. String email, {
  2. required String userToken,
})

Subscribes an email to changelog notifications.

Implementation

Future<ChangelogSubscriptionResult> subscribeToChangelog(
  String email, {
  required String userToken,
}) async {
  final json = await _sendJson(
    method: 'POST',
    path: '/api/v1/public/apps/${config.appKey}/changelog/subscribe',
    body: {'email': email.trim()},
    userToken: userToken,
    acceptedStatuses: const [200, 201],
  );
  return ChangelogSubscriptionResult.fromJson(json);
}