separate key and url to config file

This commit is contained in:
StevanFreeborn committed 2022-04-16 23:16:53 -05:00
1 parent 700e523809
commit 81091b9f43
3 files changed
+25 -1

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
# Config
config.ini
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
-1
View File
@@ -856,4 +856,3 @@ class OnspringClient:
endpoint = GetReportsByAppIdEndpoint(self.baseUrl, appId)
return
+22
View File
@@ -0,0 +1,22 @@
from OnspringClient import OnspringClient
from configparser import ConfigParser
cfg = ConfigParser()
cfg.read('config.ini')
key = cfg['prod']['key']
url = cfg['prod']['url']
onspringClient = OnspringClient(url, key)
response =onspringClient.GetAppById(8)
print(response.statusCode)
print(response.isSuccessful)
print(response.message)
print(response.responseText)
print(response.headers)
print(response.data.app.href)
print(response.data.app.id)
print(response.data.app.name)