From 91dc7cd07eeb0faa560fff664561b379291741bc Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 26 Jun 2024 13:10:57 +1200 Subject: [PATCH] esvapi: style fixes --- esvapi.d | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/esvapi.d b/esvapi.d index 0356120..bceb9e1 100644 --- a/esvapi.d +++ b/esvapi.d @@ -41,11 +41,8 @@ enum ESVIndent TAB } -/++ Default URL to use when sending API requests. +/ -enum ESVAPI_URL = "https://api.esv.org/v3/passage"; - /++ Constant array of all books in the Bible. +/ -immutable string[] BIBLE_BOOKS = [ +immutable string[] bibleBooks = [ /* Old Testament */ "Genesis", "Exodus", @@ -66,7 +63,6 @@ immutable string[] BIBLE_BOOKS = [ "Esther", "Job", "Psalm", - "Psalms", /* both are valid */ "Proverbs", "Ecclesiastes", "Song of Solomon", @@ -147,7 +143,7 @@ immutable string[] ESVAPI_PARAMETERS = [ bool bookValid(in char[] book) nothrow { - foreach (string b; BIBLE_BOOKS) { + foreach (string b; bibleBooks) { if (book.capitalize() == b.capitalize()) return true; } @@ -202,7 +198,7 @@ class ESVApi { _key = key; _tmp = tempDir() ~ tmpName; - _url = ESVAPI_URL; + _url = "https://api.esv.org/v3/passage"; opts = ESVApiOptions(true); extraParameters = ""; onProgress = delegate int (size_t dlTotal, size_t dlNow,