China Briefing

China Briefing · Ações GPT

Awesome GPTs API

  • POST /api/fb/nmJFCOIF4wfU2Send feedback

    Endpoint to send feedback about the GPT service.

Esquema API original
{
  "openapi": "3.0.0",
  "info": {
    "title": "Awesome GPTs API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://awesomegpts.co"
    }
  ],
  "paths": {
    "/api/fb/nmJFCOIF4wfU2": {
      "post": {
        "summary": "Send feedback",
        "operationId": "awesome",
        "description": "Endpoint to send feedback about the GPT service.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "The type of feedback.",
                    "example": "positive, negative, failed, good job, well done, awesome, not so good"
                  },
                  "msg": {
                    "type": "string",
                    "description": "The feedback message, help the developer to find the issue."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "Indicates if the request was successful.",
                      "example": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

ChinaBriefing Search And Today API

  • GET /api/gpt/searchSearch the relevant news by your query news
  • GET /api/gpt/todayGet Today Key News
Esquema API original
{
  "openapi": "3.0.0",
  "info": {
    "title": "ChinaBriefing Search And Today API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://chinabriefing.co"
    }
  ],
  "paths": {
    "/api/gpt/search": {
      "get": {
        "summary": "Search the relevant news by your query news",
        "operationId": "search",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search query string, e.g. news title, keywords etc"
          },
          {
            "in": "query",
            "name": "years",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated years to filter the news by year"
          }
        ],
        "responses": {
          "200": {
            "description": "Search results returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchResult"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/today": {
      "get": {
        "summary": "Get Today Key News",
        "operationId": "today",
        "parameters": [
          {
            "in": "query",
            "name": "lang",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "test if language is Chinese, use zh, else ALWAYS use en."
          }
        ],
        "responses": {
          "200": {
            "description": "Today news returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "news": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchResult"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchResult": {
        "type": "object",
        "required": [
          "nid",
          "date",
          "title",
          "content",
          "sourceURL"
        ],
        "properties": {
          "nid": {
            "type": "string",
            "description": "Goblal Unique News ID"
          },
          "title": {
            "type": "string",
            "description": "News title"
          },
          "content": {
            "type": "string",
            "description": "News detail content"
          },
          "sourceURL": {
            "type": "string",
            "format": "uri",
            "description": "The source URL of the news, use can click to learn more"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "News report date"
          }
        }
      }
    }
  }
}

ChinaBriefing Search And Today API

  • GET /api/gpt/searchSearch the relevant news by your query news
  • GET /api/gpt/todayGet Today Key News
Esquema API original
{
  "openapi": "3.0.0",
  "info": {
    "title": "ChinaBriefing Search And Today API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://chinabriefing.co"
    }
  ],
  "paths": {
    "/api/gpt/search": {
      "get": {
        "summary": "Search the relevant news by your query news",
        "operationId": "search",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search query string, e.g. news title, keywords etc"
          },
          {
            "in": "query",
            "name": "years",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated years to filter the news by year"
          }
        ],
        "responses": {
          "200": {
            "description": "Search results returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "result": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchResult"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt/today": {
      "get": {
        "summary": "Get Today Key News",
        "operationId": "today",
        "parameters": [
          {
            "in": "query",
            "name": "lang",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "test if language is Chinese, use zh, else ALWAYS use en."
          }
        ],
        "responses": {
          "200": {
            "description": "Today news returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "news": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchResult"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchResult": {
        "type": "object",
        "required": [
          "nid",
          "date",
          "title",
          "content",
          "sourceURL"
        ],
        "properties": {
          "nid": {
            "type": "string",
            "description": "Goblal Unique News ID"
          },
          "title": {
            "type": "string",
            "description": "News title"
          },
          "content": {
            "type": "string",
            "description": "News detail content"
          },
          "sourceURL": {
            "type": "string",
            "format": "uri",
            "description": "The source URL of the news, use can click to learn more"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "News report date"
          }
        }
      }
    }
  }
}