documentation icon indicating copy to clipboard operation
documentation copied to clipboard

video.captions camelCase vs snake_case

Open iBicha opened this issue 2 years ago • 1 comments

I believe /API/V1/VIDEOS/:ID currently returns

  "captions": [
    {
      "label": String,
      "language_code": String,
      "url": String
    }
  ],

and not

  "captions": [
    {
      "label": String,
      "languageCode": String,
      "url": String
    }
  ],

Like the docs mention. There's a reference to both language_code and languageCode in the code which is a bit confusing.

iBicha avatar Jan 30 '23 00:01 iBicha

Ah, thanks for pointing this out. It should have been LanguageCode, but it was changed here and was missed during the reviews: https://github.com/iv-org/invidious/commit/35d15c7c2b5d71582f7ce4b7875a777ccb0ebcd8#diff-f8ae2508caf8eb3d260e47273d8b0d3d5b6b860c096d4b9fc9b2db12a323834aR429

I'll have to check with developers currently using the API if we change the code back, or if we keep the code as is and update the docs.

SamantazFox avatar Feb 05 '23 12:02 SamantazFox