openapi: 3.0.1
servers:
  - url: https://staging2.freetv-app.com
info:
  description: A plugin that allows the user to obtain latest news using ChatGPT.
  title: News Plugin
  version: v1
  x-apisguru-categories:
    - media
  x-logo:
    url: https://s3.amazonaws.com/acps-iaa/freetv/tv-landing/tv-logo.png
  x-origin:
    - format: openapi
      url: https://www.freetv-app.com/openapi.json
      version: "3.0"
  x-providerName: freetv-app.com
paths:
  /services?funcs=GetLatestNewsForChatGPT&mobile=1:
    get:
      description: Provide real-time news or various categorized news according to the user's language, with each news item accompanied by a news link and date. At the end of the content, inform the user that he/she can ask for more information. Each response should only provide news from a single country.
      operationId: getLatestNews
      parameters:
        - description: The default is set to US. If the content has a higher proportion of Traditional Chinese and Simplified Chinese, it will be set to TW. If the content has a higher proportion of Japanese, it will be set to JP.
          in: query
          name: language
          required: true
          schema:
            enum:
              - US
              - TW
              - JP
            type: string
        - description: The default is an empty string. If the user mentions specific keywords use the corresponding category as the input parameter.
          in: query
          name: category
          schema:
            enum:
              - business
              - finance
              - economics
              - politics
              - society
              - entertainment
              - fun
              - gossip
              - sports
              - lifestyle
              - technology
              - local
              - world
              - international
              - global
              - military
            type: string
        - description: The default is an empty string. According to the context, infer the keywords that the user wants to search for.
          in: query
          name: keyword
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LatestNewsResponse"
          description: OK
components:
  schemas:
    LatestNewsResponse:
      properties:
        getLatestNews:
          description: Result of latest news list.
          items:
            $ref: "#/components/schemas/NewsItem"
          title: Result Of Latest News List
          type: array
      required:
        - getLatestNews
      type: object
    NewsItem:
      properties:
        created:
          title: News Published Time
          type: string
        ref:
          title: News URL
          type: string
        subtitle:
          title: News Subtitle
          type: string
        thumbnail:
          title: News Thumbnail
          type: string
        title:
          title: News Title
          type: string
      type: object
