Commit graph

9 commits

Author SHA1 Message Date
bopol 50267a6dd6 Use youtubei API for trending 2021-06-24 00:54:06 +02:00
Samantaz Fox a2f5342a83 Multiple search fixes
* Remove percent-encoding of the search query when calling youtube API, as it
  breaks UTF-8
* Empty search redirects to /search, not /
* Show the fullscreen search "home page" (from #1977) at /search
* Allow 'region=' parameter to be passed to /search
* Other minor fixes
2021-06-13 21:52:36 +02:00
Samantaz Fox b7fe212a18
Fix youtube API function's documentation 2021-05-24 15:25:00 +02:00
Samantaz Fox cbabf0ae7e
Craft the "context" data in a dedicated function
As the amount of API endpoint function grow, this will
prevent ugly code copy/pasta
2021-05-24 13:44:49 +02:00
Samantaz Fox 344ccf3b03
Use '/youtubei/v1/browse' endpoint for playlists 2021-05-24 13:19:28 +02:00
Samantaz Fox 26a7e1b049
Use '/youtubei/v1/search' endpoint for search queries 2021-05-24 13:19:28 +02:00
Samantaz Fox 43bd331e48
Multiple youtube_api.cr helper fixes
Add documentation
Bump web client version string
Add charset=UTF-8 to the 'content-type' header
Parse JSON and return it as a Hash
Handle API error messages
2021-05-24 13:19:28 +02:00
Samantaz Fox aaefa38602 Make the linter happy 2021-03-21 16:05:50 +01:00
Samantaz Fox f99d62a2bc Create youtube API wrapper fo /youtubei/v1/browse 2021-03-21 15:44:18 +01:00