diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-10 14:08:03 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-10 14:08:03 +0200 |
| commit | 6e94967396373626e5f6ee228fbba5fcb111f3cb (patch) | |
| tree | a5d6a52e307defc2dd38d52c844090fa5748db37 | |
| parent | c53df649c817f770ae1750bb6d11113e0bcd2b18 (diff) | |
Use a dummy token for the client
| -rw-r--r-- | README.md | 8 | ||||
| -rw-r--r-- | Sources/lyricli/lyrics_engine.swift | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -49,6 +49,14 @@ to the debug configuration. make ``` +### Configuration + +To avoid storing the API key in source control, clientToken in the +lyrics_engine is using a placeholder value. You'll need to replace this +before building + +* `GENIUS_CLIENT_TOKEN`: The Client token for your genius API client + ## Installing from source Builds lyricli in release configuration and copies the executable as diff --git a/Sources/lyricli/lyrics_engine.swift b/Sources/lyricli/lyrics_engine.swift index 9ca0cad..f0a02db 100644 --- a/Sources/lyricli/lyrics_engine.swift +++ b/Sources/lyricli/lyrics_engine.swift @@ -3,7 +3,7 @@ import Foundation // Given a track, attempts to fetch the lyrics from lyricswiki class LyricsEngine { - private let clientToken = "_-P6qiz2dPDMaRUih-VxSS--PBYA4OtWrHiTgVY7Qd3lMss_oewL04FX8lmh37ma" + private let clientToken = <GENIUS_CLIENT_TOKEN> // URL of the API endpoint to use private let apiURL = "https://api.genius.com/search" |