CarpDataEndPoint.fromCarpApp constructor

CarpDataEndPoint.fromCarpApp({
  1. required CarpUploadMethod uploadMethod,
  2. required String name,
  3. String? collection,
  4. bool deleteWhenUploaded = true,
  5. String dataFormat = NameSpace.CARP,
  6. int bufferSize = 500 * 1000,
  7. bool zip = true,
  8. bool encrypt = false,
  9. String? publicKey,
  10. required CarpApp app,
})

Creates a CarpDataEndPoint based on a CarpApp app.

Implementation

CarpDataEndPoint.fromCarpApp({
  required CarpUploadMethod uploadMethod,
  required String name,
  String? collection,
  bool deleteWhenUploaded = true,
  String dataFormat = NameSpace.CARP,
  int bufferSize = 500 * 1000,
  bool zip = true,
  bool encrypt = false,
  String? publicKey,
  required CarpApp app,
}) : this(
        uploadMethod: uploadMethod,
        name: app.name,
        uri: app.uri.toString(),
        clientId: app.oauth.clientID,
        clientSecret: app.oauth.clientSecret,
        dataFormat: dataFormat,
        bufferSize: bufferSize,
        zip: zip,
        deleteWhenUploaded: deleteWhenUploaded,
      );