-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignatures.py
More file actions
28 lines (23 loc) · 806 Bytes
/
signatures.py
File metadata and controls
28 lines (23 loc) · 806 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
import requests
import constants
from helpers import requests_error, response_to_dict
@requests_error
def signatures_get(shift_id):
payload = {'id': shift_id}
response = requests.get(constants.SIGNATURES_GET,
params=payload,
timeout=constants.TIMEOUT
)
return response_to_dict(response)
@requests_error
def signatures_add_second(secret, secondSecret, publicKey):
payload = {
'secret': secret,
'secondSecret': secondSecret,
'publicKey': publicKey
}
response = requests.put(constants.SIGNATURES_ADD_SECOND,
data=payload,
timeout=constants.TIMEOUT
)
return response_to_dict(response)