From 36a2f2c0802040cde199fe75464bee327ac3b364 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Wed, 15 Feb 2023 17:08:29 -0500 Subject: [PATCH] Walmart Notes, offloading keys to ignore file --- CustomerNotes/Walmart_Luminate.md | 9 ++++++++ Scripts/API_Tests/Apikeys.py | 5 +++++ .../__pycache__/Apikeys.cpython-311.pyc | Bin 0 -> 402 bytes Scripts/API_Tests/add_learnerprop.py | 3 ++- Scripts/API_Tests/api_test.py | 21 +++++++----------- Scripts/AddGroupsUsers/addgroup_users.py | 1 + Scripts/credlib.py | 6 +++++ Scripts/getrequests.py | 3 +++ 8 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 Scripts/API_Tests/Apikeys.py create mode 100644 Scripts/API_Tests/__pycache__/Apikeys.cpython-311.pyc create mode 100644 Scripts/credlib.py create mode 100644 Scripts/getrequests.py diff --git a/CustomerNotes/Walmart_Luminate.md b/CustomerNotes/Walmart_Luminate.md index 33569a08..d7ea9788 100644 --- a/CustomerNotes/Walmart_Luminate.md +++ b/CustomerNotes/Walmart_Luminate.md @@ -113,3 +113,12 @@ Johnny: Can we integrate into CMS platforms like Adobe? Can we integrate an API No. Eric: This portion of the roadmap is a proof of concept for us, we cannot productize this just yet. So continue to have the content discussions and then engineering will likely happen 1-2 weeks after that. They need to ensure that it is integrated and functional first before rolling out anywhere. + +## 02/15/2023 + +### Content Meeting with Stephanie + +Questions from Stephanie: + +* Luminate's biggest concern is upkeep. Version Control. They make a ton of changes to the products. They need to update + the content quickly and effectively. Example: Screenshot in one lesson but what if it is in different lessons etc. diff --git a/Scripts/API_Tests/Apikeys.py b/Scripts/API_Tests/Apikeys.py new file mode 100644 index 00000000..eca4c6e6 --- /dev/null +++ b/Scripts/API_Tests/Apikeys.py @@ -0,0 +1,5 @@ +skuid = "18Zl2NAzWTE09FHbNEBngNOJO" +unknown = "SlpQlju219WnWogn94dQUT6Yt" +forcemanager = "3ia7mWFkdeALYQFYoB51yh6Ov" +talkspace_core = "2vfHw6ksqGfT1gUhPM8pXx2wW" +wildhealth = "HWxj6VTNPwbc3WghFTPzr7SjE" diff --git a/Scripts/API_Tests/__pycache__/Apikeys.cpython-311.pyc b/Scripts/API_Tests/__pycache__/Apikeys.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f8abb0b978095ec4e9da4bcbe19229a0c008467 GIT binary patch literal 402 zcmXw#!AiqG5QY=ms+3mo7>|lzMU1UlEr?h#wTh-KO^wY(Vs@LPNp|CI)3iP1Eqny= zS$u)8SI>gbTTdpS|G>=m!|=n*d$E}35=qjx@tMr8)clM8gZX9xZyew>4)7Wemb4|1 z(J~;bWkIgXm6n-MKGWQaT%W0mbXaRNUu5YDnR4r{#e}Zwcidr6Dc4k_ViVPlL8qrw z`y(bC+4`xcHXH!!_x()qEhco|aQVCTiG}Xzl z`l!h5@WnV%O{<}_XXLayl;l#5<){r=+p}+g-E={M&Lm-qN0k4BX$j9`-!QyZ=V%N zQ}S&GPU(R^U96sa7z8f7AnQqB`b4^ww4V&m^YQ9-l#BB_(Mr6&7Zu`-{b(&N?ne2v INHJOa1t^q!@c;k- literal 0 HcmV?d00001 diff --git a/Scripts/API_Tests/add_learnerprop.py b/Scripts/API_Tests/add_learnerprop.py index 8a48d173..4088e55c 100644 --- a/Scripts/API_Tests/add_learnerprop.py +++ b/Scripts/API_Tests/add_learnerprop.py @@ -1,8 +1,9 @@ import requests import pandas as pd +import Apikeys csv = "/Users/normrasmussen/Downloads/ts_id_roles.csv" -apiKey = "18Zl2NAzWTE09FHbNEBngNOJO" +apiKey = Apikeys.skuid baseUrlemail = "https://api.northpass.com/v2/people?filter[email][eq]=" diff --git a/Scripts/API_Tests/api_test.py b/Scripts/API_Tests/api_test.py index b159783b..48259470 100644 --- a/Scripts/API_Tests/api_test.py +++ b/Scripts/API_Tests/api_test.py @@ -1,22 +1,14 @@ import requests +import Apikeys -# apiKey = "SlpQlju219WnWogn94dQUT6Yt" - -# apiKey = "3ia7mWFkdeALYQFYoB51yh6Ov" -# ForceManager - -# apiKey = "2vfHw6ksqGfT1gUhPM8pXx2wW" -# Talkspace Core - -apiKey = "HWxj6VTNPwbc3WghFTPzr7SjE" -# Wild Health # url ="https://api.northpass.com/v2/groups/e6ef3e5f-b5a2-4b10-868b-8c165d76d263/learning_paths" -# "https://api.northpass.com/v1/media" +url = "https://api.northpass.com/v1/media" # function = sys.argv[1] +apiKey = Apikeys.talkspace_core # Get Group Memberships: -url = "https://api.northpass.com/v2/groups/504c4771-223a-447f-9ec6-08e51bc9ca23/memberships" +# url = "https://api.northpass.com/v2/groups/504c4771-223a-447f-9ec6-08e51bc9ca23/memberships" def putTest(apiKey, url): @@ -37,11 +29,14 @@ def putTest(apiKey, url): def getTest(apiKey, url): + print(url) + print(apiKey) headers = {"accept": "application/json", "X-Api-Key": apiKey} response = requests.get(url, headers=headers) # print(response.text) jsonResponse = response.json() - print(jsonResponse["included"][1]["attributes"]["email"]) + print(jsonResponse) + # print(jsonResponse["included"][1]["attributes"]["email"]) # print(jsonResponse["data"][1]["attributes"]) diff --git a/Scripts/AddGroupsUsers/addgroup_users.py b/Scripts/AddGroupsUsers/addgroup_users.py index 69cc5b3f..a923e133 100644 --- a/Scripts/AddGroupsUsers/addgroup_users.py +++ b/Scripts/AddGroupsUsers/addgroup_users.py @@ -1,6 +1,7 @@ import requests import sys import pandas as pd +import Apikeys # Enter your API Key between the quotation marks. apiKey = "" diff --git a/Scripts/credlib.py b/Scripts/credlib.py new file mode 100644 index 00000000..9a5af48b --- /dev/null +++ b/Scripts/credlib.py @@ -0,0 +1,6 @@ +class credential: + def __init__(self, hostname, username, password, apikey): + self.hostname = hostname + self.username = username + self.password = password + self.apikey = apikey diff --git a/Scripts/getrequests.py b/Scripts/getrequests.py new file mode 100644 index 00000000..6bbce3d2 --- /dev/null +++ b/Scripts/getrequests.py @@ -0,0 +1,3 @@ +import requests +import Apikeys +