Re-edited HH templates to change the link back. Ran some scripts for cin7, courtney, and a few others. Downloaded GoGuardian templates to help Nergis.

This commit is contained in:
Norm Rasmussen
2024-01-08 16:41:01 -05:00
parent a5fe4bd2c8
commit bf9d065f3b
37 changed files with 1401 additions and 952 deletions

View File

@ -21,3 +21,4 @@ BIRCHSTREET = "WpMV3jF4q9Om5FjUsrzZifduE"
G2 = "JRDpCGQ7vSRiva6t5OkWDr5eJ"
DOUGLASELLIMAN = "Bknf8kidbluRfcKu3m3lKoxS8"
CIN7 = "51BNlRsLYKQxSu1q1UQq7F63j"
FULLSTORY = "ePChrDWLegENa2qnfb259O2Ki"

View File

@ -1,35 +1,35 @@
import Apikeys
import requests
APIKEY = Apikeys.ANTHOLOGY
APIKEY = Apikeys.CIN7
HEADERS = {
"accept": "application/json",
"X-Api-Key": APIKEY,
}
COURSES=[
"Build a Product Analytics Dashboard",
"FullStory 101",
"FullStory 201",
"FullStory Quick Wins",
"Integration and APIs",
"Page Flows & Pages",
"Private by Default",
"Privacy in FullStory",
"Product Analytics in FullStory",
"Using Page Flow Cards",
"Using Conversions",
"Using Dashboards",
"Using Defined Events",
"Using Metrics",
"Using Funnels",
"Using Segments and Funnels Together",
"FullStory for Marketers ",
"FullStory for Product Managers ",
"FullStory for Customer Support ",
"FullStory for Engineers ",
"FullStory for Account Management",
"Product Analytics in FullStory",
]
COURSES = [
"Build a Product Analytics Dashboard",
"FullStory 101",
"FullStory 201",
"FullStory Quick Wins",
"Integrations %26 APIs",
"Page Flows %26 Pages",
"Private by Default",
"Privacy in FullStory",
"Product Analytics in FullStory",
"Using Page Flow Cards",
"Using Conversions",
"Using Dashboards",
"Using Defined Events",
"Using Metrics",
"Using Funnels",
"Using Segments %26 Funnels Together",
"FullStory for Marketers",
"FullStory for Product Managers",
"FullStory for Customer Support",
"FullStory for Engineers",
"FullStory for Account Management",
"Product Analytics in FullStory",
]
def get_courses():
@ -39,25 +39,26 @@ def get_courses():
count = 0
list_of_ids = []
# while True:
for course_name in COURSES
# count += 1
url = f"https://api.northpass.com/v2/courses/?limit=100&name={course_name}"
# url = f"https://api.northpass.com/v2/courses/?limit=100&page={count}"
while True:
# for course_name in COURSES:
count += 1
# url = f"https://api.northpass.com/v2/courses/?filter[name][eq]={course_name}"
url = f"https://api.northpass.com/v2/courses/?limit=100&page={count}"
response = requests.get(url, headers=HEADERS)
response = response.json()
nextlink = response["links"]
for item in response["data"]:
print(item["id"])
# idict = { item["attributes"]["name"] : item["id"] }
idict = {item["attributes"]["name"]: item["id"]}
# id = item["id"]
# name = item["attributes"]["name"]
# list_of_ids.append(idict)
list_of_ids.append(idict)
if "next" not in nextlink:
break
# print(list_of_ids)
# print(len(list_of_ids))
if __name__ == "__main__":