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

Implement authenticated request + add getUserHistory #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rhld16
Copy link

@rhld16 rhld16 commented Dec 2, 2021

Here's a early implementation of authenticated requests for YouTube Music. This could eventually lead to this library being able add or remove songs from playlists but for now, the only authenticated method I added, for demonstration, is getUserHistory()

Here's an example of how authenticated requests would go:

const YoutubeMusicApi = require('../index.js')

const api = new YoutubeMusicApi()
api.initalize('INSERT_COOKIE_HERE')
.then(info => {
	api.getUserHistory().then(result => {
           console.log(result)
        })
})

@rhld16
Copy link
Author

rhld16 commented Dec 20, 2021

@emresenyuva any chance you could check out this PR?

@AlexInABox
Copy link

hey you actually forgot to put const crypto = require('crypto') in the index file.

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

Successfully merging this pull request may close these issues.

2 participants