Added Talkspace templates, made some changes to Skuid's script and started the Blacklane script
This commit is contained in:
44
Scripts/API_Tests/addalltogroup.py
Normal file
44
Scripts/API_Tests/addalltogroup.py
Normal file
@ -0,0 +1,44 @@
|
||||
import requests
|
||||
|
||||
apiKey = "L93lGMSugtpmsBhSAkx3tei6B"
|
||||
|
||||
def getallUuid(apiKey):
|
||||
x = 0
|
||||
uuid = []
|
||||
while True:
|
||||
x += 1
|
||||
url = f"https://api.northpass.com/v2/people?page={x}"
|
||||
headers = {
|
||||
"accept": "application/json",
|
||||
"X-Api-Key": apiKey
|
||||
}
|
||||
response = requests.get(url, headers=headers)
|
||||
jsonResponse = response.json()
|
||||
|
||||
for id in jsonResponse["data"]:
|
||||
user = id["id"]
|
||||
uuid.append(user)
|
||||
|
||||
if jsonResponse["links"]["next"] == "":
|
||||
break
|
||||
print(uuid)
|
||||
|
||||
def addtoGroup(apiKey, uuid):
|
||||
for x in uuid:
|
||||
url = f"https://api.northpass.com/v2/people/{x}/relationships/groups"
|
||||
payload = {"data": [
|
||||
{
|
||||
"type": "membership-groups",
|
||||
"id": "GROUP ID"
|
||||
}]}
|
||||
headers = {
|
||||
"accept": "application/json",
|
||||
"content-type": "application/json",
|
||||
"X-Api-Key": apiKey
|
||||
}
|
||||
response = requests.post(url, json=payload, headers=headers)
|
||||
jsonResponse = response.json()
|
||||
print(jsonResponse)
|
||||
|
||||
if __name__ == "__main__":
|
||||
getallUuid(apiKey)
|
||||
@ -1,6 +1,5 @@
|
||||
import requests
|
||||
import sys
|
||||
import http
|
||||
import pandas as pd
|
||||
|
||||
# Enter your API Key between the quotation marks.
|
||||
|
||||
@ -2,6 +2,39 @@ from collections import Counter
|
||||
import pandas as pd
|
||||
|
||||
basecsv = "/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/skuid_05lp.csv"
|
||||
lpcsv = "/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/skuidlps.csv"
|
||||
|
||||
'''
|
||||
Example multivalue dictionary
|
||||
|
||||
dict = {key1: [value1, value2, value3, value4],
|
||||
key2: [value5, value6, value 7],
|
||||
}
|
||||
|
||||
So this could be used for each learning path. In other words:
|
||||
|
||||
learning_paths = {'01:Skuid Ethos' : ["Congratulations", "Create", "Skuid Resources"]} etc etc
|
||||
|
||||
Ideally, we will add Alexa's "levels" in this dictionary as well. Could we do:
|
||||
|
||||
learning_paths = {'Level_1': [{'01:Skuid Ethos' : ["Congratulations", "Create", "Skuid Resources"]},
|
||||
{'02:Composer' : ["Overview", "Get Started with Composer", "Manage Pages"}]
|
||||
{'03:Design System Studio' : ["Get Started with Design Systems", etc etc]},
|
||||
'Level_2': [{'10 - Data' : ["Tips to Optimize", "Smarter Conditions"]},
|
||||
{'11-Components': ["Battle", "Engage"]},
|
||||
]
|
||||
}
|
||||
|
||||
How to create this by automation?
|
||||
'''
|
||||
|
||||
def lpLevels(lpcsv):
|
||||
levels = pd.read_csv(
|
||||
lpcsv,
|
||||
index_col=False,
|
||||
)
|
||||
print(levels.Level.unique()) # Print only unique values from the Level column
|
||||
|
||||
|
||||
def mainFunc(basecsv):
|
||||
readData = pd.read_csv(
|
||||
@ -27,5 +60,6 @@ def mainFunc(basecsv):
|
||||
# finalNames.append(name)
|
||||
|
||||
if __name__ == "__main__":
|
||||
mainFunc(basecsv)
|
||||
#mainFunc(basecsv)
|
||||
lpLevels(lpcsv)
|
||||
|
||||
|
||||
43
Scripts/Skuid_LPs/skuidlps.csv
Normal file
43
Scripts/Skuid_LPs/skuidlps.csv
Normal file
@ -0,0 +1,43 @@
|
||||
Level,LP,Course Name
|
||||
Level 1,01: Skuid Ethos - Level 1,Congratulations! You've been accepted to Skuid Skool
|
||||
Level 1,01: Skuid Ethos - Level 1,Create Your Own Dev Org Environment/Install Skuid - Level 1
|
||||
Level 1,01: Skuid Ethos - Level 1,Skuid Resources
|
||||
Level 1,02: Composer - Level 1,Overview of Skuid Central and Tabs - Level 1
|
||||
Level 1,02: Composer - Level 1,Get Started with the Composer - Level 1
|
||||
Level 1,02: Composer - Level 1,Manage Pages - Level 1
|
||||
Level 1,03: Design System Studio - Level 1,Get Started with Design Systems - Level 1
|
||||
Level 1,03: Design System Studio - Level 1,Configure Design Systems - Level 1
|
||||
Level 1,03: Design System Studio - Level 1,Apply Design Systems to Pages - Level 1
|
||||
Level 1,03: Design System Studio - Level 1,Manage Design Systems - Level 1
|
||||
Level 1,04: Data Sources - Level 1,Get Started with Data Sources - Level 1
|
||||
Level 1,05: Models - Level 1,Get Started with Models - Level 1
|
||||
Level 1,05: Models - Level 1,Configure Model Fields - Level 1
|
||||
Level 1,05: Models - Level 1,Configure Model Conditions - Level 1
|
||||
Level 1,05: Models - Level 1,Configure Model Actions - Level 1
|
||||
Level 1,05: Models - Level 1,Manage Models - Level 1
|
||||
Level 1,05: Models - Level 1,Intro to UI Only Fields - Level 1
|
||||
Level 1,06: Components - Level 1,Get Started with Components - Level 1
|
||||
Level 1,06: Components - Level 1,Use Components in the Composer - Level 1
|
||||
Level 1,06: Components - Level 1,Working with Tables - Level 1
|
||||
Level 1,06: Components - Level 1,Configure Basic Components - Level 1
|
||||
Level 1,06: Components - Level 1,Working with Forms - Level 1
|
||||
Level 1,07: Display Logic - Level 1,Get Started with Display Logic - Level 1
|
||||
Level 1,07: Display Logic - Level 1,Configure Display Logic Conditions - Level 1
|
||||
Level 1,07: Display Logic - Level 1,Display Logic Considerations - Level 1
|
||||
Level 1,08: Action Framework - Level 1,Get Started with the Action Framework - Level 1
|
||||
Level 1,08: Action Framework - Level 1,Configure Actions in Skuid - Level 1
|
||||
Level 1,08: Action Framework - Level 1,Execute an Action Sequence - Level 1
|
||||
Level 1,09: Deployment - Level 1,Deploying Skuid - Level 1
|
||||
Level 2,10 - Data: Level 2,Tips to Optimize Performance with Models - Level 2
|
||||
Level 2,10 - Data: Level 2,"Smarter Conditions, Smarter Data - Level 2"
|
||||
Level 2,10 - Data: Level 2,Use Fields to Improve Data Quality and UX - Level 2
|
||||
Level 2,11 - Components: Level 2,Battle of the Components: Deck vs. List vs. Table - Level 2
|
||||
Level 2,11 - Components: Level 2,Engage Users with Images - Level 2
|
||||
Level 2,11 - Components: Level 2,Get Started with Data Visualizations - Level 2
|
||||
Level 2,12 - App Architecture: Level 2,"Page Relationships: Principal, Dependent, and Include - Level 2"
|
||||
Level 2,12 - App Architecture: Level 2,"Give Users What They Need: Drawers, Modals, and Console Views - Level 2"
|
||||
Level 2,12 - App Architecture: Level 2,5 Tips to Build Better Wizards and Process Flows - Level 2
|
||||
Level 2,13 - Logic: Level 2,Get Started with Filters - Level 2
|
||||
Level 2,13 - Logic: Level 2,The Magical World of Merge Syntax - Level 2
|
||||
Level 2,13 - Logic: Level 2,Action Framework Power Features - Level 2
|
||||
Level 2,13 - Logic: Level 2,Practical Uses for UI-Only Fields - Level 2
|
||||
|
Reference in New Issue
Block a user