diff --git a/apify-api/openapi/code_samples/javascript/log_get.js b/apify-api/openapi/code_samples/javascript/log_get.js new file mode 100644 index 000000000..7d1ae4719 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/log_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const log = await apifyClient + .log('') + .get(); + +console.log(log); diff --git a/apify-api/openapi/code_samples/javascript/schedule_delete.js b/apify-api/openapi/code_samples/javascript/schedule_delete.js new file mode 100644 index 000000000..54e3f5fd7 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/schedule_delete.js @@ -0,0 +1,8 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +await apifyClient + .schedule('') + .delete(); diff --git a/apify-api/openapi/code_samples/javascript/schedule_get.js b/apify-api/openapi/code_samples/javascript/schedule_get.js new file mode 100644 index 000000000..6c2e63432 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/schedule_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const schedule = await apifyClient + .schedule('') + .get(); + +console.log(schedule); diff --git a/apify-api/openapi/code_samples/javascript/schedule_log_get.js b/apify-api/openapi/code_samples/javascript/schedule_log_get.js new file mode 100644 index 000000000..1110ec950 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/schedule_log_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const log = await apifyClient + .schedule('') + .getLog(); + +console.log(log); diff --git a/apify-api/openapi/code_samples/javascript/schedule_put.js b/apify-api/openapi/code_samples/javascript/schedule_put.js new file mode 100644 index 000000000..963fbfa6d --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/schedule_put.js @@ -0,0 +1,12 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const updatedSchedule = await apifyClient + .schedule('') + .update({ + title: 'New title', + }); + +console.log(updatedSchedule); diff --git a/apify-api/openapi/code_samples/javascript/schedules_get.js b/apify-api/openapi/code_samples/javascript/schedules_get.js new file mode 100644 index 000000000..c2d81b733 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/schedules_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const { items } = await apifyClient + .schedules() + .list(); + +console.log(items); diff --git a/apify-api/openapi/code_samples/javascript/schedules_post.js b/apify-api/openapi/code_samples/javascript/schedules_post.js new file mode 100644 index 000000000..342d0ef14 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/schedules_post.js @@ -0,0 +1,12 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const schedule = await apifyClient + .schedules() + .create({ + name: '', + }); + +console.log(schedule); diff --git a/apify-api/openapi/code_samples/javascript/store_get.js b/apify-api/openapi/code_samples/javascript/store_get.js new file mode 100644 index 000000000..77be88157 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/store_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const { items } = await apifyClient + .store() + .list(); + +console.log(items); diff --git a/apify-api/openapi/code_samples/javascript/user_get.js b/apify-api/openapi/code_samples/javascript/user_get.js new file mode 100644 index 000000000..d05d638f3 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/user_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const user = await apifyClient + .user('') + .get(); + +console.log(user); diff --git a/apify-api/openapi/code_samples/javascript/users_me_get.js b/apify-api/openapi/code_samples/javascript/users_me_get.js new file mode 100644 index 000000000..889f33ce9 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/users_me_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const user = await apifyClient + .user('me') + .get(); + +console.log(user); diff --git a/apify-api/openapi/code_samples/javascript/users_me_limits_get.js b/apify-api/openapi/code_samples/javascript/users_me_limits_get.js new file mode 100644 index 000000000..a26de71d4 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/users_me_limits_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const limits = await apifyClient + .user('me') + .limits(); + +console.log(limits); diff --git a/apify-api/openapi/code_samples/javascript/users_me_limits_put.js b/apify-api/openapi/code_samples/javascript/users_me_limits_put.js new file mode 100644 index 000000000..ca04d325e --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/users_me_limits_put.js @@ -0,0 +1,12 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const updatedLimits = await apifyClient + .user('me') + .updateLimits({ + dataRetentionDays: 5, + }); + +console.log(updatedLimits); diff --git a/apify-api/openapi/code_samples/javascript/users_me_usage_monthly_get.js b/apify-api/openapi/code_samples/javascript/users_me_usage_monthly_get.js new file mode 100644 index 000000000..56bcf1f93 --- /dev/null +++ b/apify-api/openapi/code_samples/javascript/users_me_usage_monthly_get.js @@ -0,0 +1,10 @@ +import { ApifyClient } from 'apify-client'; + +const apifyClient = new ApifyClient({ + token: '', +}); +const usage = await apifyClient + .user('me') + .monthlyUsage(); + +console.log(usage);