Skip to content
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

Open
5 tasks
enddynayn opened this issue Mar 27, 2024 · 0 comments

Comments

@enddynayn
Copy link

enddynayn commented Mar 27, 2024

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"
        ]
      }
    }
  }
}
@enddynayn enddynayn changed the title Gateway-Backend: Connect Content Publishing Service For Broadcasting Messages Gateway-Backend: Integration of Content Publishing Service for Broadcasting Messages Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant