-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole_app.py
More file actions
executable file
·103 lines (83 loc) · 3.28 KB
/
console_app.py
File metadata and controls
executable file
·103 lines (83 loc) · 3.28 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
from config import api_key,client_id,template_id
from dropbox_sign import \
ApiClient, ApiException, Configuration, apis, models
from endpoints.account_endpoints import *
from endpoints.api_app_endpoints import *
from endpoints.bulk_send_endpoints import *
from endpoints.embedded_endpoints import *
from endpoints.oauth_endpoints import *
from endpoints.report_endpoints import *
from endpoints.signature_request_endpoints import *
from endpoints.team_endpoints import *
from endpoints.template_endpoints import *
from endpoints.unclaimed_draft_endpoints import *
import requests
import uuid
import base64
from pprint import pprint
from sys import exit
from textwrap import dedent
while True:
print(dedent("""
*********************************************************************************
*************************** Dropbox Sign Console App ***************************
*********************************************************************************
Please choose which funitionality you would like to achieve on the Dropbox Sign Console App.
Enter the letter corresponding to the action type.
A. Account Endpoints
B. API App Endpoints
C. Bulk Send Job Endpoints
D. Embedded Endpoints
E. Exit
F. OAuth Endpoints
G. Report Endpoints
H. Signature Request Endpoints
I. Team Endpoints
J. Template Endpoints
K. Unclaimed Draft Endpoints.
L. Test Endpoints
*********************************************************************************
"""))
def test():
# 1. Generate a UUID for the file
file_uuid = str(uuid.uuid4())
# 2. The original file path
file_path = "/FOLDER_PATH/test.pdf"
# 3. Encode the file path in Base64
encoded_path = base64.b64encode(file_path.encode()).decode()
# 4. Combine UUID and Base64-encoded file path into the final format
final_file_path = f"file:/{file_uuid}@_@{encoded_path}"
# Output the final file path
print(f"Final File Path: {final_file_path}")
action_type = input("Dropbox Sign Action Type > ")
if action_type.lower() == "a":
account_endpoints()
elif action_type == "b" or action_type == "B":
api_app_endpoints()
elif action_type == "c" or action_type == "C":
bulk_send_endpoints()
elif action_type == "d" or action_type == "D":
embedded_endpoints()
elif action_type == "E" or action_type == "e" or action_type == "Exit" or action_type == "exit":
print(dedent("""
You have exit the Dropbox Sign Console App.
"""))
exit(1)
elif action_type == "F" or action_type == "f":
oauth_endpoints()
elif action_type == "g" or action_type == "G":
report_endpoints()
elif action_type == "h" or action_type == "H":
signature_request_endpoints()
elif action_type == "i" or action_type == "I":
team_endpoints()
elif action_type == "j" or action_type == "J":
template_endpoints()
elif action_type == "k" or action_type == "K":
unclaimed_draft_endpoints()
elif action_type == "l" or action_type == "L":
test()
else:
print(dedent("""
Please enter a correct action by submitting the letter corresponding to the action.
"""))