-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.py
More file actions
39 lines (36 loc) · 991 Bytes
/
examples.py
File metadata and controls
39 lines (36 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from efecteClient import EfecteClient
from private_credentials import *
client = EfecteClient.EfecteClient(URL)
echo1 = client.echo("blubb")
print(echo1)
client.login(USER, PASS)
echo2 = client.echo_jwt("blubb")
print(echo2)
templates = client.get_templates()
template = client.get_template("person")
print(templates)
test1 = client.get_datacards('person', limit=1, data_cards=True)
person1 = {
'first_name': {
'values': [{'value': 'Kurt'}]
},
'first_name': {
'values': [{'value': 'Kleinlich'}]
},
'external_id': {
'values': [{'value': '1332'}]
},
'status': {
'values': [{'value': 'Deleted'}]
}
}
person2 = {
'first_name': {
'values': [{'value': 'Wurst'}]
}
}
# Create new person
test3 = client.create_datacard('person','personnel', person1)
# Update created persons firstname
test3 = client.update_datacard('person','personnel', test3, person2)
print(test3)