Skip to content

Commit d830ed1

Browse files
committed
refactor: clean up
1 parent 1bf60b2 commit d830ed1

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

packages/apify/src/configuration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export interface ConfigurationOptions extends CoreConfigurationOptions {
1616
actorRunId?: string;
1717
actorTaskId?: string;
1818
apiBaseUrl?: string;
19+
// apiBaseUrl is the internal API URL, accessible only within the platform(private network),
20+
// while apiPublicBaseUrl is the public API URL, available externally(through internet).
1921
apiPublicBaseUrl?: string;
2022
containerPort?: number;
2123
containerUrl?: string;

test/e2e/sdk/publicUrl/src/main.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { Actor, log } from 'apify';
22

33
await Actor.init();
44

5-
const { data, recordKey } = await Actor.getInput();
5+
const { data } = await Actor.getInput();
66

7-
await Actor.setValue(recordKey, JSON.stringify(data), { contentType: `application/json` });
7+
await Actor.setValue('public-record-key', JSON.stringify(data), { contentType: `application/json` });
88

99
const defaultKeyValueStore = await Actor.openKeyValueStore();
10-
const publicUrl = defaultKeyValueStore.getPublicUrl(recordKey);
10+
const publicUrl = defaultKeyValueStore.getPublicUrl('public-record-key');
1111

1212
// Here we store the url itself
1313
await Actor.setValue('urlToPublicData', publicUrl);

test/e2e/sdk/publicUrl/test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const client = new ApifyClient({
1010

1111
const actor = client.actor(process.argv[2]);
1212

13-
const run = await actor.call({ data: PUBLIC_DATA, recordKey: 'public-record-key' }, { waitSecs: 15 });
13+
const run = await actor.call({ data: PUBLIC_DATA }, { waitSecs: 15 });
1414
assert.equal(run.exitCode, 0);
1515

1616
const publicUrl = await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('urlToPublicData');

0 commit comments

Comments
 (0)