From 09a02446825973bcbc976fde847931074603713a Mon Sep 17 00:00:00 2001 From: BOTCAHX <94074076+BOTCAHX@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:06:26 +0700 Subject: [PATCH] Update README.md --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 09166ee..0169b48 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ ```sh npm i tiktokdl ``` -#### [Demo Projects](https://github.com/BOTCAHX/tiktokdl-api) - -# Example +# Example For CommonJS ```js const { tiktokdl } = require('tiktokdl') @@ -13,6 +11,15 @@ const url = 'https://www.tiktok.com/@omagadsus/video/7025456384175017243?is_from const data = await tiktokdl(url) console.log(data) // JSON ``` +# Example For TypeScript +```ts +import { tiktokdl: TikTok } from "tiktokdl" + +const url = 'https://www.tiktok.com/@omagadsus/video/7025456384175017243?is_from_webapp=1&sender_device=pc&web_id6982004129280116226' +// Using tiktokdl +const data = await TikTok(url) +console.log(data) // JSON +``` ## Catatan Penting