From 6e94967396373626e5f6ee228fbba5fcb111f3cb Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 10 Apr 2023 14:08:03 +0200 Subject: Use a dummy token for the client --- README.md | 8 ++++++++ Sources/lyricli/lyrics_engine.swift | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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" -- cgit