Supplier academy and small script organization.
This commit is contained in:
@ -15,14 +15,16 @@ Should the app instantiate a Globals class with the key, headers, and baseurl, a
|
|||||||
function?
|
function?
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class ApiGlobals:
|
class ApiGlobals:
|
||||||
apikey = ""
|
apikey = ""
|
||||||
headers = {"accept": "application/json", "X-Api-Key": apikey }
|
headers = {"accept": "application/json", "X-Api-Key": apikey}
|
||||||
baseurl = "https://api.northpass.com/v2/"
|
baseurl = "https://api.northpass.com/v2/"
|
||||||
|
|
||||||
def __init__(self, apikey):
|
def __init__(self, apikey):
|
||||||
self.apikey = apikey
|
self.apikey = apikey
|
||||||
|
|
||||||
|
|
||||||
class ListPeople:
|
class ListPeople:
|
||||||
endpoint = "people/"
|
endpoint = "people/"
|
||||||
print(endpoint)
|
print(endpoint)
|
||||||
@ -48,6 +50,7 @@ class ListPeople:
|
|||||||
print("nothing exists")
|
print("nothing exists")
|
||||||
response = requests.get(listpeople.endpoint, headers=client.headers)
|
response = requests.get(listpeople.endpoint, headers=client.headers)
|
||||||
|
|
||||||
|
|
||||||
# class PostPeopleCustomProps:
|
# class PostPeopleCustomProps:
|
||||||
# endpoint = "properties/people/bulk"
|
# endpoint = "properties/people/bulk"
|
||||||
# payload = { "data": [
|
# payload = { "data": [
|
||||||
@ -58,8 +61,10 @@ class ListPeople:
|
|||||||
# }
|
# }
|
||||||
# ] }
|
# ] }
|
||||||
|
|
||||||
|
|
||||||
class PostBulkInvite:
|
class PostBulkInvite:
|
||||||
endpoint = "bulk/people"
|
endpoint = "bulk/people"
|
||||||
|
|
||||||
|
|
||||||
setup = ApiGlobals(Apikeys.SANDATA)
|
setup = ApiGlobals(Apikeys.SANDATA)
|
||||||
p = ListPeople()
|
p = ListPeople()
|
||||||
|
|||||||
Reference in New Issue
Block a user