Skip to content

Commit ed6f7ad

Browse files
committed
Add create actor sample
1 parent 8be6129 commit ed6f7ad

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApifyClient } from 'apify-client';
2+
3+
const apifyClient = new ApifyClient({ token: 'my-token' });
4+
const actorCollectionClient = apifyClient.actors();
5+
6+
const myActor = await actorCollectionClient.create({ name: 'my-actor' });
7+
8+
console.log(myActor);

apify-api/openapi/paths/actors/acts.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,8 @@ post:
245245
x-py-parent: ActorCollectionClientAsync
246246
x-py-name: create
247247
x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/ActorCollectionClientAsync#create
248+
x-codeSamples:
249+
- lang: JavaScript
250+
label: JS client
251+
source:
252+
$ref: ../../code_samples/js/acts_post.js

0 commit comments

Comments
 (0)