From 2c8f3d34c823211c69dde3063232ea56eece5c34 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Wed, 17 Jan 2024 16:44:12 -0500 Subject: [PATCH] Updated training events script for SPS commerce. Added some templates for Harri to help Tracy. Small other items. --- .../_sub_navigation.html.liquid | 26 +++++++++++++++++- .../Harri - New User/homepage.html.liquid | 3 ++ .../RecastSoftware/RecastSoftware.md | 5 ++++ Scripts/API_Tests/Apikeys.py | 1 + .../__pycache__/Apikeys.cpython-310.pyc | Bin 1197 -> 1243 bytes Scripts/API_Tests/get_course_ids.py | 7 +++-- Scripts/API_Tests/training_events.py | 18 ++++++------ 7 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 Custom_Templates/customer_templates/Harri - New User/homepage.html.liquid diff --git a/Custom_Templates/customer_templates/Harri - New User/_sub_navigation.html.liquid b/Custom_Templates/customer_templates/Harri - New User/_sub_navigation.html.liquid index d814e519..32cb7f41 100644 --- a/Custom_Templates/customer_templates/Harri - New User/_sub_navigation.html.liquid +++ b/Custom_Templates/customer_templates/Harri - New User/_sub_navigation.html.liquid @@ -1,13 +1,37 @@ diff --git a/Custom_Templates/customer_templates/Harri - New User/homepage.html.liquid b/Custom_Templates/customer_templates/Harri - New User/homepage.html.liquid new file mode 100644 index 00000000..0828f21b --- /dev/null +++ b/Custom_Templates/customer_templates/Harri - New User/homepage.html.liquid @@ -0,0 +1,3 @@ + diff --git a/CustomerNotes/RecastSoftware/RecastSoftware.md b/CustomerNotes/RecastSoftware/RecastSoftware.md index e4a357a9..0e6e4919 100644 --- a/CustomerNotes/RecastSoftware/RecastSoftware.md +++ b/CustomerNotes/RecastSoftware/RecastSoftware.md @@ -93,3 +93,8 @@ Ideally, the cert will show that the learner is "Right Click Certified". Liquit is an end-to-end application management platform that Recast has recently acquired. Currently hosting training every last Thursday of the month, hosted by a real person + +## 1/17/2024 + +### Rens & Question Banks +TODO: Can custom CSS tab add JS to make image expandable? diff --git a/Scripts/API_Tests/Apikeys.py b/Scripts/API_Tests/Apikeys.py index 2f8cd66e..182e56d6 100644 --- a/Scripts/API_Tests/Apikeys.py +++ b/Scripts/API_Tests/Apikeys.py @@ -22,3 +22,4 @@ G2 = "JRDpCGQ7vSRiva6t5OkWDr5eJ" DOUGLASELLIMAN = "Bknf8kidbluRfcKu3m3lKoxS8" CIN7 = "51BNlRsLYKQxSu1q1UQq7F63j" FULLSTORY = "ePChrDWLegENa2qnfb259O2Ki" +RENAISSANCE = "YFykqX1u0d3HveONc5I9CKnJ1" diff --git a/Scripts/API_Tests/__pycache__/Apikeys.cpython-310.pyc b/Scripts/API_Tests/__pycache__/Apikeys.cpython-310.pyc index 54087a8cfc24b4f020c402b8a46aa74b12c4ae86..1afd54b3ac771a9bbd2fedb2b9996292ea45a7ae 100644 GIT binary patch delta 122 zcmZ3>d7G0rpO=@50SFSbR;2!#$Scd3F;P2}BT6DgBA7u_a^sXNCb=ldNVm%D!U)4s zgA`+rvQ&S+WK&N|XYV{OLqAQ)&5XTt9gM%IYoLwi& Yu*9+%0nKM&nB2&s#m2(O!pOl00OV61M*si- delta 78 zcmcc3xt5bRpO=@50SNLn=A>Sj$Scd3GEqB~C73}|V&jY~CT2fPiOmYk0*u_ZINd^h ge1b##gCZw;u*9+%0QImiOy0<%!N$VK!pOl00Q~6@YXATM diff --git a/Scripts/API_Tests/get_course_ids.py b/Scripts/API_Tests/get_course_ids.py index f5264797..e732e978 100644 --- a/Scripts/API_Tests/get_course_ids.py +++ b/Scripts/API_Tests/get_course_ids.py @@ -1,7 +1,7 @@ import Apikeys import requests -APIKEY = Apikeys.CIN7 +APIKEY = Apikeys.RENAISSANCE HEADERS = { "accept": "application/json", "X-Api-Key": APIKEY, @@ -51,7 +51,10 @@ def get_courses(): nextlink = response["links"] for item in response["data"]: - print(item["id"]) + cname = item['attributes']['name'] + if "[USCS CH MI]" in cname: + print(cname) + # print(item["id"]) # idict = {item["attributes"]["name"]: item["id"]} # id = item["id"] # name = item["attributes"]["name"] diff --git a/Scripts/API_Tests/training_events.py b/Scripts/API_Tests/training_events.py index 00003e70..ba1479f1 100644 --- a/Scripts/API_Tests/training_events.py +++ b/Scripts/API_Tests/training_events.py @@ -1,13 +1,15 @@ import requests import Apikeys +import pprint - -apikey = Apikeys.sps -url = "https://api.northpass.com/v2/events" -headers = { - "accept": "application/json", - "X-Api-Key": apikey - } +pp = pprint.PrettyPrinter(indent=4) +apikey = Apikeys.SPS +url = "https://api.northpass.com/v2/training_events" +headers = {"accept": "application/json", "X-Api-Key": apikey} response = requests.get(url, headers=headers) resp = response.json() -print(resp) + +for item in resp["data"]: + name = item["attributes"]["title"] + print(name) +# pp.pprint(resp)