README
#YoutubeMusic
This guide explains how to use the YoutubeMusic
class provided by the YoutubeMusic.js library to interact with the YouTube Music API.
#Importing the Class
#Creating an Instance
Create an instance of the YoutubeMusic
class to use its methods:
#Usage
#Searching for a Song
You can search for a song using the search
method. It takes two parameters: the search query and the type of search (e.g., playlists, tracks). Here's an example of how to search for the song "True Faith":
In this example, Search.Playlists
specifies that you want to search in playlists. You can change it to Search.Tracks
or other search types based on your requirement.
#Getting Information about a Song
To retrieve information about a specific song, use the get
method. Provide the video ID of the song and specify the type of information you want (e.g., track details). Here's an example:
In this example, "qCNbdYd9K30"
is the video ID of the song. Change Get.Track
to other options like Get.Playlist
if you want information about a playlist.