Skip to content

Commit

Permalink
woopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
IcySnex committed Jul 21, 2024
1 parent 5df9e8c commit 7b50b53
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GeniusAPI/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GeniusAPI
This Genius API wrapper allows you to easily search for tracks/genres on Genius. It also provides lyrics fetching using web scraping.
This Genius API wrapper allows you to easily search for tracks on Genius. It also provides lyrics/genres fetching using web scraping.

---

Expand Down
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GeniusAPI
This Genius API wrapper allows you to easily search for tracks on Genius. It also provides lyrics fetching using web scraping.
This Genius API wrapper allows you to easily search for tracks on Genius. It also provides lyrics/genres fetching using web scraping.

---

Expand All @@ -9,19 +9,41 @@ Search for tracks on Genius:
using GeniusAPI;
using GeniusAPI.Models;

LyricsClient client = new("<GENIUS ACCESS TOKEN>");
IEnumerable<LyricsTrack> tracks = await client.SearchTracksAsync("<SEARCH QUERRY>");
GeniusClient client = new("<GENIUS ACCESS TOKEN>");
IEnumerable<GeniusTrack> tracks = await client.SearchTracksAsync("<SEARCH QUERRY>");
```

Fetch lyrics of a track:
```cs
using GeniusAPI;
using GeniusAPI.Models;

LyricsClient client = new("<YOUR GENIUS ACCESS TOKEN>");
GeniusClient client = new("<YOUR GENIUS ACCESS TOKEN>");
string lyrics = await client.FetchLyricsAsync("<GENIUS TRACK URL>");
```

Fetch genres of a track:
```cs
using GeniusAPI;
using GeniusAPI.Models;

GeniusClient client = new("<YOUR GENIUS ACCESS TOKEN>");
IEnumerable<string> genres = await client.FetchGenresAsync("<GENIUS TRACK URL>");
```

Get track info (search for track & additionally fetch the lyrics/genres):
```cs
using GeniusAPI;
using GeniusAPI.Models;

GeniusClient client = new("<YOUR GENIUS ACCESS TOKEN>");
GeniusTrackInfo trackInfo = await client.GetTrackInfoAsync("<TRACK TITLE>", "<TRACK ARTIST>");

GeniusTrack track = trackInfo.Track;
string lyrics = trackInfo.Lyrics;
IEnumerable<string> genres = trackInfo.Genres;
```

---

## How to get an acces token?
Expand Down

0 comments on commit 7b50b53

Please sign in to comment.