FEAT: Discovery Video Service Subscription
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m35s
Build, Push and Deploy Discovery / build-push-deploy (push) Successful in 1m55s
Deploy Infrastructure / pulumi-up (push) Successful in 2s

This commit is contained in:
FahdShalhoub
2026-08-29 16:50:58 +03:00
parent 98950aba20
commit 6f9e04ee97
34 changed files with 1754 additions and 65 deletions
+89
View File
@@ -15,6 +15,47 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/videos/{id}": {
"get": {
"description": "Returns the catalogue's copy of a video: what a reader needs to show and play it. A video appears here only after the CMS has announced it as ready, so a video that is still transcoding — or one the CMS never made ready — is a 404.",
"produces": [
"application/json"
],
"tags": [
"videos"
],
"summary": "Get a catalogued video",
"parameters": [
{
"type": "string",
"description": "Video id, as issued by the CMS",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/api.Video"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/api.ProblemDetails"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.ProblemDetails"
}
}
}
}
},
"/health": {
"get": {
"description": "Reports that the service is up and serving. Used as the ALB target group health check; it does not verify the database connection.",
@@ -45,6 +86,54 @@ const docTemplate = `{
"example": "ok"
}
}
},
"api.ProblemDetails": {
"type": "object",
"properties": {
"detail": {
"type": "string",
"example": "The catalogue could not be read from the database. This is a server-side fault and the request was not processed; retrying in a few moments may succeed."
},
"status": {
"type": "integer",
"example": 500
},
"title": {
"type": "string",
"example": "Something Went Wrong Loading The Catalogue"
},
"type": {
"type": "string",
"example": "about:blank"
}
}
},
"api.Video": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"documentary",
"news"
]
},
"id": {
"type": "string",
"example": "0f8fad5b-d9cb-469f-a165-70867728950e"
},
"playbackUrl": {
"type": "string",
"example": "https://d111111abcdef8.cloudfront.net/videos/abc123/index.m3u8"
},
"title": {
"type": "string",
"example": "The Evening Bulletin"
}
}
}
}
}`
+89
View File
@@ -8,6 +8,47 @@
},
"basePath": "/",
"paths": {
"/api/videos/{id}": {
"get": {
"description": "Returns the catalogue's copy of a video: what a reader needs to show and play it. A video appears here only after the CMS has announced it as ready, so a video that is still transcoding — or one the CMS never made ready — is a 404.",
"produces": [
"application/json"
],
"tags": [
"videos"
],
"summary": "Get a catalogued video",
"parameters": [
{
"type": "string",
"description": "Video id, as issued by the CMS",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/api.Video"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/api.ProblemDetails"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.ProblemDetails"
}
}
}
}
},
"/health": {
"get": {
"description": "Reports that the service is up and serving. Used as the ALB target group health check; it does not verify the database connection.",
@@ -38,6 +79,54 @@
"example": "ok"
}
}
},
"api.ProblemDetails": {
"type": "object",
"properties": {
"detail": {
"type": "string",
"example": "The catalogue could not be read from the database. This is a server-side fault and the request was not processed; retrying in a few moments may succeed."
},
"status": {
"type": "integer",
"example": 500
},
"title": {
"type": "string",
"example": "Something Went Wrong Loading The Catalogue"
},
"type": {
"type": "string",
"example": "about:blank"
}
}
},
"api.Video": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"documentary",
"news"
]
},
"id": {
"type": "string",
"example": "0f8fad5b-d9cb-469f-a165-70867728950e"
},
"playbackUrl": {
"type": "string",
"example": "https://d111111abcdef8.cloudfront.net/videos/abc123/index.m3u8"
},
"title": {
"type": "string",
"example": "The Evening Bulletin"
}
}
}
}
}
+65
View File
@@ -6,6 +6,41 @@ definitions:
example: ok
type: string
type: object
api.ProblemDetails:
properties:
detail:
example: The catalogue could not be read from the database. This is a server-side
fault and the request was not processed; retrying in a few moments may succeed.
type: string
status:
example: 500
type: integer
title:
example: Something Went Wrong Loading The Catalogue
type: string
type:
example: about:blank
type: string
type: object
api.Video:
properties:
categories:
example:
- documentary
- news
items:
type: string
type: array
id:
example: 0f8fad5b-d9cb-469f-a165-70867728950e
type: string
playbackUrl:
example: https://d111111abcdef8.cloudfront.net/videos/abc123/index.m3u8
type: string
title:
example: The Evening Bulletin
type: string
type: object
info:
contact: {}
description: JSON API for browsing the Thamanyah catalogue. Read-side counterpart
@@ -13,6 +48,36 @@ info:
title: Thamanyah Discovery API
version: "1.0"
paths:
/api/videos/{id}:
get:
description: 'Returns the catalogue''s copy of a video: what a reader needs
to show and play it. A video appears here only after the CMS has announced
it as ready, so a video that is still transcoding — or one the CMS never made
ready — is a 404.'
parameters:
- description: Video id, as issued by the CMS
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.Video'
"404":
description: Not Found
schema:
$ref: '#/definitions/api.ProblemDetails'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ProblemDetails'
summary: Get a catalogued video
tags:
- videos
/health:
get:
description: Reports that the service is up and serving. Used as the ALB target