Zenjob Notes, and new Templates

This commit is contained in:
Norm Rasmussen
2022-11-11 21:54:43 -05:00
parent 22704920d8
commit c599b8b792
1222 changed files with 2246 additions and 43 deletions

View File

@ -1,11 +1,13 @@
import requests
import urllib.parse
baseUrlname = "https://api.northpass.com/v2/people?filter[name][eq]="
baseUrlemail = "https://api.northpass.com/v2/people?filter[email][eq]="
apiKey = "JRDpCGQ7vSRiva6t5OkWDr5eJ" #This is for G2
apiKey = "JRDpCGQ7vSRiva6t5OkWDr5eJ" #G2
#apiKey = "6hUfJdAartHTHhHc0WIRZYPWe" #Walmart
def getfromName(baseUrlname, apiKey):
name = "Adam Nelson"
name = "Norm Test Testing Norm"
url = baseUrlname + f"{name}"
headers = {
"accept": "*/*",
@ -20,9 +22,10 @@ def getfromName(baseUrlname, apiKey):
print(uuid)
def getfromEmail(baseUrlemail, apiKey):
email = "norm+g2test@northpass.com"
email = "norm%2Bg2test@northpass.com" # The %2B encodes the + sign in the URL. Using the + sign won't work.
#email = "aaron.rodgers@corpay.com"
url = baseUrlemail + f"{email}"
print(url)
headers = {
"accept": "*/*",
"x-api-key": apiKey,
@ -31,9 +34,10 @@ def getfromEmail(baseUrlemail, apiKey):
response = requests.get(url, headers=headers)
response = response.json()
print(response)
uuid = response["data"][0]["id"]
uuid = response["data"]
print("Learner ID:" )
print(uuid)
if __name__ == "__main__":
getfromEmail(baseUrlemail, apiKey)
#getfromName(baseUrl, apiKey)
#getfromName(baseUrlname, apiKey)

View File

@ -13,26 +13,17 @@ def mainFunc(basecsv):
try:
readData.loc[
readData['Course Name'].isin(['G2 Profile Anatomy'])]
try:
readData.loc[
readData['Course Name'].isin('Profile Performance & Lead Management')]
except:
print("Profile Course Failed")
try:
readData.loc[
readData['Course Name'].isin('Review Tracking & Brand Building')]
except:
print("Review Course Failed")
try:
readData.loc[
readData['Course Name'].isin('The Review Rundown')]
extractedList = readData.loc[
readData['Attempt Start'].isnull(),
'Learner Name'].tolist()
print(extractedList)
except:
print("Review Rundown failed")
# newList = [*set(extractedList)]
# newList = [*set(extractedList)]
#findUuids(newList, readData)
except:
print("Not Working")