File tree Expand file tree Collapse file tree 5 files changed +42
-0
lines changed
apify-api/openapi/code_samples/javascript Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4+ // Replace apify~my-sample-task with your task's ID or technical name
5+ const input = await apifyClient . task ( 'apify~my-sample-task' ) . getInput ( ) ;
6+
7+ console . log ( input ) ;
Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4+ // Replace apify~my-sample-task with your task's ID or technical name
5+ const updatedInput = await apifyClient . task ( 'apify~my-sample-task' )
6+ . updateInput ( {
7+ // Your input here
8+ } ) ;
9+
10+ console . log ( updatedInput ) ;
Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4+ // Replace apify~my-sample-task with your task's ID or technical name
5+ const { items } = await apifyClient . task ( 'apify~my-sample-task' )
6+ . runs ( )
7+ . list ( ) ;
8+
9+ console . log ( items ) ;
Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4+ // Replace apify~my-sample-task with your task's ID or technical name
5+ const run = await apifyClient . task ( 'apify~my-sample-task' ) . start ( ) ;
6+
7+ console . log ( run ) ;
Original file line number Diff line number Diff line change 1+ import { ApifyClient } from 'apify-client' ;
2+
3+ const apifyClient = new ApifyClient ( { token : 'my-token' } ) ;
4+ // Replace apify~my-sample-task with your task's ID or technical name
5+ const { items } = await apifyClient . task ( 'apify~my-sample-task' )
6+ . webhooks ( )
7+ . list ( ) ;
8+
9+ console . log ( items ) ;
You can’t perform that action at this time.
0 commit comments