summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2021-05-24 15:20:26 +0200
committerSamantaz Fox <coding@samantaz.fr>2021-05-24 15:25:00 +0200
commitb7fe212a184b5af1ccb9315e106c0ecb2f150590 (patch)
tree456f6649394b7178a7d249dde92599bc0f9d111a /src
parentcbabf0ae7e5d3e3ebe73f46832bd751648263467 (diff)
downloadinvidious-b7fe212a184b5af1ccb9315e106c0ecb2f150590.tar.gz
invidious-b7fe212a184b5af1ccb9315e106c0ecb2f150590.tar.bz2
invidious-b7fe212a184b5af1ccb9315e106c0ecb2f150590.zip
Fix youtube API function's documentation
Diffstat (limited to 'src')
-rw-r--r--src/invidious/helpers/youtube_api.cr13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/invidious/helpers/youtube_api.cr b/src/invidious/helpers/youtube_api.cr
index bd120a4c..544e635b 100644
--- a/src/invidious/helpers/youtube_api.cr
+++ b/src/invidious/helpers/youtube_api.cr
@@ -19,7 +19,7 @@ def make_youtube_api_context(region : String | Nil) : Hash
"gl" => region || "US", # Can't be empty!
"clientName" => "WEB",
"clientVersion" => HARDCODED_CLIENT_VERS,
- }
+ },
}
end
@@ -27,8 +27,9 @@ end
# request_youtube_api_browse(continuation)
# request_youtube_api_browse(browse_id, params)
#
-# Requests the youtubei/vi/browse endpoint with the required headers
-# to get JSON in en-US (english US).
+# Requests the youtubei/v1/browse endpoint with the required headers
+# and POST data in order to get a JSON reply in english US that can
+# be easily parsed.
#
# The requested data can either be:
#
@@ -67,8 +68,10 @@ end
####################################################################
# request_youtube_api_search(search_query, params, region)
#
-# Requests the youtubei/vi/search endpoint with the required headers
-# to get JSON in en-US (english US).
+# Requests the youtubei/v1/search endpoint with the required headers
+# and POST data in order to get a JSON reply. As the search results
+# vary depending on the region, a region code can be specified in
+# order to get non-US results.
#
# The requested data is a search string, with some additional
# paramters, formatted as a base64 string.