Chitter
Chitter · GPT Actions
Chitter Stories Plugin
A plugin that allows users to post and view stories using ChatGPT.
POST /createStoryPost a new storyGET /getStoriesRetrieve the latest three stories, optionally filtered by type
原始 API 定义
{
"openapi": "3.0.1",
"info": {
"title": "Chitter Stories Plugin",
"description": "A plugin that allows users to post and view stories using ChatGPT.",
"version": "v1"
},
"servers": [
{
"url": "https://chitter-vercel.vercel.app/api/"
}
],
"paths": {
"/createStory": {
"post": {
"operationId": "createStory",
"summary": "Post a new story",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StoryRequest"
}
}
}
},
"responses": {
"201": {
"description": "Story created successfully."
}
}
}
},
"/getStories": {
"get": {
"operationId": "getStories",
"summary": "Retrieve the latest three stories, optionally filtered by type",
"parameters": [
{
"in": "query",
"name": "type",
"required": false,
"schema": {
"type": "string",
"enum": [
"story",
"dream",
"secret",
"idea"
]
},
"description": "The type of stories to filter by (story, dream, secret, idea)"
}
],
"responses": {
"200": {
"description": "A list of the latest three stories, filtered by type if provided.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StoriesResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"StoriesResponse": {
"type": "object",
"properties": {
"stories": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Story"
},
"description": "An array of stories."
}
}
},
"StoryRequest": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the story."
},
"content": {
"type": "string",
"description": "The story content."
},
"authorId": {
"type": "string",
"description": "The author's ID (optional, can be null for anonymous stories)."
},
"isPublic": {
"type": "boolean",
"description": "Whether the story is public or private."
},
"type": {
"type": "string",
"enum": [
"story",
"dream",
"secret",
"idea"
],
"description": "The type of the content (story, dream, secret, idea)."
}
}
},
"Story": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the story."
},
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"authorId": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"isPublic": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"story",
"dream",
"secret",
"idea"
],
"description": "The type of the content (story, dream, secret, idea)."
}
}
}
}
}
}