syncToken<T, K> method

Future<T> syncToken<T, K>(
  1. String syncToken
)

You can use the sync token (that you receive after initial sync) to get the updated content next time. sync token fetches only the content that was added after your last sync, and the details of the content that was deleted or updated.

Implementation

Future<T> syncToken<T, K>(String syncToken) {
  final parameters = <String, String>{};
  if (syncToken != null && syncToken.isNotEmpty) {
    parameters['sync_token'] = syncToken;
  }

  parameters['environment'] = _client.stackHeaders['environment'];
  final Uri uri = Uri.https(endpoint, '$apiVersion/stacks/sync', parameters);
  return _client.sendRequest<T, K>(uri);
}