Skip to content

Commit

Permalink
Merge branch 'master' into docs/example-regex-datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
metalwarrior665 authored Dec 20, 2024
2 parents 81bb213 + 8c0df15 commit bc61161
Show file tree
Hide file tree
Showing 118 changed files with 1,196 additions and 31 deletions.
11 changes: 11 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_builds_get.js
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);

Check warning on line 11 in apify-api/openapi/code_samples/javascript/act_builds_get.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
10 changes: 10 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_builds_post.js
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);

Check warning on line 10 in apify-api/openapi/code_samples/javascript/act_builds_post.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
6 changes: 6 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_delete.js
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();
10 changes: 10 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_get.js
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);

Check warning on line 10 in apify-api/openapi/code_samples/javascript/act_get.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
12 changes: 12 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_put.js
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);

Check warning on line 12 in apify-api/openapi/code_samples/javascript/act_put.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
11 changes: 11 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_runs_get.js
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);

Check warning on line 11 in apify-api/openapi/code_samples/javascript/act_runs_get.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
10 changes: 10 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_runs_last_get.js
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);

Check warning on line 10 in apify-api/openapi/code_samples/javascript/act_runs_last_get.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
10 changes: 10 additions & 0 deletions apify-api/openapi/code_samples/javascript/act_runs_post.js
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);

Check warning on line 10 in apify-api/openapi/code_samples/javascript/act_runs_post.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
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();
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();
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);

Check warning on line 12 in apify-api/openapi/code_samples/javascript/act_version_envVar_get.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
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);

Check warning on line 15 in apify-api/openapi/code_samples/javascript/act_version_envVar_put.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
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);

Check warning on line 12 in apify-api/openapi/code_samples/javascript/act_version_envVars_get.js

View workflow job for this annotation

GitHub Actions / Lint app code

Unexpected console statement
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 apify-api/openapi/code_samples/javascript/act_version_get.js
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 apify-api/openapi/code_samples/javascript/act_version_put.js
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 apify-api/openapi/code_samples/javascript/act_versions_get.js
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 apify-api/openapi/code_samples/javascript/act_versions_post.js
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 apify-api/openapi/code_samples/javascript/act_webhooks_get.js
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 apify-api/openapi/code_samples/javascript/actorBuild_abort_post.js
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);
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 apify-api/openapi/code_samples/javascript/actorBuild_get.js
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 apify-api/openapi/code_samples/javascript/actorBuild_log_get.js
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 apify-api/openapi/code_samples/javascript/actorBuilds_get.js
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 apify-api/openapi/code_samples/javascript/actorRun_abort_post.js
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);
6 changes: 6 additions & 0 deletions apify-api/openapi/code_samples/javascript/actorRun_delete.js
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();
10 changes: 10 additions & 0 deletions apify-api/openapi/code_samples/javascript/actorRun_get.js
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);
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);
12 changes: 12 additions & 0 deletions apify-api/openapi/code_samples/javascript/actorRun_put.js
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 apify-api/openapi/code_samples/javascript/actorRun_reboot_post.js
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);
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 apify-api/openapi/code_samples/javascript/actorRuns_get.js
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 apify-api/openapi/code_samples/javascript/actorTask_delete.js
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 apify-api/openapi/code_samples/javascript/actorTask_get.js
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);
Loading

0 comments on commit bc61161

Please sign in to comment.