Skip to content

Commit

Permalink
Remove unused API key config
Browse files Browse the repository at this point in the history
  • Loading branch information
rce committed Jan 1, 2025
1 parent 1aa1b5a commit 9162080
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/kansallisgalleria.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@

log = logger.get("KANSALLISGALLERIA")

def is_enabled():
return "KANSALLISGALLERIA_API_KEY" in os.environ

def register():
if not is_enabled():
return {}

return {
"art": cmd_art,
}
Expand Down Expand Up @@ -81,10 +76,9 @@ async def cmd_art(client, message, _):

@asynccontextmanager
async def call_api_raw_stream(endpoint, params = {}):
headers = {"x-api-key": os.environ["KANSALLISGALLERIA_API_KEY"]}
url = "https://www.kansallisgalleria.fi/api%s%s" % (endpoint, http_util.make_query_string(params))
async with aiohttp.ClientSession() as session:
r = await session.get(url, headers=headers)
r = await session.get(url)
log.debug({
"requestMethod": r.method,
"requestUrl": str(r.url),
Expand Down

0 comments on commit 9162080

Please sign in to comment.