Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ internal static partial class DefaultDatasetActorRunDatasetItemsPostCommandApiCo
{
Description = @"Actor run ID.",
};

private static Option<global::Apify.ActorRunDatasetItemsPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -56,8 +62,17 @@ public static Command Create()

This endpoint is a shortcut that resolves the run's `defaultDatasetId` and proxies to the
[Store items](/api/v2/dataset-items-post) endpoint.

To save bandwidth and speed up your upload, you can send the request payload compressed and set the `Content-Encoding` header accordingly.

Below is a list of supported `Content-Encoding` types.

* Brotli: `Content-Encoding: br`
* Gzip: `Content-Encoding: gzip`
* Deflate: `Content-Encoding: deflate`
");
command.Arguments.Add(RunId);
command.Options.Add(ContentEncoding);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand All @@ -77,6 +92,7 @@ [Store items](/api/v2/dataset-items-post) endpoint.
await CliRuntime.RunAsync(async () =>
{
var runId = parseResult.GetRequiredValue(RunId);
var contentEncoding = parseResult.GetValue(ContentEncoding);
var request = await CliRuntime.ReadRequestAsync<global::Apify.OneOf<global::Apify.PutItemsRequest, global::System.Collections.Generic.IList<global::Apify.PutItemsRequest>>>(
parseResult,
Input,
Expand All @@ -89,6 +105,7 @@ await CliRuntime.RunAsync(async () =>

var response = await client.DefaultDataset.ActorRunDatasetItemsPostAsync(
runId: runId,
contentEncoding: contentEncoding,
request: request,
cancellationToken: cancellationToken).ConfigureAwait(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static partial class DefaultKeyValueStoreActorRunKeyValueStoreRecordPos
private static Option<global::Apify.ActorRunKeyValueStoreRecordPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static partial class DefaultKeyValueStoreActorRunKeyValueStoreRecordPut
private static Option<global::Apify.ActorRunKeyValueStoreRecordPutContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ internal static partial class LastActorRunSDefaultDatasetActRunsLastDatasetItems
{
Description = @"Filter for the run origin, i.e. the means by which the run was started.",
};

private static Option<global::Apify.ActRunsLastDatasetItemsPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -68,10 +74,19 @@ public static Command Create()

This endpoint is a shortcut that resolves the last run's `defaultDatasetId` and proxies to the
[Store items](/api/v2/dataset-items-post) endpoint.

To save bandwidth and speed up your upload, you can send the request payload compressed and set the `Content-Encoding` header accordingly.

Below is a list of supported `Content-Encoding` types.

* Brotli: `Content-Encoding: br`
* Gzip: `Content-Encoding: gzip`
* Deflate: `Content-Encoding: deflate`
");
command.Arguments.Add(ActorId);
command.Options.Add(Status);
command.Options.Add(Origin);
command.Options.Add(ContentEncoding);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand All @@ -93,6 +108,7 @@ await CliRuntime.RunAsync(async () =>
var actorId = parseResult.GetRequiredValue(ActorId);
var status = parseResult.GetValue(Status);
var origin = parseResult.GetValue(Origin);
var contentEncoding = parseResult.GetValue(ContentEncoding);
var request = await CliRuntime.ReadRequestAsync<global::Apify.OneOf<global::Apify.PutItemsRequest, global::System.Collections.Generic.IList<global::Apify.PutItemsRequest>>>(
parseResult,
Input,
Expand All @@ -107,6 +123,7 @@ await CliRuntime.RunAsync(async () =>
actorId: actorId,
status: status,
origin: origin,
contentEncoding: contentEncoding,
request: request,
cancellationToken: cancellationToken).ConfigureAwait(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal static partial class LastActorRunSDefaultKeyValueStoreActRunsLastKeyVal
private static Option<global::Apify.ActRunsLastKeyValueStoreRecordPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal static partial class LastActorRunSDefaultKeyValueStoreActRunsLastKeyVal
private static Option<global::Apify.ActRunsLastKeyValueStoreRecordPutContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ internal static partial class LastActorTaskRunSDefaultDatasetActorTaskRunsLastDa
{
Description = @"Filter for the run origin, i.e. the means by which the run was started.",
};

private static Option<global::Apify.ActorTaskRunsLastDatasetItemsPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -68,10 +74,19 @@ public static Command Create()

This endpoint is a shortcut that resolves the last task run's `defaultDatasetId` and proxies to the
[Store items](/api/v2/dataset-items-post) endpoint.

To save bandwidth and speed up your upload, you can send the request payload compressed and set the `Content-Encoding` header accordingly.

Below is a list of supported `Content-Encoding` types.

* Brotli: `Content-Encoding: br`
* Gzip: `Content-Encoding: gzip`
* Deflate: `Content-Encoding: deflate`
");
command.Arguments.Add(ActorTaskId);
command.Options.Add(Status);
command.Options.Add(Origin);
command.Options.Add(ContentEncoding);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand All @@ -93,6 +108,7 @@ await CliRuntime.RunAsync(async () =>
var actorTaskId = parseResult.GetRequiredValue(ActorTaskId);
var status = parseResult.GetValue(Status);
var origin = parseResult.GetValue(Origin);
var contentEncoding = parseResult.GetValue(ContentEncoding);
var request = await CliRuntime.ReadRequestAsync<global::Apify.OneOf<global::Apify.PutItemsRequest, global::System.Collections.Generic.IList<global::Apify.PutItemsRequest>>>(
parseResult,
Input,
Expand All @@ -107,6 +123,7 @@ await CliRuntime.RunAsync(async () =>
actorTaskId: actorTaskId,
status: status,
origin: origin,
contentEncoding: contentEncoding,
request: request,
cancellationToken: cancellationToken).ConfigureAwait(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal static partial class LastActorTaskRunSDefaultKeyValueStoreActorTaskRuns
private static Option<global::Apify.ActorTaskRunsLastKeyValueStoreRecordPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal static partial class LastActorTaskRunSDefaultKeyValueStoreActorTaskRuns
private static Option<global::Apify.ActorTaskRunsLastKeyValueStoreRecordPutContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ internal static partial class StorageDatasetsDatasetItemsPostCommandApiCommand
{
Description = @"Dataset ID or `username~dataset-name`.",
};

private static Option<global::Apify.DatasetItemsPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
Expand Down Expand Up @@ -59,8 +65,17 @@ The POST payload is a JSON object or a JSON array of objects to save into the da
For more information about dataset schema validation, see [Dataset schema](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema/validation).

**IMPORTANT:** The limit of request payload size for the dataset is 5 MB. If the array exceeds the size, you'll need to split it into a number of smaller arrays.

To save bandwidth and speed up your upload, you can send the request payload compressed and set the `Content-Encoding` header accordingly.

Below is a list of supported `Content-Encoding` types.

* Brotli: `Content-Encoding: br`
* Gzip: `Content-Encoding: gzip`
* Deflate: `Content-Encoding: deflate`
");
command.Arguments.Add(DatasetId);
command.Options.Add(ContentEncoding);
command.Options.Add(Input);
command.Options.Add(RequestJson);
command.Options.Add(RequestFile);
Expand All @@ -80,6 +95,7 @@ The POST payload is a JSON object or a JSON array of objects to save into the da
await CliRuntime.RunAsync(async () =>
{
var datasetId = parseResult.GetRequiredValue(DatasetId);
var contentEncoding = parseResult.GetValue(ContentEncoding);
var request = await CliRuntime.ReadRequestAsync<global::Apify.OneOf<global::Apify.PutItemsRequest, global::System.Collections.Generic.IList<global::Apify.PutItemsRequest>>>(
parseResult,
Input,
Expand All @@ -92,6 +108,7 @@ await CliRuntime.RunAsync(async () =>

var response = await client.StorageDatasets.DatasetItemsPostAsync(
datasetId: datasetId,
contentEncoding: contentEncoding,
request: request,
cancellationToken: cancellationToken).ConfigureAwait(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static partial class StorageKeyValueStoresKeyValueStoreRecordPostComman
private static Option<global::Apify.KeyValueStoreRecordPostContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static partial class StorageKeyValueStoresKeyValueStoreRecordPutCommand
private static Option<global::Apify.KeyValueStoreRecordPutContentEncoding?> ContentEncoding { get; } = new(
name: @"--content-encoding")
{
Description = @"",
Description = @"Compression encoding of the request body.",
};
private static Option<string?> Input { get; } = new(@"--input")
{
Expand Down Expand Up @@ -77,9 +77,9 @@ request header.

Below is a list of supported `Content-Encoding` types.

* Brotli compression: `Content-Encoding: br`
* Gzip compression: `Content-Encoding: gzip`
* Deflate compression: `Content-Encoding: deflate`
* Brotli compression: `Content-Encoding: br`
");
command.Arguments.Add(StoreId);
command.Arguments.Add(RecordKey);
Expand Down
Loading