From c8c920cec87896beb59b1265c48e6be2426fc7da Mon Sep 17 00:00:00 2001 From: ging-dev Date: Tue, 12 Dec 2023 18:03:01 +0700 Subject: [PATCH] feat: generate docs --- composer.json | 9 ++-- docs/TikTok/Concern/Crawlable.md | 33 ++++++++++++ docs/TikTok/Driver/DriverInterface.md | 38 ++++++++++++++ docs/TikTok/Driver/FacebookDriver.md | 49 ++++++++++++++++++ docs/TikTok/Driver/SnaptikDriver.md | 49 ++++++++++++++++++ docs/TikTok/Util/Token.md | 33 ++++++++++++ docs/TikTok/VideoDownloader.md | 74 +++++++++++++++++++++++++++ docs/index.md | 26 ++++++++++ src/VideoDownloader.php | 2 +- 9 files changed, 308 insertions(+), 5 deletions(-) create mode 100644 docs/TikTok/Concern/Crawlable.md create mode 100644 docs/TikTok/Driver/DriverInterface.md create mode 100644 docs/TikTok/Driver/FacebookDriver.md create mode 100644 docs/TikTok/Driver/SnaptikDriver.md create mode 100644 docs/TikTok/Util/Token.md create mode 100644 docs/TikTok/VideoDownloader.md create mode 100644 docs/index.md diff --git a/composer.json b/composer.json index 8c4735b..9fcba43 100644 --- a/composer.json +++ b/composer.json @@ -10,9 +10,9 @@ }, "license": "MIT", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "TikTok\\": "./src" + } }, "authors": [ { @@ -23,7 +23,8 @@ "minimum-stability": "stable", "require-dev": { "pestphp/pest": "^1.21", - "vimeo/psalm": "^5" + "vimeo/psalm": "^5", + "danog/phpdoc": "^0.1.22" }, "config": { "allow-plugins": { diff --git a/docs/TikTok/Concern/Crawlable.md b/docs/TikTok/Concern/Crawlable.md new file mode 100644 index 0000000..d597103 --- /dev/null +++ b/docs/TikTok/Concern/Crawlable.md @@ -0,0 +1,33 @@ +--- +title: "TikTok\\Concern\\Crawlable: " +description: "" + +--- +# `TikTok\Concern\Crawlable` +[Back to index](../../index.md) + +> Author: ging-dev + + + + + + + +## Method list: +* [`getBrowser(): \Symfony\Component\BrowserKit\HttpBrowser`](#getbrowser-symfony-component-browserkit-httpbrowser) + +## Methods: +### `getBrowser(): \Symfony\Component\BrowserKit\HttpBrowser` + + + + +#### See also: +* `\Symfony\Component\BrowserKit\HttpBrowser` + + + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it) diff --git a/docs/TikTok/Driver/DriverInterface.md b/docs/TikTok/Driver/DriverInterface.md new file mode 100644 index 0000000..056cffd --- /dev/null +++ b/docs/TikTok/Driver/DriverInterface.md @@ -0,0 +1,38 @@ +--- +title: "TikTok\\Driver\\DriverInterface: " +description: "" + +--- +# `TikTok\Driver\DriverInterface` +[Back to index](../../index.md) + +> Author: ging-dev + + + + + + + +## Method list: +* [`handle(string $url): \T`](#handle-string-url-t) + +## Methods: +### `handle(string $url): \T` + + + + +Parameters: + +* `$url`: `string` + + +#### See also: +* `\T` + + + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it) diff --git a/docs/TikTok/Driver/FacebookDriver.md b/docs/TikTok/Driver/FacebookDriver.md new file mode 100644 index 0000000..9233dbb --- /dev/null +++ b/docs/TikTok/Driver/FacebookDriver.md @@ -0,0 +1,49 @@ +--- +title: "TikTok\\Driver\\FacebookDriver: " +description: "" + +--- +# `TikTok\Driver\FacebookDriver` +[Back to index](../../index.md) + +> Author: ging-dev + + + + + + + +## Constants +* `TikTok\Driver\FacebookDriver::CDN_URL`: + + +## Method list: +* [`handle(string $url): mixed`](#handle-string-url-mixed) +* [`getBrowser(): \Symfony\Component\BrowserKit\HttpBrowser`](#getbrowser-symfony-component-browserkit-httpbrowser) + +## Methods: +### `handle(string $url): mixed` + + + + +Parameters: + +* `$url`: `string` + + + +### `getBrowser(): \Symfony\Component\BrowserKit\HttpBrowser` + + + + +#### See also: +* `\Symfony\Component\BrowserKit\HttpBrowser` + + + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it) diff --git a/docs/TikTok/Driver/SnaptikDriver.md b/docs/TikTok/Driver/SnaptikDriver.md new file mode 100644 index 0000000..257b79f --- /dev/null +++ b/docs/TikTok/Driver/SnaptikDriver.md @@ -0,0 +1,49 @@ +--- +title: "TikTok\\Driver\\SnaptikDriver: " +description: "" + +--- +# `TikTok\Driver\SnaptikDriver` +[Back to index](../../index.md) + +> Author: ging-dev + + + + + + + +## Constants +* `TikTok\Driver\SnaptikDriver::CDN_URL`: + + +## Method list: +* [`handle(string $url): mixed`](#handle-string-url-mixed) +* [`getBrowser(): \Symfony\Component\BrowserKit\HttpBrowser`](#getbrowser-symfony-component-browserkit-httpbrowser) + +## Methods: +### `handle(string $url): mixed` + + + + +Parameters: + +* `$url`: `string` + + + +### `getBrowser(): \Symfony\Component\BrowserKit\HttpBrowser` + + + + +#### See also: +* `\Symfony\Component\BrowserKit\HttpBrowser` + + + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it) diff --git a/docs/TikTok/Util/Token.md b/docs/TikTok/Util/Token.md new file mode 100644 index 0000000..40dc49f --- /dev/null +++ b/docs/TikTok/Util/Token.md @@ -0,0 +1,33 @@ +--- +title: "TikTok\\Util\\Token: " +description: "" + +--- +# `TikTok\Util\Token` +[Back to index](../../index.md) + +> Author: ging-dev + + + + + + + +## Method list: +* [`extract(string $string): string|false`](#extract-string-string-string-false) + +## Methods: +### `extract(string $string): string|false` + + + + +Parameters: + +* `$string`: `string` + + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it) diff --git a/docs/TikTok/VideoDownloader.md b/docs/TikTok/VideoDownloader.md new file mode 100644 index 0000000..b0a22e3 --- /dev/null +++ b/docs/TikTok/VideoDownloader.md @@ -0,0 +1,74 @@ +--- +title: "TikTok\\VideoDownloader: " +description: "" + +--- +# `TikTok\VideoDownloader` +[Back to index](../index.md) + +> Author: ging-dev + + + + + + + +## Method list: +* [`__construct(\TikTok\Driver\DriverInterface<\T> $driver)`](#__construct-tiktok-driver-driverinterface-t-driver) +* [`setDriver(\TikTok\Driver\DriverInterface<\T> $driver): \TikTok\VideoDownloader<\T>`](#setdriver-tiktok-driver-driverinterface-t-driver-tiktok-videodownloader-t) +* [`get(string $url): \T`](#get-string-url-t) + +## Methods: +### `__construct(\TikTok\Driver\DriverInterface<\T> $driver)` + + + + +Parameters: + +* `$driver`: `\TikTok\Driver\DriverInterface<\T>` + + +#### See also: +* `\T` +* [\TikTok\Driver\DriverInterface](../TikTok/Driver/DriverInterface.md) + + + + +### `setDriver(\TikTok\Driver\DriverInterface<\T> $driver): \TikTok\VideoDownloader<\T>` + + + + +Parameters: + +* `$driver`: `\TikTok\Driver\DriverInterface<\T>` + + +#### See also: +* `\T` +* [\TikTok\Driver\DriverInterface](../TikTok/Driver/DriverInterface.md) + + + + +### `get(string $url): \T` + + + + +Parameters: + +* `$url`: `string` + + +#### See also: +* `\T` + + + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it) diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..e4c220e --- /dev/null +++ b/docs/index.md @@ -0,0 +1,26 @@ +--- +description: "Tiktok video downloader" +title: "gingteam/tiktok" + +--- +# `gingteam/tiktok` + +Tiktok video downloader + + + +## Abstract classes +* [\TikTok\Driver\DriverInterface](TikTok/Driver/DriverInterface.md) + +## Classes +* [\TikTok\VideoDownloader](TikTok/VideoDownloader.md) +* [\TikTok\Driver\FacebookDriver](TikTok/Driver/FacebookDriver.md) +* [\TikTok\Driver\SnaptikDriver](TikTok/Driver/SnaptikDriver.md) +* [\TikTok\Util\Token](TikTok/Util/Token.md) + +## Traits +* [\TikTok\Concern\Crawlable](TikTok/Concern/Crawlable.md) + + +--- +Generated by [danog/phpdoc](https://phpdoc.daniil.it). \ No newline at end of file diff --git a/src/VideoDownloader.php b/src/VideoDownloader.php index 31c14c8..6ac1f57 100644 --- a/src/VideoDownloader.php +++ b/src/VideoDownloader.php @@ -25,7 +25,7 @@ public function __construct(DriverInterface $driver) /** * @param DriverInterface $driver * - * @return self + * @return VideoDownloader */ public function setDriver(DriverInterface $driver): self {