File tree Expand file tree Collapse file tree 15 files changed +85
-48
lines changed
apify-api/openapi/code_samples/javascript Expand file tree Collapse file tree 15 files changed +85
-48
lines changed 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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- await apifyClient . actor ( 'apify~my-sample-actor' ) . delete ( ) ;
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 11import { ApifyClient } from 'apify-client' ;
22
3- const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- const actor = await apifyClient . actor ( 'apify~my-sample-actor' ) . get ( ) ;
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const actor = await apifyClient
7+ . actor ( '<ACTOR ID>' )
8+ . get ( ) ;
69
710console . log ( actor ) ;
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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- const updatedActor = await apifyClient . actor ( 'apify~my-sample-actor' ) . update ( {
6- title : 'New title' ,
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
75} ) ;
6+ const updatedActor = await apifyClient
7+ . actor ( '<ACTOR ID>' )
8+ . update ( {
9+ title : 'New title' ,
10+ } ) ;
811
912console . 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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- await apifyClient . actor ( 'apify~my-sample-actor' )
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ await apifyClient
7+ . actor ( '<ACTOR ID>' )
68 . version ( '0.1' )
79 . delete ( ) ;
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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- await apifyClient . actor ( 'apify~my-sample-actor' )
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ await apifyClient
7+ . actor ( '<ACTOR ID>' )
68 . version ( '0.1' )
79 . envVar ( 'MY_ENV_VAR' )
810 . delete ( ) ;
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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- const envVar = await apifyClient . actor ( 'apify~my-sample-actor' )
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const envVar = await apifyClient
7+ . actor ( '<ACTOR ID>' )
68 . version ( '0.1' )
79 . envVar ( 'MY_ENV_VAR' )
810 . get ( ) ;
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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- const updatedEnvVar = await apifyClient . actor ( 'apify~my-sample-actor' )
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const updatedEnvVar = await apifyClient
7+ . actor ( '<ACTOR ID>' )
68 . version ( '0.1' )
79 . envVar ( 'MY_ENV_VAR' )
810 . update ( {
911 name : 'MY_ENV_VAR' ,
10- value : '54321 ' ,
12+ value : 'my-new-value ' ,
1113 } ) ;
1214
1315console . log ( updatedEnvVar ) ;
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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- const { items } = await apifyClient . actor ( 'apify~my-sample-actor' )
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const { items } = await apifyClient
7+ . actor ( '<ACTOR ID>' )
68 . version ( '0.1' )
79 . envVars ( )
810 . list ( ) ;
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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- const envVar = await apifyClient . actor ( 'apify~my-sample-actor' )
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const envVar = await apifyClient
7+ . actor ( '<ACTOR ID>' )
68 . version ( '0.1' )
79 . envVars ( )
810 . create ( {
911 name : 'MY_ENV_VAR' ,
10- value : '12345 ' ,
12+ value : 'my-new-value ' ,
1113 isSecret : true ,
1214 } ) ;
1315
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- // Replace apify~my-sample-actor with your Actor's ID or technical name
5- const version = await apifyClient . actor ( 'apify~my-sample-actor' )
3+ const apifyClient = new ApifyClient ( {
4+ token : '<TOKEN>' ,
5+ } ) ;
6+ const version = await apifyClient
7+ . actor ( '<ACTOR ID>' )
68 . version ( '0.1' )
79 . get ( ) ;
810
You can’t perform that action at this time.
0 commit comments