8
0

- Upgrade

This commit is contained in:
Aleksandr Garin 2023-08-22 17:00:22 +03:00
parent 826b0e39ec
commit 2e4a583801
2 changed files with 244 additions and 74 deletions

View File

@ -1,10 +1,10 @@
_id: spc_2b420b2bed1d4d868807303a581fb8c1
type: ApiSpec
parentId: wrk_cd1160cf39f5497fa4711fe4fd6567de
modified: 1680017776645
modified: 1692712790774
created: 1679916396495
fileName: youtubekids.yaml
contents: >+
contents: >
openapi: 3.0.3
@ -13,10 +13,11 @@ contents: >+
description: For generate API REST clients for Feelter UGC
contact:
email: garin1221@yandex.ru
version: 1.0.0
version: 0.0.2
servers:
- url: https://www.youtubekids.com/youtubei/v1
description: Original YoutubeKids API Server V1
tags:
- name: browse
@ -45,14 +46,13 @@ contents: >+
'application/json':
"schema":
$ref: '#/components/schemas/BrowseResponsePayload'
'400':
description: Bad Request
default:
description: Unexpected error
content:
'application/json':
"schema":
$ref: '#/components/schemas/ErrorResponsePayload'
# Компоненты
components:
@ -62,6 +62,10 @@ contents: >+
# Ошибка
Error:
type: object
required:
- message
- domain
- reason
properties:
message:
type: string
@ -114,6 +118,8 @@ contents: >+
# Текст -> Runs
TextRun:
type: object
required:
- text
properties:
text:
type: string
@ -123,6 +129,8 @@ contents: >+
# Текст
Text:
type: object
required:
- runs
properties:
runs:
type: array
@ -134,6 +142,9 @@ contents: >+
# Строковый параметр ключ-зачение
KeyStringValue:
type: object
required:
- key
- value
properties:
key:
type: string
@ -143,6 +154,8 @@ contents: >+
# Ассеты категории
CategoryAssets:
type: object
required:
- assetKey
properties:
assetKey:
type: string
@ -152,6 +165,8 @@ contents: >+
# Расширение для владельцев детских видео
KidsVideoOwnerExtension:
type: object
required:
- externalChannelId
properties:
externalChannelId:
type: string
@ -159,17 +174,28 @@ contents: >+
# Thumbnail
Thumbnail:
type: object
required:
- url
- width
- height
properties:
url:
type: string
width:
type: number
type: integer
height:
type: number
type: integer
# Компактный видеорендерер
# Рендер карточки с видео
CompactVideoRenderer:
type: object
required:
- videoId
- thumbnail
- title
- viewCountText
- trackingParams
- kidsVideoOwnerExtension
properties:
videoId:
type: string
@ -210,15 +236,108 @@ contents: >+
kidsVideoOwnerExtension:
$ref: '#/components/schemas/KidsVideoOwnerExtension'
# Рендер карточки с плейлистом
CompactPlaylistRenderer:
type: object
required:
- playlistId
- thumbnail
- title
- viewCountText
- trackingParams
properties:
playlistId:
type: string
thumbnail:
type: object
properties:
thumbnails:
type: array
items:
$ref: '#/components/schemas/Thumbnail'
title:
$ref: '#/components/schemas/Text'
shortBylineText:
$ref: '#/components/schemas/Text'
videoCountText:
$ref: '#/components/schemas/Text'
navigationEndpoint:
$ref: '#/components/schemas/NavigationEndpoint'
videoCountShortText:
$ref: '#/components/schemas/Text'
trackingParams:
type: string
sidebarThumbnails:
type: array
items:
type: object
properties:
thumbnails:
type: array
items:
$ref: '#/components/schemas/Thumbnail'
thumbnailText:
$ref: '#/components/schemas/Text'
shareUrl:
type: string
longBylineText:
$ref: '#/components/schemas/Text'
tvBanner:
type: object
properties:
thumbnails:
type: array
items:
$ref: '#/components/schemas/Thumbnail'
# Рендер карточки с каналом
CompactChannelRenderer:
type: object
required:
- channelId
- displayName
- videoCountText
- title
- trackingParams
properties:
channelId:
type: string
thumbnail:
type: object
properties:
thumbnails:
type: array
items:
$ref: '#/components/schemas/Thumbnail'
displayName:
$ref: '#/components/schemas/Text'
videoCountText:
$ref: '#/components/schemas/Text'
subscriberCountText:
$ref: '#/components/schemas/Text'
navigationEndpoint:
$ref: '#/components/schemas/NavigationEndpoint'
title:
$ref: '#/components/schemas/Text'
trackingParams:
type: string
# Средство визуализации раздела элемента
ItemSectionRenderer:
type: object
required:
- contents
- trackingParams
properties:
contents:
type: array
items:
type: object
properties:
compactPlaylistRenderer:
$ref: '#/components/schemas/CompactPlaylistRenderer'
compactChannelRenderer:
$ref: '#/components/schemas/CompactChannelRenderer'
compactVideoRenderer:
$ref: '#/components/schemas/CompactVideoRenderer'
trackingParams:
@ -285,13 +404,28 @@ contents: >+
# Параметры контента
KidsAppContentSettings:
type: object
required:
- corpusPreference
- kidsNoSearchMode
properties:
corpusPreference:
type: string
enum:
- KIDS_CORPUS_PREFERENCE_UNKNOWN # unknown
- KIDS_CORPUS_PREFERENCE_YOUNGER # (0-4 years)
- KIDS_CORPUS_PREFERENCE_TWEEN # (5-7)
- KIDS_CORPUS_PREFERENCE_PAM_YOUNGER
- KIDS_CORPUS_PREFERENCE_PAM_TWEEN
- KIDS_CORPUS_PREFERENCE_PRESCHOOL # (8-12)
example: KIDS_CORPUS_PREFERENCE_TWEEN
kidsNoSearchMode:
type: string
enum:
- YT_KIDS_NO_SEARCH_MODE_UNKNOWN # unknown
- YT_KIDS_NO_SEARCH_MODE_ON
- YT_KIDS_NO_SEARCH_MODE_OFF
example: YT_KIDS_NO_SEARCH_MODE_OFF
default: YT_KIDS_NO_SEARCH_MODE_OFF
# Конфигурация категорий
KidsAppCategorySettings:
@ -317,39 +451,61 @@ contents: >+
RequestClient:
type: object
description: Client information
required:
- hl
- gl
- osName
- platform
- osVersion
- clientName
- deviceMake
- kidsAppInfo
- browserName
- clientVersion
- browserVersion
properties:
clientName:
type: string
example: WEB_KIDS
default: WEB_KIDS
clientVersion:
type: string
example: 2.20230202.00.00
example: 2.20230817.00.00
default: 2.20230817.00.00
hl:
type: string
example: ru
default: ru
gl:
type: string
example: RU
default: RU
experimentsToken:
type: string
browserName:
type: string
example: Safari
default: Safari
deviceMake:
type: string
example: apple
default: apple
browserVersion:
type: string
example: '16.2'
default: '16.2'
osName:
type: string
example: Macintosh
default: Macintosh
osVersion:
type: string
example: 10_15_7
example: '10_15_7'
default: '10_15_7'
platform:
type: string
example: DESKTOP
default: DESKTOP
kidsAppInfo:
$ref: '#/components/schemas/KidsAppInfo'
@ -357,6 +513,8 @@ contents: >+
RequestContext:
type: object
description: Request context
required:
- client
properties:
client:
$ref: '#/components/schemas/RequestClient'
@ -369,7 +527,7 @@ contents: >+
visitorData:
type: string
maxAgeSeconds:
type: number
type: integer
serviceTrackingParams:
type: array
items:
@ -385,9 +543,14 @@ contents: >+
# Данные для запроса на получение контента определенного ресурса
BrowseRequestPayload:
type: object
required:
- context
- browseId
properties:
context:
$ref: '#/components/schemas/RequestContext'
params:
type: string
browseId:
type: string
example: FEkids_home
@ -395,6 +558,10 @@ contents: >+
# Ответ на запрос получения контента определенного ресурса
BrowseResponsePayload:
type: object
required:
- header
- contents
- responseContext
properties:
responseContext:
$ref: '#/components/schemas/ResponseContext'
@ -414,12 +581,19 @@ contents: >+
# Ответ с ошибкой
ErrorResponsePayload:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- errors
- status
- message
properties:
code:
type: number
type: integer
example: 400
message:
type: string
@ -430,8 +604,4 @@ contents: >+
status:
type: string
example: FAILED_PRECONDITION
contentType: yaml

View File

@ -1,7 +1,7 @@
_id: req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa
type: Request
parentId: fld_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa
modified: 1680014368438
modified: 1692541642074
created: 1679919032177
url: "{{ base_url }}/browse"
name: Browse resource content
@ -14,7 +14,7 @@ body:
"context": {
"client": {
"clientName": "WEB_KIDS",
"clientVersion": "2.20230202.00.00",
"clientVersion": "2.20230817.00.00",
"hl": "ru",
"gl": "RU",
"experimentsToken": "string",