8
0
This commit is contained in:
Aleksandr Garin 2023-03-28 17:27:34 +03:00
parent d231504df1
commit d8e57a6b2c
2 changed files with 43 additions and 49 deletions

View File

@ -1,7 +1,7 @@
_id: spc_2b420b2bed1d4d868807303a581fb8c1
type: ApiSpec
parentId: wrk_cd1160cf39f5497fa4711fe4fd6567de
modified: 1680013029849
modified: 1680013585576
created: 1679916396495
fileName: youtubekids.yaml
contents: >+
@ -33,17 +33,24 @@ contents: >+
description: Get content for resource
operationId: browse
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BrowseRequestPayload'
responses:
'200':
description: Successful operation
description: OK
content:
'application/json':
"schema":
$ref: '#/components/schemas/BrowseResponse'
$ref: '#/components/schemas/BrowseResponsePayload'
'400':
description: Bad Request
content:
'application/json':
"schema":
$ref: '#/components/schemas/ErrorResponsePayload'
# Компоненты
@ -52,6 +59,17 @@ contents: >+
# Схемы данных
schemas:
# Ошибка
Error:
type: object
properties:
message:
type: string
domain:
type: string
reason:
type: string
# Доступность данных
AccessibilityData:
type: object
@ -342,7 +360,7 @@ contents: >+
example: FEkids_home
# Ответ на запрос получения контента определенного ресурса
BrowseResponse:
BrowseResponsePayload:
type: object
properties:
responseContext:
@ -355,6 +373,25 @@ contents: >+
trackingParams:
type: string
# Ответ с ошибкой
ErrorResponsePayload:
type: object
properties:
error:
type: object
properties:
code:
type: number
example: 400
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/Error'
status:
type: string
example: FAILED_PRECONDITION

View File

@ -1,7 +1,7 @@
_id: req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa
type: Request
parentId: fld_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa
modified: 1679919070840
modified: 1680013066020
created: 1679919032177
url: "{{ base_url }}/browse"
name: Browse resource content
@ -12,50 +12,7 @@ body:
text: |-
{
"context": {
"client": {
"clientName": "WEB_KIDS",
"clientVersion": "2.20230202.00.00",
"hl": "ru",
"gl": "RU",
"experimentsToken": "string",
"browserName": "Safari",
"deviceMake": "apple",
"browserVersion": "16.2",
"osName": "Macintosh",
"osVersion": "10_15_7",
"platform": "DESKTOP",
"kidsAppInfo": {
"contentSettings": {
"corpusPreference": "KIDS_CORPUS_PREFERENCE_TWEEN",
"kidsNoSearchMode": "YT_KIDS_NO_SEARCH_MODE_OFF"
},
"categorySettings": {
"enabledCategories": [
"approved_for_you",
"black_joy",
"camp",
"collections",
"earth",
"explore",
"favorites",
"gaming",
"halloween",
"hero",
"learning",
"making",
"move",
"music",
"reading",
"shared_by_parents",
"shows",
"soccer",
"sports",
"spotlight",
"winter"
]
}
}
}
},
"browseId": "FEkids_home"
}