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 _id: spc_2b420b2bed1d4d868807303a581fb8c1
type: ApiSpec type: ApiSpec
parentId: wrk_cd1160cf39f5497fa4711fe4fd6567de parentId: wrk_cd1160cf39f5497fa4711fe4fd6567de
modified: 1680013029849 modified: 1680013585576
created: 1679916396495 created: 1679916396495
fileName: youtubekids.yaml fileName: youtubekids.yaml
contents: >+ contents: >+
@ -33,17 +33,24 @@ contents: >+
description: Get content for resource description: Get content for resource
operationId: browse operationId: browse
requestBody: requestBody:
required: true
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/BrowseRequestPayload' $ref: '#/components/schemas/BrowseRequestPayload'
responses: responses:
'200': '200':
description: Successful operation description: OK
content: content:
'application/json': 'application/json':
"schema": "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: schemas:
# Ошибка
Error:
type: object
properties:
message:
type: string
domain:
type: string
reason:
type: string
# Доступность данных # Доступность данных
AccessibilityData: AccessibilityData:
type: object type: object
@ -342,7 +360,7 @@ contents: >+
example: FEkids_home example: FEkids_home
# Ответ на запрос получения контента определенного ресурса # Ответ на запрос получения контента определенного ресурса
BrowseResponse: BrowseResponsePayload:
type: object type: object
properties: properties:
responseContext: responseContext:
@ -355,6 +373,25 @@ contents: >+
trackingParams: trackingParams:
type: string 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 _id: req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa
type: Request type: Request
parentId: fld_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa parentId: fld_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa
modified: 1679919070840 modified: 1680013066020
created: 1679919032177 created: 1679919032177
url: "{{ base_url }}/browse" url: "{{ base_url }}/browse"
name: Browse resource content name: Browse resource content
@ -12,50 +12,7 @@ body:
text: |- text: |-
{ {
"context": { "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" "browseId": "FEkids_home"
} }