Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Gateway-Backend: Integration of Content Publishing Service for Broadcasting Messages #7

@enddynayn

Description

@enddynayn

Description
Integrate a new broadcast endpoint through the content publishing service for message submission to Frequency. This approach simplifies the process for developers by abstracting the complex details involved in directly interacting with the Frequency Chain.

Note this is blocked by #23

Acceptance Criteria

  • Add a new POST v2/content endpoint to allow the client to submit a broadcast message.
  • Ensure the new endpoint correctly responds with HTTP status 202 to indicate successful request and proccesing.
  • Ensure that messages submitted through the new endpoint are correctly relayed to Frequency via the Content Publishing Service.
  • Update the Docker-compose file to include the Content Publishing Service.
  • Update OpenAPI types

Architecture
Image

Open API

{
  "paths": {
    "/v2/content": {
      "post": {
        "operationId": "createBroadcastV2",
        "summary": "Create a new post",
        "security": [
          {
            "tokenAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePostRequestV2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BroadcastExtended"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          }
        }
      }
    }
  }
}
{
  "components": {
    "schemas": {
      "CreatePostRequestV2": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "inReplyTo": {
            "type": "string"
          },
          "assets": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "content"
        ]
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions