getDocumentHistory static method

Future<DocumentFrameResponse> getDocumentHistory(
  1. P2PStream stream, {
  2. required PeerId ownerPeerId,
  3. required String path,
  4. int? maxVersions,
})

List a document's kept versions, newest first, with sizes but not bodies (client-side HISTORY). The body is a JSON array.

Implementation

static Future<DocumentFrameResponse> getDocumentHistory(
  P2PStream stream, {
  required PeerId ownerPeerId,
  required String path,
  int? maxVersions,
}) async {
  return _exchange(
    stream,
    DocumentFrame.encodeRequest(
      operation: 'HISTORY',
      ownerPeerId: ownerPeerId,
      path: path,
      maxVersions: maxVersions,
    ),
    'listing document history',
  );
}