File tree Expand file tree Collapse file tree 5 files changed +42
-4
lines changed
apify-api/openapi/code_samples/javascript Expand file tree Collapse file tree 5 files changed +42
-4
lines changed Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ await apifyClient . actor ( '<ACTOR ID>' ) . delete ( ) ;
Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const actor = await apifyClient
7+ . actor ( '<ACTOR ID>' )
8+ . get ( ) ;
9+
10+ console . log ( actor ) ;
Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const updatedActor = await apifyClient
7+ . actor ( '<ACTOR ID>' )
8+ . update ( {
9+ title : 'New title' ,
10+ } ) ;
11+
12+ console . log ( updatedActor ) ;
Original file line number Diff line number Diff line change 11import { ApifyClient } from 'apify-client' ;
22
3- const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4- const { items } = await apifyClient . actors ( ) . list ( ) ;
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const { items } = await apifyClient
7+ . actors ( )
8+ . list ( ) ;
59
610console . log ( items ) ;
Original file line number Diff line number Diff line change 11import { ApifyClient } from 'apify-client' ;
22
3- const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4- const myActor = await apifyClient . actors ( ) . create ( { name : 'my-actor' } ) ;
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const myActor = await apifyClient
7+ . actors ( )
8+ . create ( {
9+ name : '<ACTOR NAME>' ,
10+ } ) ;
511
612console . log ( myActor ) ;
You can’t perform that action at this time.
0 commit comments