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:
@ -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):
|
||||
|
||||
Reference in New Issue
Block a user