diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/i-miss-someone-vt.md | 41 | ||||
| -rw-r--r-- | docs/patchwork-archive-api.md | 366 | ||||
| -rw-r--r-- | docs/vtuber-captcha.md | 155 |
3 files changed, 0 insertions, 562 deletions
diff --git a/docs/i-miss-someone-vt.md b/docs/i-miss-someone-vt.md deleted file mode 100644 index e172a5e..0000000 --- a/docs/i-miss-someone-vt.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: IMissSomeone-VT Docs -lang: en-US ---- -# IMissSomeone-VT -Miss your favorite VTuber? "I Miss Someone VT" is a template for deploying a fansite for any particular VTuber. - -This page serves as documentation for necessary configuration - -# Environment Variables -The Flask backend relies on environment variables for configuration. - -- **KV_REST_API_URL** - - Redis KV database REST API URL -- **KV_REST_API_TOKEN** - - Redis KV API Token -- **FREE_CHAT_ID** - - Video ID of the free chat/waiting room. The thumbnail from this scheduled waiting room is used as the schedule page PNG -- **CHANNEL_ID** - - YouTube Channel ID of the tracked channel -- **API_KEY** - - Holodex API Key -- **MANUAL_OVERRIDE** - - In case Holodex misreports a video as a stream, this can be used to ignore a particular video (insert video ID) - -# Site Config -The configuration for the frontend can be found within `site-config.json` - -- **soundUrls** - - List of soundbites that will play when the button is clicked -- **rareSoundUrls** - - An extended list of soundUrls but these will only play 10% of the time -- *pastImages* - - A list of images that are cycled through on the landing page -- *buttonIcon* - - Icon that appears in the background when the button is clicked (img) - -The project itself is reliant on Holodex API for data and Redis KV for storing information regarding the button's global click count - - - diff --git a/docs/patchwork-archive-api.md b/docs/patchwork-archive-api.md deleted file mode 100644 index 4ccff24..0000000 --- a/docs/patchwork-archive-api.md +++ /dev/null @@ -1,366 +0,0 @@ ---- -title: Patchwork Archive API Docs -lang: en-US -outline: deep ---- -# Patchwork Archive API - -> Version MIT - -API data from Patchwork Archive is public and **no API key** is required to access it (subject to change) -## Path Table - -| Method | Path | Description | -| --- | --- | --- | -| GET | [/channel/{channel_id}](#get-channel) | Gets archived videos from a particular channel | -| GET | [/channel_name](#get-channel-name) | Gets archived videos from a particular channel | -| GET | [/daily_featured_videos](#getdaily_featured_videos) | Get today's daily features videos | -| GET | [/database/status](#getdatabasestatus) | Get the status of the database | -| GET | [/database/video_data/{video_id}](#getdatabasevideo_datavideo_id) | Get detailed information about the video if available | -| GET | [/discover_videos](#getdiscover_videos) | Get multiple random videos | -| GET | [/random_video](#getrandom_video) | Get a singular random video | -| GET | [/recently_archived](#getrecently_archived) | Get the 6 most recently archived videos | -| GET | [/search/results](#getsearchresults) | Get paginated search results for some keyword | -| GET | [/storage/status](#getstoragestatus) | Get the status of the database | -| GET | [/video/{video_id}](#getvideovideo_id) | Get basic information regarding a specific video | - -## Reference Table - -| Name | Path | Description | -| --- | --- | --- | -| Channel | [#/components/schemas/Channel](#componentsschemaschannel) | | -| Video | [#/components/schemas/Video](#componentsschemasvideo) | | - -## Path Details - -*** - -### [GET]/channel/{channel_id} - -- Summary -Gets archived videos from a particular channel as a paginated result - -- Description -Gets a paginated result of archived videos matching a channel id. Returns 12 videos per page. Pages is the number of pages available - -#### Parameters(Query) - -```ts -page: integer -``` - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -pages: int -{ - channel_id: string - channel_name: string - description: string - title: string - upload_date: string - video_id: string -}[] -``` - -*** - -### [GET]/channel_name - -- Summary -Gets the name of a particular channel by channel id - -- Description -Returns an alternative JSON if the look up fails or the channel id doesn't exist in the database - -#### Parameters(Query) - -```ts -channel_id: string -``` - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -{ - channel_name?: string -} -``` - -- 200 successful operation but failed look up -```ts -{ - error?: string -} -``` -*** - -### [GET]/daily_featured_videos - -- Summary -Get today's daily featured videos - -- Description -Either 1 or 2 video objects in an array depending on calculated hash - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -{ - channel_id: string - channel_name: string - description: string - title: string - upload_date: string - video_id: string -}[] -``` - -*** - -### [GET]/database/status - -- Summary -Get the status of the database - -#### Responses - -- 200 successful operation. - -`text/plain` - -```ts -{ - "properties": { - "OK": { - "type": "string", - "example": "OK" - } - } -} -``` - -- 500 database is down - -`application/json` - -```ts -{ - "properties": { - "FAIL": { - "type": "string", - "example": "500" - } - } -} -``` - -*** - -### [GET]/database/video_data/{video_id} - -- Summary -Get detailed information about the video if available - -- Description -If info.json generated by yt-dlp is available it will be directly delivered here, if not, fallback video data from the database is used instead - -#### Responses - -- 200 successful operation. - -`application/json` - -```ts -{ - channel_id: string - channel_name: string - description: string - title: string - upload_date: string - video_id: string -} -``` - -*** - -### [GET]/discover_videos - -- Summary -Gets randomly chosen videos from the database - -#### Parameters(Query) - -```ts -count?: integer -``` - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -{ - channel_id: string - channel_name: string - description: string - title: string - upload_date: string - video_id: string -}[] -``` - -*** - -### [GET]/random_video - -- Summary -Get a singular random video - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -{ - channel_id: string - channel_name: string - description: string - title: string - upload_date: string - video_id: string -} -``` - -*** - -### [GET]/recently_archived - -- Summary -Get the 6 most recently archived videos - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -{ - channel_id: string - channel_name: string - description: string - title: string - upload_date: string - video_id: string -}[] -``` - -*** - -### [GET]/search/results - -- Summary -Get paginated search results for some keyword - -#### Parameters(Query) - -```ts -q: string -``` - -```ts -page?: integer -``` - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -page: integer -{ - channel_id: string - channel_name: string - description: string - title: string - upload_date: string - video_id: string -}[] -``` - -*** - -### [GET]/storage/status - -- Summary -Get the status of the database - -- Description -Gets the number of videos archived and space used in GB - -#### Responses - -- 200 successful operation. - -`application/json` - -```ts -number_of_files: integer -storage_size: string -``` - -*** - -### [GET]/video/{video_id} - -- Summary -Get basic information regarding a specific video - -- Description -Pulls basic information about a video from fallback database only - -#### Responses - -- 200 successful operation - -`application/json` - -```ts -{ - channel_id?: string - channel_name?: string - description?: string - title?: string - upload_date?: string - video_id?: string -} -``` - -- 404 Video not found - -`application/json` - -```ts -{ - error?: string -} -```
\ No newline at end of file diff --git a/docs/vtuber-captcha.md b/docs/vtuber-captcha.md deleted file mode 100644 index 48dad08..0000000 --- a/docs/vtuber-captcha.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: VTuber Captcha Docs ---- -# VTuber Captcha - -A simple web API that serves VTuber related CAPTCHAs including server-side verification. -Bring your own frontend to display the data. - -## Available Endpoints -The base URL or the API currently is: `https://vtuber-captcha.vercel.app/api` - -Below are the current API endpoints supported: -[Authenticating Against the API](https://github.com/pinapelz/vtuber-captcha/wiki/Authenticating-Answers-Against-the-API) - -### `/affiliation/<org>` -Returns a captcha asking user to identify which of the VTubers are affiliated with a particular organization or group - -**Path Parameters** -- `<org>`: Refer to [organization page](https://github.com/pinapelz/vtuber-captcha/wiki/Supported-Terms#organizations) for a list of supported terms - **Query Parameters** -- `server_auth`: false if answers to captcha should be sent to response, true if you would like the API to store the answer and authenticate against it. - - Default: `false` - - Enums: `true, false` - - - -## Authenticating Answers Against The Server -The API supports server-side verification meaning that the answer to the CAPTCHA is never sent to you after making the initial request. - -Instead, each request will be assigned a session-token which uniquely identifies the CAPTCHA. The server then saves the answer to the CAPTCHA. -This makes it safe for you to directly call the API client-side from a frontend without the need for a middle-man to store the answer. - -To authenticate answers against the API. You need to specify the query parameter `?server_auth=true` - -**Example Response with `?server_auth=true`** -```json -{ - "category": "affiliation", - "onFail": { - "extra": null, - "text": "You got some wrong" - }, - "questions": [ - { - "id": "UCgZuwn-O7Szh9cAgHqJ6vjw", - "image": "https://yt3.ggpht.com/ytc/AMLnZu_aQ3akSpFc9SVPcFMXATjdKZAcmy1aXtGq364A=s800-c-k-c0x00ffffff-no-rj", - "name": "Aloe Ch.魔乃アロエ" - }, - { - "id": "UC7MMNHR-kf9EN1rXiesMTMw", - "image": "https://yt3.ggpht.com/8SFoIMf_6XTf0jyeLd6Txdl96BqSyGhb250P3qEh7E4ui8fLNxLXLiLf7phYVy0CIYx3as42=s800-c-k-c0x00ffffff-no-rj", - "name": "Magni Dezmond Ch. HOLOSTARS-EN" - }, - { - "id": "UCwL7dgTxKo8Y4RFIKWaf8gA", - "image": "https://yt3.ggpht.com/ytc/AOPolaStFlTJ6ISi2Wuwz7L_OLHHShXfoVPDDnqsPWLb=s800-c-k-c0x00ffffff-no-rj", - "name": "Oga Ch.荒咬オウガ" - }, - { - "id": "UCdn5BQ06XqgXoAxIhbqw5Rg", - "image": "https://yt3.ggpht.com/ytc/AOPolaSFPK_6xlqthNXIpMC7OTWfGsDAoNkR9OexBYxcpA=s800-c-k-c0x00ffffff-no-rj", - "name": "フブキCh。白上フブキ" - }, - { - "id": "UCa9Y57gfeY0Zro_noHRVrnw", - "image": "https://yt3.ggpht.com/O7m_5HMY_O8yxR3Jhn9cEO1fLNL_GifMERExnAmfY7JrdTRsTjNijTcNYTPN97Llj3zGn8Susw=s800-c-k-c0x00ffffff-no-rj", - "name": "Luna Ch. 姫森ルーナ" - }, - { - "id": "UC1CfXB_kRs3C-zaeTG3oGyg", - "image": "https://yt3.ggpht.com/B2tq3IQAFxUe9W3MaMc0V62bmlTWCSoTuCk-Y-Ab8yXkZKdIswQhHABZhz2e4YM1-B_Kxen_7w=s800-c-k-c0x00ffffff-no-rj", - "name": "HAACHAMA Ch 赤井はあと" - }, - { - "id": "UCw1KNjVqfrJSfcFd6zlcSzA", - "image": "https://yt3.ggpht.com/7QQ7vnkdwS7e8cLY6YYRoLTLftUxQCopsIxE7L9Qd6vXW_TsCjb4YZDVqYTJ3qceAAqWtwQH=s800-c-k-c0x00ffffff-no-rj", - "name": "Nia Suzune / 鈴音にあ [PRISM Project]" - }, - { - "id": "UCambvP8yxNDot4FzQc9cgiw", - "image": "https://yt3.ggpht.com/EgL9iOOKL7KiLIBxjqJO6gmVJE7BJ4xqfmgyis_QQ9zdbYAD_Pco7xagjdpWCTFoPbgxEXyJ=s800-c-k-c0x00ffffff-no-rj", - "name": "宇佐美リト / Usami Rito【にじさんじ】" - }, - { - "id": "UCqEp6RdtsMbUNrCdCswr6pA", - "image": "https://yt3.ggpht.com/ytc/AMLnZu9ZF7fPn4IghqjrWH-SFrdSzlY9EMtkkoUntGLWLA=s800-c-k-c0x00ffffff-no-rj", - "name": "海夜叉神/黄泉波咲夜【にじさんじ】" - }, - { - "id": "UC6TfqY40Xt1Y0J-N18c85qQ", - "image": "https://yt3.ggpht.com/50JCdIpi9B-ZxDaveVfSyKuvRyj8d2DgLe0sMkd_UxuxN-VcGQ54W4M-6T0wXzJV2TdfAeZglSc=s800-c-k-c0x00ffffff-no-rj", - "name": "安土桃" - }, - { - "id": "UCFTLzh12_nrtzqBPsTCqenA", - "image": "https://yt3.ggpht.com/ytc/AOPolaRF12upNUVmDXfH2A7ViS-gyKCcAvAQXTyEmbWAcA=s800-c-k-c0x00ffffff-no-rj", - "name": "アキロゼCh。Vtuber/ホロライブ所属" - }, - { - "id": "UCMwGHR0BTZuLsmjY_NT5Pwg", - "image": "https://yt3.ggpht.com/f4uYWHJxiGwyXm8NUlm818N1MRnywtgL6wM8JdWqWsKBzI7v1eg8dxDWG7igkWuukUSiufydqPg=s800-c-k-c0x00ffffff-no-rj", - "name": "Ninomae Ina'nis Ch. hololive-EN" - }, - { - "id": "UC6oW4FXETgEGOFTxWmI2h5Q", - "image": "https://yt3.ggpht.com/ytc/AMLnZu_clEsYJi5qCPCpxCuw2qMwB5rfcm2hgDITVRRn=s800-c-k-c0x00ffffff-no-rj", - "name": "Noor【NIJISANJI IN】" - }, - { - "id": "UC_sFNM0z0MWm9A6WlKPuMMg", - "image": "https://yt3.ggpht.com/JDCIBWj11TgjY2Uyba_efZ0n5hzjysMB9GxkvHGkIN_sfFQJR5mx3iVPqgJ96IPcYjZpCLsb=s800-c-k-c0x00ffffff-no-rj", - "name": "Nerissa Ravencroft Ch. hololive-EN" - }, - { - "id": "UCnYhIk9aGEx_bIgheVjs53w", - "image": "https://yt3.ggpht.com/ytc/AOPolaRL4Pk2cC2Q0GXLV-N9tSPZkCDp_c2RqdQEBpY-=s800-c-k-c0x00ffffff-no-rj", - "name": "Luto Araka / 新火ると [PRISM Project]" - }, - { - "id": "UCIytNcoz4pWzXfLda0DoULQ", - "image": "https://yt3.ggpht.com/21x1Ab6pEffGItAcNTjcYUkG3IzQ1y--5cUUjtEhrUEuz2iCttL08vswnPRe1XvtBaZ0yUAm=s800-c-k-c0x00ffffff-no-rj", - "name": "エクス・アルビオ -Ex Albio-" - } - ], - "session": "GUQkquh03dwF84EAxif_EA", - "title": "Select all the VTuber affiliated with Hololive" -} -``` - -To check your answers against the API. Send `session` token and the `id` of each selected element as a string comma separated as part of a data payload to `/api/verify` - -Example Payload -``` -session: "j4WjkoMcPgNX8_gnNXf8HA" -answer: "UC0ZTVxCHkZanT5dnP2FZD4Q,UC4WvIIAo89_AzGUh1AZ6Dkg,UCe0JiGnjPfEwEIbWASbOimw" -``` -Response: -```json4 -{ - success: false -} -``` -In the case above the user selected: -- UC0ZTVxCHkZanT5dnP2FZD4Q -- UC4WvIIAo89_AzGUh1AZ6Dkg -- UCe0JiGnjPfEwEIbWASbOimw - -and their answer was incorrect. - -After failing a captcha, the token becomes invalidated and a request for a new CAPTCHA must be made - -## Supported Keywords -### Organization -- Hololive: All hololive Production affiliated members, including Holostars -- Nijisanji: All Nijisanji affiliated livers, including EN branches (does not include VirtuaReal)
\ No newline at end of file |
