iv-org / documentation

The official Invidious documentation
https://docs.invidious.io
Creative Commons Zero v1.0 Universal
567 stars 154 forks source link

`GET /API/V1/SEARCH` Schema has a missing field of `viewCountText` in the "video" object in the API documentation #569

Open Ochirsaikhan opened 2 months ago

Ochirsaikhan commented 2 months ago

In the API documentation, the viewCountText field is missing from the GET /API/V1/SEARCH Schema.

We can see that the search API returns the viewCountText field for the video object.

Example:

{
    "type": "video",
    "title": "Tory Lanez - The Color Violet (Official Music Video)",
    "videoId": "GfAPEko4rbU",
    "author": "Tory Lanez",
    "authorId": "UCbfUA3UGxAWL3muD004g0WQ",
    "authorUrl": "/channel/UCbfUA3UGxAWL3muD004g0WQ",
    "authorVerified": true,
    "videoThumbnails": [],
    "description": "",
    "descriptionHtml": "",
    "viewCount": 8403310,
    "viewCountText": "8.4M views",  --> We can see the `viewCountText` field as returned from the API response
    "published": 1700299733,
    "publishedText": "7 months ago",
    "lengthSeconds": 253,
    "liveNow": false,
    "premium": false,
    "isUpcoming": false
  }

Documentation:

{
    type: "video",
    title: String,
    videoId: String,
    author: String,
    authorId: String,
    authorUrl: String,
    videoThumbnails: [
      {
        quality: String,
        url: String,
        width: Int32,
        height: Int32
      }
    ],
    description: String,
    descriptionHtml: String,
    viewCount: Int64,
    // viewCountText: String is missing from the documentation
    published: Int64,
    publishedText: String,
    lengthSeconds: Int32,
    liveNow: Bool,
    paid: Bool,
    premium: Bool
  }
bugmaschine commented 2 months ago

Feel free to create a pull request

unixfox commented 2 months ago

https://github.com/iv-org/documentation/tree/master/docs%2Fapi