Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom API #55

Open
TemaisgameNoobas opened this issue Feb 26, 2024 · 5 comments
Open

Custom API #55

TemaisgameNoobas opened this issue Feb 26, 2024 · 5 comments

Comments

@TemaisgameNoobas
Copy link

Is there going to be an feature, where you can switch the website?? Like where you can switch to YouTube, and other websites that adapted yt2009 custom API. Like if I make my own clone, I will add the API that will work with yt2009.

@ftde0
Copy link
Owner

ftde0 commented Feb 26, 2024

i don't quite understand what you're talking about, do you mean an API for pulling stuff from yt2009? if so, while there isn't an official custom-format API for pulling data through yt2009, numerous official APIs were reimplemented over development to work with various parts of the website and apps.

1. gdata api

the gdata api is made to work with APKs but can be used if it fits your needs.
responses are sent in XML. all requests are GET.

/feeds/api/videos?q=QUERY - search videos
/feeds/api/videos/VIDEO_ID - get basic data about a video
/feeds/api/videos/VIDEO_ID/related - exp_related for a video
/feeds/api/videos/VIDEO_ID/comments - get comments for a video
/feeds/api/users/USER_HANDLE - gets basic data for user by the youtube handle ("@")
/feeds/api/users/USER_HANDLE/uploads - gets videos made by the user
/feeds/api/users/USER_HANDLE/playlists - gets playlists made by the user
/feeds/api/users/USER_HANDLE/favorites - gets favorited videos by the user

2. blazer api

blazer api is made to work with /mobile/blzr, but you may consider it as it returns JSON data.
all requests are GET.

/mobile/blzr/watch?v=VIDEO_ID - gets basic data about a video
/mobile/blzr/view_comments?v=VIDEO_ID - gets the video's comments
/mobile/blzr/results?q=QUERY - search videos
/mobile/blzr/profile?user=USER_HANDLE - gets basic data for user by the youtube handle ("@")
/mobile/blzr/profile?user=USER_HANDLE&view=videos - gets the user's videos

3. console api

console api is used in XL and leanback. returns JSON data. all requests are GET.

/xl/console_browse - gets featured videos
/xl/console_results?vq=QUERY - search videos
/xl/console_related?video_id=VIDEO_ID - gets related vids for VIDEO_ID
/xl/console_profile?user=USER_HANDLE - gets user's basic data by USER_HANDLE
/xl/console_profile_videos?user=USER_HANDLE - gets user's videos

4. flash player

flash players typically request 2 endpoints, both of which are available within yt2009.

/get_video_info?video_id=VIDEO_ID - smallest video info, url-encoded
/get_video?video_id=VIDEO_ID/mp4 - pulls an mp4 of the video requested

@TemaisgameNoobas
Copy link
Author

TemaisgameNoobas commented Feb 27, 2024

@ftde0 oh I mean't like an API FOR yt2009 that would be adapted by the website owners. an yt2009 instance will make requests there and the website's API will return the data.

@ftde0
Copy link
Owner

ftde0 commented Mar 8, 2024

hi! sorry for the late response, as of now that doesn't feel like something immediately needed but more ways to manage yt2009 could help instance owners, something like this - while time consuming and would probably hook into a lot of the existing code - could be a feature and will probably be a thing in the future.

keeping open.

@TemaisgameNoobas
Copy link
Author

ah okay, I was just wondering if I can start my own project with this functionality.

@FurblandChannel
Copy link

ah okay, I was just wondering if I can start my own project with this functionality.

You could always fork and create a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants