Small notes changes. Added HackerRank Internal's Templates
BIN
Scripts/.DS_Store
vendored
@ -2,64 +2,62 @@ import requests
|
||||
|
||||
apiKey = "Bknf8kidbluRfcKu3m3lKoxS8"
|
||||
groups = [
|
||||
"Armonk",
|
||||
"Babylon",
|
||||
"Bayside",
|
||||
"Bedford",
|
||||
"Cutchogue",
|
||||
"East Hampton",
|
||||
"East Setauket",
|
||||
"Executive",
|
||||
"Farmingville",
|
||||
"Franklin Square",
|
||||
"Garden City",
|
||||
"Great Neck",
|
||||
"Greenport",
|
||||
"Hampton Bays",
|
||||
"Hamptons",
|
||||
"Huntington",
|
||||
"Huntington Station",
|
||||
"Katonah",
|
||||
"Locust Valley",
|
||||
"Long Beach",
|
||||
"Long Island",
|
||||
"Long Island City",
|
||||
"Manhasset",
|
||||
"Manhattan",
|
||||
"Massapequa Park",
|
||||
"Mattituck",
|
||||
"Merrick",
|
||||
"Montauk",
|
||||
"New Hyde Park",
|
||||
"New York",
|
||||
"North Fork",
|
||||
"Ocean Beach",
|
||||
"Plainview",
|
||||
"Port Washington",
|
||||
"Queens",
|
||||
"Quogue",
|
||||
"Rockville Centre",
|
||||
"Roslyn",
|
||||
"Sag Harbor",
|
||||
"Sayville",
|
||||
"Scarsdale",
|
||||
"Sea Cliff",
|
||||
"Smithtown",
|
||||
"Southampton",
|
||||
"Syosset",
|
||||
"Westchester",
|
||||
"Westhampton Beach"
|
||||
]
|
||||
"Armonk",
|
||||
"Babylon",
|
||||
"Bayside",
|
||||
"Bedford",
|
||||
"Cutchogue",
|
||||
"East Hampton",
|
||||
"East Setauket",
|
||||
"Executive",
|
||||
"Farmingville",
|
||||
"Franklin Square",
|
||||
"Garden City",
|
||||
"Great Neck",
|
||||
"Greenport",
|
||||
"Hampton Bays",
|
||||
"Hamptons",
|
||||
"Huntington",
|
||||
"Huntington Station",
|
||||
"Katonah",
|
||||
"Locust Valley",
|
||||
"Long Beach",
|
||||
"Long Island",
|
||||
"Long Island City",
|
||||
"Manhasset",
|
||||
"Manhattan",
|
||||
"Massapequa Park",
|
||||
"Mattituck",
|
||||
"Merrick",
|
||||
"Montauk",
|
||||
"New Hyde Park",
|
||||
"New York",
|
||||
"North Fork",
|
||||
"Ocean Beach",
|
||||
"Plainview",
|
||||
"Port Washington",
|
||||
"Queens",
|
||||
"Quogue",
|
||||
"Rockville Centre",
|
||||
"Roslyn",
|
||||
"Sag Harbor",
|
||||
"Sayville",
|
||||
"Scarsdale",
|
||||
"Sea Cliff",
|
||||
"Smithtown",
|
||||
"Southampton",
|
||||
"Syosset",
|
||||
"Westchester",
|
||||
"Westhampton Beach",
|
||||
]
|
||||
|
||||
|
||||
def findgroupIDs(apiKey, groups):
|
||||
groupuuids = []
|
||||
badGroups = []
|
||||
for group in groups:
|
||||
url = "https://api.northpass.com/v2/groups?filter[name][eq]="
|
||||
headers = {
|
||||
"accept": "application/json",
|
||||
"X-Api-Key": apiKey
|
||||
}
|
||||
headers = {"accept": "application/json", "X-Api-Key": apiKey}
|
||||
response = requests.get(url + group, headers=headers)
|
||||
response = response.json()
|
||||
try:
|
||||
@ -69,26 +67,22 @@ def findgroupIDs(apiKey, groups):
|
||||
badGroups.append(group)
|
||||
finally:
|
||||
pass
|
||||
#print(badGroups)
|
||||
#print(groupuuids)
|
||||
assignCourse(apiKey,url, groupuuids)
|
||||
# print(badGroups)
|
||||
# print(groupuuids)
|
||||
assignCourse(apiKey, url, groupuuids)
|
||||
|
||||
|
||||
def assignCourse(apiKey, url, groupuuids):
|
||||
for group in groupuuids:
|
||||
try:
|
||||
try:
|
||||
url = f"https://api.northpass.com/v2/groups/{group}/relationships/courses"
|
||||
courseuuid = "10e9b174-cbad-4caa-b0ff-1a7338f2345a"
|
||||
headers = {
|
||||
"accept": "application/json",
|
||||
"content-type": "application/json",
|
||||
"X-Api-Key": apiKey
|
||||
"X-Api-Key": apiKey,
|
||||
}
|
||||
payload = {"data": [
|
||||
{
|
||||
"type": "courses",
|
||||
"id": courseuuid
|
||||
}
|
||||
]}
|
||||
payload = {"data": [{"type": "courses", "id": courseuuid}]}
|
||||
print(f"Group {group} successfully accepted the course")
|
||||
response = requests.post(url, json=payload, headers=headers)
|
||||
except:
|
||||
@ -96,5 +90,6 @@ def assignCourse(apiKey, url, groupuuids):
|
||||
finally:
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
findgroupIDs(apiKey, groups)
|
||||
|
||||
BIN
Scripts/Backup/.DS_Store
vendored
Normal file
BIN
Scripts/Backup/2022 tax filing FAQs_1.png
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
Scripts/Backup/2022 tax filing FAQs_2.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
Scripts/Backup/2022 tax filing FAQs_3.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
Scripts/Backup/2022 tax filing FAQs_4.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
Scripts/Backup/2022 tax filing FAQs_5.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
Scripts/Backup/2022 tax filing FAQs_6.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
Scripts/Backup/2022 tax filing FAQs_7.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
Scripts/Backup/2022 tax filing FAQs_8.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_1.png
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_2.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_3.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_4.png
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_5.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_6.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_7.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_8.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
Scripts/Backup/Branch Wallet FAQs_9.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
Scripts/Backup/Curious how trip earnings work?_1.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
Scripts/Backup/Curious how trip earnings work?_2.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
Scripts/Backup/Curious how trip earnings work?_3.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
Scripts/Backup/Curious how trip earnings work?_4.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
Scripts/Backup/Customer Feedback
Customer feedback
HOME_1.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 60 KiB |
BIN
Scripts/Backup/Need to cancel a trip?_1.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
Scripts/Backup/Need to cancel a trip?_2.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
Scripts/Backup/Need to cancel a trip?_3.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
Scripts/Backup/Need to cancel a trip?_4.png
Normal file
|
After Width: | Height: | Size: 225 KiB |
BIN
Scripts/Backup/Need to cancel a trip?_5.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
Scripts/Backup/Need to cancel a trip?_6.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
Scripts/Backup/Not receiving app notifications?_1.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
Scripts/Backup/Not receiving app notifications?_2.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
Scripts/Backup/Onboarding to the Spark Driver™ platform_1.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
Scripts/Backup/Onboarding to the Spark Driver™ platform_2.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
Scripts/Backup/Pointers on adding your vehicle details_1.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
Scripts/Backup/Pointers on adding your vehicle details_2.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
Scripts/Backup/Pointers on adding your vehicle details_3.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 261 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 246 KiB |
BIN
Scripts/Backup/Pointers on creating your account_1.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
Scripts/Backup/Pointers on creating your account_2.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
Scripts/Backup/Pointers on creating your account_3.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
Scripts/Backup/Pointers on creating your account_4.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 280 KiB |
BIN
Scripts/Backup/Pointers on reviewing your trips_1.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
Scripts/Backup/Pointers on reviewing your trips_2.png
Normal file
|
After Width: | Height: | Size: 398 KiB |
BIN
Scripts/Backup/Pointers on reviewing your trips_3.png
Normal file
|
After Width: | Height: | Size: 438 KiB |
BIN
Scripts/Backup/Pointers on setting up your account_1.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
Scripts/Backup/Pointers on setting up your account_2.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
Scripts/Backup/Pointers on sharing your location_1.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
Scripts/Backup/Pointers on sharing your location_2.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
Scripts/Backup/Pointers on substituting customer items_1.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
Scripts/Backup/Pointers on substituting customer items_2.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
Scripts/Backup/Pointers on turning off Spark Now_1.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
Scripts/Backup/Pointers on turning off Spark Now_2.png
Normal file
|
After Width: | Height: | Size: 145 KiB |
BIN
Scripts/Backup/Pointers on updating your Spark Driver™ app_1.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
Scripts/Backup/Pointers on updating your Spark Driver™ app_2.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
Scripts/Backup/Pointers on viewing your earnings_1.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
Scripts/Backup/Pointers on viewing your earnings_2.png
Normal file
|
After Width: | Height: | Size: 270 KiB |
BIN
Scripts/Backup/Pointers on viewing your earnings_3.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
Scripts/Backup/Pointers on viewing your earnings_4.png
Normal file
|
After Width: | Height: | Size: 113 KiB |