From: Ruben Beltran del Rio Date: Mon, 10 Apr 2023 12:08:03 +0000 (+0200) Subject: Use a dummy token for the client X-Git-Tag: 2.0.0~3 X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli/commitdiff_plain/6e94967396373626e5f6ee228fbba5fcb111f3cb Use a dummy token for the client --- diff --git a/README.md b/README.md index 6d6046a..b2c5430 100644 --- a/README.md +++ b/README.md @@ -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 = // URL of the API endpoint to use private let apiURL = "https://api.genius.com/search"