Study Asking

Study Asking · GPT-Aktionen

Study Scoring Actions

Study Asking Actions API for GPT app

  • POST /submitScoreSubmit topic score and get collective topic data
  • GET /hotTopicsGet the current popular/hot topics
Ursprüngliches API-Schema
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Study Scoring Actions",
    "description": "Study Asking Actions API for GPT app"
  },
  "servers": [
    {
      "url": "https://actions.studyasking.com"
    }
  ],
  "paths": {
    "/submitScore": {
      "post": {
        "summary": "Submit topic score and get collective topic data",
        "operationId": "submitScore",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topic": {
                    "type": "string"
                  },
                  "score": {
                    "type": "number",
                    "format": "float",
                    "minimum": 1,
                    "maximum": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Collective topic data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "numberOfUsers": {
                      "type": "integer"
                    },
                    "averageScore": {
                      "type": "number",
                      "format": "float"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/hotTopics": {
      "get": {
        "summary": "Get the current popular/hot topics",
        "operationId": "getHotTopics",
        "responses": {
          "200": {
            "description": "List of hot topics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "topic": {
                        "type": "string"
                      },
                      "averageScore": {
                        "type": "number",
                        "format": "float"
                      },
                      "numberOfUsers": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}