more specific api key names

This commit is contained in:
wreck 2020-12-22 13:15:54 -08:00
parent 68674fc538
commit fc3c58cc88
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# api key to use for https://rapidapi.com/apidojo/api/yahoo-finance1
apiKey: mYsUp3rs3CretKEY12345
rapidapiKey: mYsUp3rs3CretKEY12345
coinmarketkapKey: mYsUp3rs3CretKEY12345
stocktrigger: stonks
cryptotrigger: hodl

View File

@ -11,7 +11,7 @@ import json
class Config(BaseProxyConfig):
def do_update(self, helper: ConfigUpdateHelper) -> None:
helper.copy("apiKey")
helper.copy("rapidapiKey")
helper.copy("stocktrigger")
helper.copy("cryptotrigger")
@ -33,7 +33,7 @@ class TickerBot(Plugin):
tickerUpper = ticker.upper()
url = f"https://apidojo-yahoo-finance-v1.p.rapidapi.com/market/v2/get-quotes?symbols={tickerUpper}"
headers = {
'x-rapidapi-key': self.config["apiKey"],
'x-rapidapi-key': self.config["rapidapiKey"],
'x-rapidapi-host': "apidojo-yahoo-finance-v1.p.rapidapi.com"
}