Blogs.as Assistant

Blogs.as Assistant · Acciones GPT

Blogs.as API

  • GET /blogsGet the list of blogs for the current user
  • GET /{blogName}Get the details of a specific blog
  • PATCH /{blogName}Create or update the details of a specific blog
  • GET /{blogName}/titlesGet the titles of Blog Posts on specific blog
  • PATCH /{blogName}/titlesCreate or update the list of Blog Post titles on a Blog
  • PATCH /{blogName}/{postSlug}Write or edit a blog post
  • GET /{blogName}/{postSlug}Get a specific blog post
Esquema original API
{
  "openapi": "3.1.0",
  "info": {
    "version": "1.0.0",
    "title": "Blogs.as API"
  },
  "servers": [
    {
      "url": "https://blogs.as/ai"
    }
  ],
  "paths": {
    "/blogs": {
      "get": {
        "summary": "Get the list of blogs for the current user",
        "operationId": "getBlogs"
      }
    },
    "/{blogName}": {
      "get": {
        "summary": "Get the details of a specific blog",
        "operationId": "getBlog",
        "parameters": [
          {
            "name": "blogName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "Create or update the details of a specific blog",
        "operationId": "createOrUpdateBlog",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "blogName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Blog"
              }
            }
          }
        }
      }
    },
    "/{blogName}/titles": {
      "get": {
        "summary": "Get the titles of Blog Posts on specific blog",
        "operationId": "getBlogPostTitles",
        "parameters": [
          {
            "name": "blogName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "needToWrite",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ]
      },
      "patch": {
        "summary": "Create or update the list of Blog Post titles on a Blog",
        "operationId": "writeBlogPostTitles",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "blogName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlogPostTitles"
              }
            }
          }
        }
      }
    },
    "/{blogName}/{postSlug}": {
      "patch": {
        "summary": "Write or edit a blog post",
        "operationId": "writeBlogPost",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "blogName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlogPost"
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get a specific blog post",
        "operationId": "getBlogPost",
        "parameters": [
          {
            "name": "blogName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Blog": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the blog"
          },
          "domain": {
            "type": "string",
            "description": "The custom domain name of the blog (only works for users with an active subscription to blogs.as)"
          },
          "description": {
            "type": "string",
            "description": "The publicly visible description of the blog"
          },
          "audience": {
            "type": "string",
            "description": "The target audience profile of the blog"
          },
          "tone": {
            "type": "string",
            "description": "The voice and tone of the blog"
          }
        },
        "required": [
          "name",
          "description",
          "context",
          "audience",
          "tone"
        ]
      },
      "BlogPostTitles": {
        "type": "object",
        "properties": {
          "titles": {
            "type": "array",
            "description": "The titles of the Posts on the Blog",
            "minItems": 5,
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "titles"
        ]
      },
      "BlogPost": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "The markdown of the 1500 word blog post starting with `# <title>`"
          }
        },
        "required": [
          "content"
        ]
      }
    }
  }
}