Got groups and courses for Walmart Supplier. Updated the carousel and recommended for Chubb - haven't pushed to prod yet.

This commit is contained in:
Norm Rasmussen
2025-02-28 17:13:02 -05:00
parent 46efc9a422
commit 73282a0dac
7 changed files with 93 additions and 55 deletions

View File

@ -2,8 +2,8 @@ import requests
import Apikeys
import pandas as pd
BASEURL = "https://api.northpass.com/v2/"
APIKEY = Apikeys.SKAN
BASEURL = "https://api2.northpass.com/v2/"
APIKEY = Apikeys.SUPPLIERPROD
HEADERS = {"X-Api-Key": APIKEY, "accept": "application/json"}
LISTGROUPS = "groups/"
@ -27,7 +27,10 @@ def get_groups():
if "next" not in nextlink:
break
get_memberships(groups_list)
# get_memberships(groups_list)
df = pd.DataFrame.from_records(groups_list)
print(df)
df.to_csv("~/Downloads/Supplier_Groups.csv")
def get_memberships(groups_list):