-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into docs/example-regex-datetime
- Loading branch information
Showing
118 changed files
with
1,196 additions
and
31 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
apify-api/openapi/code_samples/javascript/act_builds_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const { items } = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.builds() | ||
.list(); | ||
|
||
console.log(items); | ||
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/act_builds_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const build = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.build('0.0'); | ||
|
||
console.log(build); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
await apifyClient.actor('<ACTOR ID>').delete(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const actor = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.get(); | ||
|
||
console.log(actor); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const updatedActor = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.update({ | ||
title: 'New title', | ||
}); | ||
|
||
console.log(updatedActor); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const { items } = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.runs() | ||
.list(); | ||
|
||
console.log(items); | ||
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/act_runs_last_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const lastRun = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.lastRun(); | ||
|
||
console.log(lastRun); | ||
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/act_runs_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const run = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.start({ foo: 'bar' }); | ||
|
||
console.log(run); | ||
9 changes: 9 additions & 0 deletions
9
apify-api/openapi/code_samples/javascript/act_version_delete.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.delete(); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/act_version_envVar_delete.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.envVar('MY_ENV_VAR') | ||
.delete(); |
12 changes: 12 additions & 0 deletions
12
apify-api/openapi/code_samples/javascript/act_version_envVar_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const envVar = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.envVar('MY_ENV_VAR') | ||
.get(); | ||
|
||
console.log(envVar); | ||
15 changes: 15 additions & 0 deletions
15
apify-api/openapi/code_samples/javascript/act_version_envVar_put.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const updatedEnvVar = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.envVar('MY_ENV_VAR') | ||
.update({ | ||
name: 'MY_ENV_VAR', | ||
value: 'my-new-value', | ||
}); | ||
|
||
console.log(updatedEnvVar); | ||
12 changes: 12 additions & 0 deletions
12
apify-api/openapi/code_samples/javascript/act_version_envVars_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const { items } = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.envVars() | ||
.list(); | ||
|
||
console.log(items); | ||
16 changes: 16 additions & 0 deletions
16
apify-api/openapi/code_samples/javascript/act_version_envVars_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const envVar = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.envVars() | ||
.create({ | ||
name: 'MY_ENV_VAR', | ||
value: 'my-new-value', | ||
isSecret: true, | ||
}); | ||
|
||
console.log(envVar); |
11 changes: 11 additions & 0 deletions
11
apify-api/openapi/code_samples/javascript/act_version_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const version = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.get(); | ||
|
||
console.log(version); |
13 changes: 13 additions & 0 deletions
13
apify-api/openapi/code_samples/javascript/act_version_put.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const updatedVersion = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.version('0.1') | ||
.update({ | ||
buildTag: 'latest', | ||
}); | ||
|
||
console.log(updatedVersion); |
11 changes: 11 additions & 0 deletions
11
apify-api/openapi/code_samples/javascript/act_versions_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const { items } = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.versions() | ||
.list(); | ||
|
||
console.log(items); |
15 changes: 15 additions & 0 deletions
15
apify-api/openapi/code_samples/javascript/act_versions_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const version = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.versions() | ||
.create({ | ||
versionNumber: '0.1', | ||
sourceType: 'GIT_REPO', | ||
gitRepoUrl: 'https://github.com/my/repo', | ||
}); | ||
|
||
console.log(version); |
11 changes: 11 additions & 0 deletions
11
apify-api/openapi/code_samples/javascript/act_webhooks_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const { items } = await apifyClient | ||
.actor('<ACTOR ID>') | ||
.webhooks() | ||
.list(); | ||
|
||
console.log(items); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorBuild_abort_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const abortedBuild = await apifyClient | ||
.build('<BUILD ID>') | ||
.abort(); | ||
|
||
console.log(abortedBuild); |
6 changes: 6 additions & 0 deletions
6
apify-api/openapi/code_samples/javascript/actorBuild_delete.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
await apifyClient.build('<BUILD ID>').delete(); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorBuild_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const build = await apifyClient | ||
.build('<BUILD ID>') | ||
.get(); | ||
|
||
console.log(build); |
11 changes: 11 additions & 0 deletions
11
apify-api/openapi/code_samples/javascript/actorBuild_log_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const buildLog = await apifyClient | ||
.build('<BUILD ID>') | ||
.log() | ||
.get(); | ||
|
||
console.log(buildLog); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorBuilds_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const { items } = await apifyClient | ||
.builds() | ||
.list(); | ||
|
||
console.log(items); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorRun_abort_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const abortedRun = await apifyClient | ||
.run('<RUN ID>') | ||
.abort(); | ||
|
||
console.log(abortedRun); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
await apifyClient.run('<RUN ID>').delete(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const run = await apifyClient | ||
.run('<RUN ID>') | ||
.get(); | ||
|
||
console.log(run); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorRun_metamorph_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const metamorphedRun = await apifyClient | ||
.run('<RUN ID>') | ||
.metamorph('<ACTOR ID>'); | ||
|
||
console.log(metamorphedRun); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const updatedRun = await apifyClient | ||
.run('<RUN ID>') | ||
.update({ | ||
statusMessage: 'Actor has finished', | ||
}); | ||
|
||
console.log(updatedRun); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorRun_reboot_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const rebootedRun = await apifyClient | ||
.run('<RUN ID>') | ||
.reboot(); | ||
|
||
console.log(rebootedRun); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorRun_resurrect_post.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const resurrectedRun = await apifyClient | ||
.run('<RUN ID>') | ||
.resurrect(); | ||
|
||
console.log(resurrectedRun); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorRuns_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const { items } = await apifyClient | ||
.runs() | ||
.list(); | ||
|
||
console.log(items); |
6 changes: 6 additions & 0 deletions
6
apify-api/openapi/code_samples/javascript/actorTask_delete.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
await apifyClient.task('<TASK ID>').delete(); |
10 changes: 10 additions & 0 deletions
10
apify-api/openapi/code_samples/javascript/actorTask_get.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ApifyClient } from 'apify-client'; | ||
|
||
const apifyClient = new ApifyClient({ | ||
token: '<TOKEN>', | ||
}); | ||
const task = await apifyClient | ||
.task('<TASK ID>') | ||
.get(); | ||
|
||
console.log(task); |
Oops, something went wrong.